MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / parse_model_and_provider

Function parse_model_and_provider

crates/opencode-cli/src/main.rs:943–955  ·  view source on GitHub ↗
(model: Option<String>)

Source from the content-addressed store, hash-verified

941}
942
943fn parse_model_and_provider(model: Option<String>) -> (Option<String>, Option<String>) {
944 let Some(raw) = model else {
945 return (None, None);
946 };
947 if let Some((provider, model_id)) = raw.split_once('/') {
948 (
949 Some(provider.trim().to_string()),
950 Some(model_id.trim().to_string()),
951 )
952 } else {
953 (None, Some(raw))
954 }
955}
956
957fn parse_bool_env(value: &str) -> bool {
958 matches!(

Callers 2

run_non_interactiveFunction · 0.85
generate_agent_responseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected