Merge remote-tracking branch 'origin/main'

This commit is contained in:
Fahad
2025-06-15 09:25:58 +04:00
2 changed files with 145 additions and 1 deletions

View File

@@ -183,6 +183,16 @@ class ModelProviderRegistry:
continue
models[model_name] = provider_type
elif provider_type == ProviderType.OPENROUTER:
# OpenRouter uses a registry system instead of SUPPORTED_MODELS
if hasattr(provider, "_registry") and provider._registry:
for model_name in provider._registry.list_models():
# Check restrictions if enabled
if restriction_service and not restriction_service.is_allowed(provider_type, model_name):
logging.debug(f"Model {model_name} filtered by restrictions")
continue
models[model_name] = provider_type
return models