Private
Public Access
0
0
This commit is contained in:
2026-05-16 04:10:33 -04:00
parent 1ddde58161
commit 607aeaf2d2
3 changed files with 10 additions and 3 deletions
+2 -1
View File
@@ -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):