Configuration container describing a single LLM/provider pairing.
| 6 | |
| 7 | |
| 8 | class ModelConfig(BaseModel): |
| 9 | """Configuration container describing a single LLM/provider pairing.""" |
| 10 | |
| 11 | model_name: str = Field(description="Human-readable name used across the codebase.") |
| 12 | model_type: str = Field(description="Model type, e.g. 'chat/completions', 'responses', 'embeddings'.") |
| 13 | model_id: str = Field(description="Provider-specific identifier passed to the API.") |
| 14 | provider: str = Field(description="Provider slug, e.g. 'openai', 'anthropic'.") |
| 15 | api_base: Optional[str] = Field(default=None, description="Override API base URL.") |
| 16 | api_key: Optional[str] = Field(default=None, description="Override API key.") |
| 17 | temperature: Optional[float] = Field(default=None, description="Temperature parameter for the model.") |
| 18 | reasoning: Optional[Dict[str, Any]] = Field(default={ |
| 19 | "reasoning_effort": "high" |
| 20 | }, description="Reasoning configuration.") |
| 21 | plugins: Optional[List[Dict[str, Any]]] = Field(default=None, description="Plugins to use for the model.") |
| 22 | max_completion_tokens: Optional[int] = Field(default=None, description="Maximum completion tokens for chat/completions models.") |
| 23 | max_output_tokens: Optional[int] = Field(default=None, description="Maximum output tokens for responses API models.") |
| 24 | supports_streaming: bool = Field(default=True, description="Whether streaming is supported.") |
| 25 | supports_functions: bool = Field(default=False, description="Whether tool/function calling is supported.") |
| 26 | supports_vision: bool = Field(default=False, description="Whether multimodal inputs are supported.") |
| 27 | output_version: Optional[str] = Field( |
| 28 | default=None, |
| 29 | description="Optional output schema version when required by provider.", |
| 30 | ) |
| 31 | fallback_model: Optional[str] = Field( |
| 32 | default=None, |
| 33 | description="Fallback model name to use if the primary model fails due to policy/content filter errors.", |
| 34 | ) |
| 35 | |
| 36 | |
| 37 | class LLMExtra(BaseModel): |
no outgoing calls
no test coverage detected