refactor: code cleanup
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user