mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(copilot-acp): keep acp runtime off responses path
This commit is contained in:
parent
063244bb16
commit
8680f61f8b
4 changed files with 110 additions and 7 deletions
18
run_agent.py
18
run_agent.py
|
|
@ -705,13 +705,19 @@ class AIAgent:
|
|||
except Exception:
|
||||
pass
|
||||
|
||||
# GPT-5.x models require the Responses API path — they are rejected
|
||||
# on /v1/chat/completions by both OpenAI and OpenRouter. Also
|
||||
# auto-upgrade for direct OpenAI URLs (api.openai.com) since all
|
||||
# GPT-5.x models often require the Responses API path — they are
|
||||
# rejected on /v1/chat/completions by both OpenAI and OpenRouter.
|
||||
# Also auto-upgrade for direct OpenAI URLs (api.openai.com) since
|
||||
# newer tool-calling models prefer Responses there.
|
||||
if self.api_mode == "chat_completions" and (
|
||||
self._is_direct_openai_url()
|
||||
or self._model_requires_responses_api(self.model)
|
||||
if (
|
||||
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://")
|
||||
and (
|
||||
self._is_direct_openai_url()
|
||||
or self._model_requires_responses_api(self.model)
|
||||
)
|
||||
):
|
||||
self.api_mode = "codex_responses"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue