xueyiming 5 дней назад
Родитель
Сommit
03bcf9da9c
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      agent/llm/openrouter.py

+ 2 - 2
agent/llm/openrouter.py

@@ -538,7 +538,7 @@ async def _openrouter_anthropic_call(
     max_retries = 3
     last_exception = None
     for attempt in range(max_retries):
-        async with httpx.AsyncClient(timeout=300.0) as client:
+        async with httpx.AsyncClient(timeout=300.0, proxy="http://127.0.0.1:7890") as client:
             try:
                 response = await client.post(endpoint, json=payload, headers=headers)
                 response.raise_for_status()
@@ -662,7 +662,7 @@ async def openrouter_llm_call(
     max_retries = 3
     last_exception = None
     for attempt in range(max_retries):
-        async with httpx.AsyncClient(timeout=300.0) as client:
+        async with httpx.AsyncClient(timeout=300.0, proxy="http://127.0.0.1:7890") as client:
             try:
                 response = await client.post(endpoint, json=payload, headers=headers)
                 response.raise_for_status()