The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(opencode-go): route gpt-* models to /v1/responses (codex_responses)
Axmr1b35cacf8b5ec
diff --git a/hermes_cli/models.py b/hermes_cli/models.pyindex 546c415f1f2..b8ca965c023 100644--- a/hermes_cli/models.py+++ b/hermes_cli/models.py@@ -4161,6 +4161,7 @@ def opencode_model_api_mode(provider_id: Optional[str], model_id: Optional[str])OpenCode routes different models behind different API surfaces:- GPT-5 / Codex models on Zen use ``/v1/responses``+ - GPT models on Go (gpt-5.6-luna) use ``/v1/responses``- Claude models on Zen use ``/v1/messages``- MiniMax and Qwen models on Go use ``/v1/messages``- GLM / Kimi / DeepSeek / MiMo on Go use ``/v1/chat/completions``@@ -4177,6 +4178,11 @@ def opencode_model_api_mode(provider_id: Optional[str], model_id: Optional[str])return "chat_completions"if provider == "opencode-go":+ if normalized.startswith("gpt-"):+ # GPT models on Go (gpt-5.6-luna) are served via /v1/responses+ # per the published Go endpoint table, same as GPT on Zen:+ # https://opencode.ai/docs/go/#endpoints+ return "codex_responses"if normalized.startswith("minimax-"):return "anthropic_messages"if normalized.startswith("qwen"):diff --git a/tests/hermes_cli/test_model_validation.py b/tests/hermes_cli/test_model_validation.pyindex be544f2b585..60548122cd7 100644--- a/tests/hermes_cli/test_model_validation.py+++ b/tests/hermes_cli/test_model_validation.py@@ -269,6 +269,9 @@ class TestCopilotNormalization:assert opencode_model_api_mode("opencode-go", "kimi-k2.7-code") == "chat_completions"assert opencode_model_api_mode("opencode-go", "glm-5.2") == "chat_completions"assert opencode_model_api_mode("opencode-go", "minimax-m3") == "anthropic_messages"+ # GPT models on Go are Responses-only (Go endpoint table).+ assert opencode_model_api_mode("opencode-go", "gpt-5.6-luna") == "codex_responses"+ assert opencode_model_api_mode("opencode-go", "opencode-go/gpt-5.6-luna") == "codex_responses"class TestNormalizeOpencodeBaseUrl: