Conversation
Related: caller-agnostic half of the opencode-go 404 class (#54147). Complements caller-side fixes #54148 / #54365 (both open) and the merged symmetric normalizer #57585 — this PR pins the overlay |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for isolating the overlay-side default from the already-merged runtime normalizer.
Problems
- The new
base_url_overridehas no direct regression coverage. Current main tests the runtime repair of a stripped URL intests/hermes_cli/test_runtime_provider_resolution.py:1754, while the new behavior is in the models.dev overlay resolution athermes_cli/providers.py:465.
Suggested changes
- Add a focused test that mocks the models.dev provider record for
opencode-gowith a stripped API URL and assertsresolve_provider_full("opencode-go")returnshttps://opencode.ai/zen/go/v1. This validates the caller-agnostic overlay contract without freezing live catalog data.
The runtime 404 path is already normalized by hermes_cli/runtime_provider.py:2063 and hermes_cli/model_switch.py:1349 from commit 6eb39c2bbea97941e333e17bec64a8c20cb068ec; this change remains a distinct deterministic default for the pre-runtime resolver path. Automated hermes-sweeper review.
4b67147 to
ea9c958
Compare
|
Regression test added per review feedback. (Updated: SHA amended after rebase onto latest main.) The new Mock strategy:
Assertions:
Verification:
Final branch push: |
ea9c958 to
79dc768
Compare
…nonical Zen Go URL The opencode-go HermesOverlay in hermes_cli/providers.py was the only URL-bearing overlay missing a base_url_override. Every sibling overlay (openai-api, xai-oauth, qwen-oauth, nous, lmstudio, stepfun, minimax-oauth) pins a canonical base URL; opencode-go fell through to mdev_info.api and, depending on what models.dev returned, defaulted to https://opencode.ai/zen/go with no /v1 suffix. The /v1-stripped URL is then rounded by anthropic_messages transport into the same wrong path, surfacing as 'HTTP 404 — Not Found | opencode' for every non-MiniMax model on the provider. This is the caller-agnostic half of the bug class tracked at NousResearch/hermes- agent#54147 — NousResearch#54148 / NousResearch#54365 fix _ensure_runtime_credentials forwarding target_model (the per-call-site half); this overlay pin ensures the URL is right regardless of which caller resolves the provider, covering cron resolution, delegation, kanban, model-picker prewarm, TUI switcher, and auxiliary fallbacks. The pinned URL is consistent with every other registration path for opencode-go in the codebase: - hermes_cli/auth.py:385 ProviderConfig.inference_base_url - plugins/model-providers/ opencode-zen/__init__.py: 142 OpenCodeGoProfile.base_url - ~/.hermes/.env template OPENCODE_GO_BASE_URL example Refs NousResearch#54147.
Add a one-line AUTHOR_MAP entry for the bot committer identity on PR NousResearch#59254. Without this mapping, the contributor-attribution CI gate fails on every commit from this bot account because the email is not in scripts/release.py. Refs NousResearch#59254.
79dc768 to
0d386c8
Compare
|
Added the focused regression coverage the sweeper asked for: |
Summary
Pin
base_url_overrideon theopencode-goHermesOverlayto the canonical Zen Go URL so the overlay's default matches the URL registered in every other site that knows aboutopencode-go.This is the caller-agnostic half of the bug class tracked in #54147. The in-flight PRs #54148 / #54365 fix
_ensure_runtime_credentialsforwardingtarget_model(the per-call-site half). Pinning the overlay default ensures the URL is right regardless of which caller resolves the provider, covering cron resolution, delegation, kanban, model-picker prewarm, TUI switcher, and auxiliary fallbacks — places any of which can re-introduce the same class of 404 if they ever forget to forward context.Why a separate PR
I dropped a comment on #54147 volunteering this as a standalone change rather than riding along with the caller-side fix. The two are independent: #54148 / #54365 fix
api_modederivation; this one fixes thebase_urldefault. Both should land for the full 404 class to be closed.Diff
"opencode-go": HermesOverlay( transport="openai_chat", is_aggregator=True, + base_url_override="https://opencode.ai/zen/go/v1", base_url_env_var="OPENCODE_GO_BASE_URL", ),Why this URL
The pinned URL is consistent with every other registration path for
opencode-goin the codebase:hermes_cli/auth.pyProviderConfig.inference_base_url="https://opencode.ai/zen/go/v1"plugins/model-providers/opencode-zen/__init__.pyOpenCodeGoProfile.base_url="https://opencode.ai/zen/go/v1"~/.hermes/.envtemplate# OPENCODE_GO_BASE_URL=https://opencode.ai/zen/go/v1hermes_cli/providers.pymdev_info.apiAfter this patch,
providers.py:446'sbase_url_override or mdev_info.apiresolves to the canonical URL foropencode-go, matching every sibling URL-bearing overlay (openai-api,xai-oauth,qwen-oauth,nous,lmstudio,stepfun,minimax-oauth).Reproduction (verified 2026-07-05)
After this patch,
resolve_provider("opencode-go")returns the right URL regardless of which call site asks;minimax-m3continues to work as before (anthropic-routed, separate transport, separate bug class — see #35183), and the rest of theopencode-gocatalog (glm-*,kimi-*,qwen3.*,mimo-v2.*) becomes reachable for every caller including the ones a per-site patch would miss.Note on
deepseek-v4-flash: independent of the routing-layer bug, OpenCode Go's DeepSeek-v4 backend also returned HTTP 500 from upstream in the same probe today. That's a separate, upstream-side outage — flagged here for the maintainers' awareness so it isn't conflated with this fix.Out of scope
_ensure_runtime_credentialsorruntime_provider.py. The two layers (api_mode forwarding + base_url default) should land independently.OPENCODE_GO_BASE_URLenv handling. Users who already override via the env var see no behavior change; users on the default see the previously-broken models become reachable.Verification
python -c "import ast; ast.parse(open('hermes_cli/providers.py').read())"— parses ✓hermes_cli/providers.pyis the only file modified.git grep -n 'opencode-go' hermes_cli/providers.pyshould show thebase_url_overrideline.Environment
Hermes Agent v0.18.0 (
a05b64d6), Windows 10, 20-modelprovider_models_cache.jsonfingerprintab8202806d02b240.Refs #54147