MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / provider_from_model

Function provider_from_model

crates/opencode-tui/src/app/app.rs:3556–3566  ·  view source on GitHub ↗
(model: &str)

Source from the content-addressed store, hash-verified

3554}
3555
3556fn provider_from_model(model: &str) -> Option<String> {
3557 let model = model.trim();
3558 let (provider, _) = model
3559 .split_once('/')
3560 .or_else(|| model.split_once(':'))
3561 .unwrap_or((model, ""));
3562 if provider.is_empty() || provider == model {
3563 return None;
3564 }
3565 Some(provider.to_string())
3566}
3567
3568fn resolve_tui_base_url() -> String {
3569 if let Ok(value) = std::env::var("OPENCODE_TUI_BASE_URL") {

Callers 2

newMethod · 0.85

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected