feat(api): DeepSeek V4 Flash 默认、HTTP 错讯与多供应商分层
- 主链路默认 deepseek-v4-flash,DEEPSEEK_THINKING_ENABLED 对齐旧非思考 chat - 评测台评审装配迁入 adapters/llm(deepseek_eval_judge、zhipu_eval_judge)与 eval_judge_spec - 拆分 llm_http_openai_chat_errors 与 llm_errors(DeepSeek/智谱品牌与文档链),llm_call 支持 http_error_vendor - EvalJudgeService 按 spec.provider 传入 allm_json_call;评测台前端文案改为 V4 Flash - 更新 .env 示例与 staging/production 的 DEEPSEEK_MODEL;补充 openai/供应商错讯测试 Made-with: Cursor
This commit is contained in:
9
api/app/adapters/llm/openai_base_url.py
Normal file
9
api/app/adapters/llm/openai_base_url.py
Normal file
@@ -0,0 +1,9 @@
|
||||
"""OpenAI/Chat Completions 兼容基址规范化(多供应商共用)。"""
|
||||
|
||||
|
||||
def normalize_openai_compatible_base_url(raw: str, *, fallback: str) -> str:
|
||||
base = (raw or "").strip().rstrip("/") or fallback
|
||||
for suffix in ("/v1/chat/completions", "/v1"):
|
||||
if base.endswith(suffix):
|
||||
base = base[: -len(suffix)]
|
||||
return base
|
||||
Reference in New Issue
Block a user