fix(vision): bump vision timeout from 60s to 180s to avoid premature failures

This commit is contained in:
zhayujie
2026-06-09 16:36:01 +08:00
parent e812c7d29a
commit 08e23e5bd8
8 changed files with 8 additions and 8 deletions

View File

@@ -657,7 +657,7 @@ class DeepSeekBot(Bot, OpenAICompatibleBot):
headers = self._build_headers()
resp = requests.post(
f"{self.api_base}/chat/completions",
headers=headers, json=payload, timeout=60,
headers=headers, json=payload, timeout=180,
)
if resp.status_code != 200:
return {"error": True, "message": f"HTTP {resp.status_code}: {resp.text[:300]}"}

View File

@@ -170,7 +170,7 @@ class DoubaoBot(Bot):
"Content-Type": "application/json",
}
resp = requests.post(f"{self.base_url}/chat/completions",
headers=headers, json=payload, timeout=60)
headers=headers, json=payload, timeout=180)
if resp.status_code != 200:
return {"error": True, "message": f"HTTP {resp.status_code}: {resp.text[:300]}"}
data = resp.json()

View File

@@ -257,7 +257,7 @@ class GoogleGeminiBot(Bot):
}
endpoint = f"{self.api_base}/v1beta/models/{model_name}:generateContent"
headers = {"x-goog-api-key": self.api_key, "Content-Type": "application/json"}
resp = requests.post(endpoint, headers=headers, json=payload, timeout=60)
resp = requests.post(endpoint, headers=headers, json=payload, timeout=180)
if resp.status_code != 200:
return {"error": True, "message": f"HTTP {resp.status_code}: {resp.text[:300]}"}

View File

@@ -643,7 +643,7 @@ class MimoBot(Bot, OpenAICompatibleBot):
headers = self._build_headers()
resp = requests.post(
f"{self.api_base}/chat/completions",
headers=headers, json=payload, timeout=60,
headers=headers, json=payload, timeout=180,
)
if resp.status_code != 200:
return {"error": True, "message": f"HTTP {resp.status_code}: {resp.text[:300]}"}

View File

@@ -201,7 +201,7 @@ class MinimaxBot(Bot):
"Content-Type": "application/json",
}
resp = requests.post(f"{self.api_base}/chat/completions",
headers=headers, json=payload, timeout=60)
headers=headers, json=payload, timeout=180)
if resp.status_code != 200:
return {"error": True, "message": f"HTTP {resp.status_code}: {resp.text[:300]}"}
data = resp.json()

View File

@@ -195,7 +195,7 @@ class MoonshotBot(Bot):
}
headers = self._build_headers()
resp = requests.post(f"{self.base_url}/chat/completions",
headers=headers, json=payload, timeout=60)
headers=headers, json=payload, timeout=180)
if resp.status_code != 200:
return {"error": True, "message": f"HTTP {resp.status_code}: {resp.text[:300]}"}
data = resp.json()

View File

@@ -415,7 +415,7 @@ class OpenAICompatibleBot:
}
resp = requests.post(
f"{api_base}/chat/completions",
headers=headers, json=payload, timeout=60,
headers=headers, json=payload, timeout=180,
)
if resp.status_code != 200:
body = resp.text[:500]