feat: all native providers now read from catalog files like OpenRouter / Custom configs. Allows for greater control over the capabilities

This commit is contained in:
Fahad
2025-10-07 12:17:47 +04:00
parent 7d7c74b5a3
commit 2a706d5720
13 changed files with 704 additions and 397 deletions

19
providers/xai_registry.py Normal file
View File

@@ -0,0 +1,19 @@
"""Registry loader for X.AI (GROK) model capabilities."""
from __future__ import annotations
from .model_registry_base import CapabilityModelRegistry
from .shared import ProviderType
class XAIModelRegistry(CapabilityModelRegistry):
"""Capability registry backed by `conf/xai_models.json`."""
def __init__(self, config_path: str | None = None) -> None:
super().__init__(
env_var_name="XAI_MODELS_CONFIG_PATH",
default_filename="xai_models.json",
provider=ProviderType.XAI,
friendly_prefix="X.AI ({model})",
config_path=config_path,
)