refactor: code cleanup

This commit is contained in:
Fahad
2025-10-02 08:09:44 +04:00
parent 218fbdf49c
commit 182aa627df
49 changed files with 370 additions and 249 deletions

View File

@@ -79,9 +79,9 @@ class ListModelsTool(BaseTool):
Returns:
Formatted list of models by provider
"""
from providers.base import ProviderType
from providers.openrouter_registry import OpenRouterModelRegistry
from providers.registry import ModelProviderRegistry
from providers.shared import ProviderType
output_lines = ["# Available AI Models\n"]
@@ -162,8 +162,8 @@ class ListModelsTool(BaseTool):
try:
# Get OpenRouter provider from registry to properly apply restrictions
from providers.base import ProviderType
from providers.registry import ModelProviderRegistry
from providers.shared import ProviderType
provider = ModelProviderRegistry.get_provider(ProviderType.OPENROUTER)
if provider:

View File

@@ -1341,7 +1341,7 @@ When recommending searches, be specific about what information you need and why
# Apply 40MB cap for custom models if needed
effective_limit_mb = max_size_mb
try:
from providers.base import ProviderType
from providers.shared import ProviderType
# ModelCapabilities dataclass has provider field defined
if capabilities.provider == ProviderType.CUSTOM:

View File

@@ -306,8 +306,8 @@ class VersionTool(BaseTool):
# Check for configured providers
try:
from providers.base import ProviderType
from providers.registry import ModelProviderRegistry
from providers.shared import ProviderType
provider_status = []