mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-10 09:01:22 +00:00
ForwardAsAnthropic 此前无条件把 Anthropic Messages 转为 Responses 格式发往 /v1/responses,导致只支持 /v1/chat/completions 的第三方 OpenAI 兼容上游(京东云、DeepSeek、Kimi、GLM 等)全部 400。 在入口增加与 ForwardAsChatCompletions 对称的 ShouldUseResponsesAPI 分流:APIKey 账号 + 上游不支持 Responses 时,改走新建的 forwardAnthropicViaRawChatCompletions,链式复用全部已有转换桥 (Anthropic→Responses→CC 请求,CC→Responses→Anthropic 响应), 不新建转换函数。 Fixes #3735