hermes - 💡(How to fix) Fix Explicit runtime path ignores opencode per-model api_mode routing [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug Description

The fix for #10469 added opencode_model_api_mode() to the credential pool path in _resolve_pool_runtime() (lines 263-269 of runtime_provider.py), ensuring that OpenCode Zen/Go always re-derive api_mode from the actual model being used.

However, _resolve_explicit_runtime() (lines 847-890) and the code path that runs when explicit_base_url is provided does NOT call opencode_model_api_mode(). It still uses model_cfg.get("api_mode") as the primary source, and falls back to URL-based detection.

Concrete reproduction:

  1. Set api_mode: anthropic_messages in config.yaml's model section (perhaps from a previous Claude-based setup)
  2. Switch provider to opencode-zen with a non-Claude model like big-pickle
  3. Hermes sends Anthropic-format requests → 404 from OpenCode Zen

Expected behavior:

The explicit runtime path should also call opencode_model_api_mode() for opencode-zen/go providers, just like the pool path does. The config's api_mode should be treated as a SUGGESTION that gets validated and potentially overridden by per-model routing.

Location:

runtime_provider.py lines 847-890 — the api_mode resolution in _resolve_explicit_runtime() when pconfig.auth_type == "api_key".

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING