diff --git a/libs/agent/agent/core/provider_config.py b/libs/agent/agent/core/provider_config.py index 7fae13d0..21a5d283 100644 --- a/libs/agent/agent/core/provider_config.py +++ b/libs/agent/agent/core/provider_config.py @@ -14,6 +14,6 @@ DEFAULT_MODELS = { ENV_VARS = { LLMProvider.OPENAI: "OPENAI_API_KEY", LLMProvider.ANTHROPIC: "ANTHROPIC_API_KEY", - LLMProvider.OLLAMA: "OLLAMA_API_KEY", - LLMProvider.OAICOMPAT: "OAICOMPAT_API_KEY", # OpenAI-compatible API typically doesn't require an API key + LLMProvider.OLLAMA: "none", + LLMProvider.OAICOMPAT: "none", # OpenAI-compatible API typically doesn't require an API key } diff --git a/libs/agent/agent/core/types.py b/libs/agent/agent/core/types.py index 6b4f3705..c1da69b1 100644 --- a/libs/agent/agent/core/types.py +++ b/libs/agent/agent/core/types.py @@ -35,7 +35,9 @@ class LLM: def __post_init__(self): """Set default model name if not provided.""" if self.name is None: - self.name = PROVIDER_TO_DEFAULT_MODEL.get(self.provider) + from .provider_config import DEFAULT_MODELS + + self.name = DEFAULT_MODELS.get(self.provider) # Set default provider URL if none provided if self.provider_base_url is None and self.provider == LLMProvider.OAICOMPAT: