diff --git a/crates/goose/src/providers/canonical/mod.rs b/crates/goose/src/providers/canonical/mod.rs index 7f2fd75be1..ab7bc81a4a 100644 --- a/crates/goose/src/providers/canonical/mod.rs +++ b/crates/goose/src/providers/canonical/mod.rs @@ -64,6 +64,12 @@ pub fn recommended_models_from_registry(provider: &str) -> Vec { .collect() } +/// Providers that run models locally — their cost is always zero regardless +/// of what the canonical registry says for the underlying model architecture. +fn is_local_provider(provider: &str) -> bool { + matches!(provider, "ollama" | "local") +} + pub fn maybe_get_canonical_model(provider: &str, model: &str) -> Option { let registry = CanonicalModelRegistry::bundled().ok()?; @@ -74,8 +80,9 @@ pub fn maybe_get_canonical_model(provider: &str, model: &str) -> Option 0); + assert!( + canonical.limit.context > 0, + "context limit should be preserved" + ); } #[test]