fix(im_llm): 代理绕过Docker内部hostname

This commit is contained in:
QihuAI Design committed 2026-07-31 08:51:15 +08:00
1 parent 96aabc31f6
commit 9a43ee244d
24 files changed
+898 -129

No files matched your search

+10 -2
View File
@@ -506,7 +506,11 @@ async def _optimize_media_prompt(raw_prompt: str, media_type: str, db=None) -> s
api_key = text_model.api_key or (provider.api_key if provider else None)
# 调用 LiteLLM 网关时用 master key(模型自带 key 不在 LiteLLM 数据库里)
if text_model.endpoint and "qihu-aiflow-litellm" in text_model.endpoint:
api_key = "sk-litellm-master-key-aiflow-2026"
else:
api_key = text_model.api_key or (provider.api_key if provider else None)
@@ -936,7 +940,11 @@ async def _generate_media(db, ai_model, prompt: str, user_id: str = None) -> str
api_key = ai_model.api_key or (provider.api_key if provider else None)
# 调用 LiteLLM 网关时用 master key(模型自带 key 不在 LiteLLM 数据库里)
if ai_model.endpoint and "qihu-aiflow-litellm" in ai_model.endpoint:
api_key = "sk-litellm-master-key-aiflow-2026"
else:
api_key = ai_model.api_key or (provider.api_key if provider else None)