sigh
This commit is contained in:
+2
-1
@@ -14,7 +14,6 @@ during chat creation to avoid massive history bloat.
|
||||
# ai_client.py
|
||||
import anthropic
|
||||
from google import genai
|
||||
from google.api_core import exceptions as gac
|
||||
from google.genai import types
|
||||
from openai import OpenAI
|
||||
import asyncio
|
||||
@@ -39,6 +38,7 @@ from src import mcp_client
|
||||
from src import mma_prompts
|
||||
from src import performance_monitor
|
||||
from src import project_manager
|
||||
from src.paths import get_credentials_path
|
||||
from src.tool_bias import ToolBiasEngine
|
||||
from src.models import ToolPreset, BiasProfile, Tool
|
||||
from src.gemini_cli_adapter import GeminiCliAdapter
|
||||
@@ -360,6 +360,7 @@ def _classify_anthropic_error(exc: Exception) -> ProviderError:
|
||||
def _classify_gemini_error(exc: Exception) -> ProviderError:
|
||||
body = str(exc).lower()
|
||||
try:
|
||||
from google.api_core import exceptions as gac
|
||||
if isinstance(exc, gac.ResourceExhausted):
|
||||
return ProviderError("quota", "gemini", exc)
|
||||
if isinstance(exc, gac.TooManyRequests):
|
||||
|
||||
Reference in New Issue
Block a user