Schema now lists all models including locally available models

New tool to list all models `listmodels`
Integration test to for all the different combinations of API keys
Tweaks to codereview prompt for a better quality input from Claude
Fixed missing 'low' severity in codereview
This commit is contained in:
Fahad
2025-06-16 19:07:35 +04:00
parent cb17582d8f
commit 70b64adff3
10 changed files with 822 additions and 24 deletions

View File

@@ -99,6 +99,9 @@ class ToolRequest(BaseModel):
class BaseTool(ABC):
# Class-level cache for OpenRouter registry to avoid multiple loads
_openrouter_registry_cache = None
"""
Abstract base class for all Gemini tools.
@@ -210,6 +213,20 @@ class BaseTool(ABC):
"""
pass
@classmethod
def _get_openrouter_registry(cls):
"""Get cached OpenRouter registry instance."""
if BaseTool._openrouter_registry_cache is None:
import logging
from providers.openrouter_registry import OpenRouterModelRegistry
logger = logging.getLogger(__name__)
logger.info("Loading OpenRouter registry for the first time (will be cached for all tools)")
BaseTool._openrouter_registry_cache = OpenRouterModelRegistry()
return BaseTool._openrouter_registry_cache
def is_effective_auto_mode(self) -> bool:
"""
Check if we're in effective auto mode for schema generation.