feat: 接入模型动态 Fallback 与调用审计

This commit is contained in:
hh
2026-07-21 10:35:50 +08:00
parent 9429133d04
commit d0c3690d47
45 changed files with 9253 additions and 173 deletions
+2 -1
View File
@@ -26,6 +26,7 @@ class YunqiProvider(VolcanoArkProvider):
endpoint: str = "images/generations",
image: str | list[str] | None = None,
size: str = "1024x1536",
timeout: float = 300,
) -> dict[str, Any]:
if not self.api_key:
raise ValueError("YUNQI_API_KEY is not configured")
@@ -37,7 +38,7 @@ class YunqiProvider(VolcanoArkProvider):
f"{self.base_url.rstrip('/')}/{endpoint.lstrip('/')}",
headers={"Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json"},
json=body,
timeout=300,
timeout=timeout,
)
response.raise_for_status()
return response.json()