Add is_enabled flag to LlmModel

Introduce an is_enabled: bool = True field to the LlmModel pydantic model to allow toggling model availability. Defaulting to True preserves backward compatibility and avoids breaking changes; can be used by APIs or UIs to filter or disable models without removing them.
This commit is contained in:
Bentlybro
2026-03-26 10:12:36 +00:00
parent dff9b0f3b2
commit 62065292ec

View File

@@ -41,6 +41,7 @@ class LlmModel(pydantic.BaseModel):
context_window: int
max_output_tokens: int | None = None
price_tier: int # 1=cheapest, 2=medium, 3=expensive
is_enabled: bool = True
is_recommended: bool = False
capabilities: dict[str, Any] = pydantic.Field(default_factory=dict)
costs: list[LlmModelCost] = pydantic.Field(default_factory=list)