mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: improve ACP type check and restore comment accuracy
- Use isinstance() with try/except import for CopilotACPClient check in _to_async_client instead of fragile __class__.__name__ string check - Restore accurate comment: GPT-5.x models *require* (not 'often require') the Responses API on OpenAI/OpenRouter; ACP is the exception, not a softening of the requirement - Add inline comment explaining the ACP exclusion rationale
This commit is contained in:
parent
8680f61f8b
commit
b27eaaa4db
2 changed files with 11 additions and 5 deletions
|
|
@ -705,10 +705,12 @@ class AIAgent:
|
|||
except Exception:
|
||||
pass
|
||||
|
||||
# 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
|
||||
# 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
|
||||
# newer tool-calling models prefer Responses there.
|
||||
# ACP runtimes are excluded: CopilotACPClient handles its own
|
||||
# routing and does not implement the Responses API surface.
|
||||
if (
|
||||
self.api_mode == "chat_completions"
|
||||
and self.provider != "copilot-acp"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue