mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
The GPT-5 auto-upgrade logic unconditionally overrode api_mode to codex_responses for any model starting with gpt-5, even when the user explicitly set api_mode=chat_completions. Custom proxies that serve GPT-5 via /chat/completions became unusable. Fix: check api_mode is None before the override fires. If the caller passed any explicit api_mode, it is final -- no auto-upgrade. Closes #10473
This commit is contained in:
parent
f4724803b4
commit
21afc9502a
1 changed files with 4 additions and 1 deletions
|
|
@ -721,8 +721,11 @@ class AIAgent:
|
|||
# Responses there. ACP runtimes are excluded: CopilotACPClient
|
||||
# handles its own routing and does not implement the Responses API
|
||||
# surface.
|
||||
# When api_mode was explicitly provided, respect it — the user
|
||||
# knows what their endpoint supports (#10473).
|
||||
if (
|
||||
self.api_mode == "chat_completions"
|
||||
api_mode is None
|
||||
and self.api_mode == "chat_completions"
|
||||
and self.provider != "copilot-acp"
|
||||
and not str(self.base_url or "").lower().startswith("acp://copilot")
|
||||
and not str(self.base_url or "").lower().startswith("acp+tcp://")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue