Gateway api_key config reading for custom providers
Cluster 18681 · gateway. Data as of
1 open item. Fix merged in #22842 on 10 May 2026. Check it covers your case.
The short answer
- Known?
- Yes. 5 related items grouped here, 1 issue already closed.
- Fix event
- A fix was merged to main in PR #22842. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
unresolved. That is separate from the fix event. - Still open
- 0 issues and 1 PR.
These issues and PRs address a bug where the gateway's /model command and model listing probes fail to read api_key credentials from config when using custom endpoints or providers. Fixes involve using the credential pool and passing config api keys through the relevant handlers.
Open issues0
Open PRs1
- PR#18685fix(gateway): pass config api key to model switch
Fixes on record
-
#22842 fix: use credential_pool for custom endpoint model listing probes (salvage #22810)
files:
hermes_cli/model_switch.py,hermes_cli/runtime_provider.py,scripts/release.pyShow the diff
-
hermes_cli/model_switch.py@@ -889,10 +889,9 @@ def switch_model( # "ollama-launch" that resolve_runtime_provider doesn't know), keep existing # credentials. Otherwise use the resolved values (picks up credential rotation, # base_url adjustments for OpenCode, etc.). - if runtime.get("provider") != "custom": - api_key = runtime.get("api_key", "") - base_url = runtime.get("base_url", "") - api_mode = runtime.get("api_mode", "") + api_key = runtime.get("api_key", "") + base_url = runtime.get("base_url", "") + api_mode = runtime.get("api_mode", "") except Exception: pass -
hermes_cli/runtime_provider.py@@ -492,6 +492,13 @@ def _resolve_named_custom_runtime( requested_norm = (requested_provider or "").strip().lower() if requested_norm == "custom" and explicit_base_url: base_url = explicit_base_url.strip().rstrip("/") + # Check credential pool first — mirrors the named-custom-provider path + # so bare `provider: custom` with a configured custom_providers entry + # also gets its api_key from the pool instead of env var fallbacks. + pool_result = _try_resolve_from_custom_pool(base_url, "custom", None) + if pool_result: + pool_result["source"] = "direct-alias" + return pool_result api_key_candidates = [ (explicit_api_key or "").strip(), os.getenv("OPENAI_API_KEY", "").strip(), -
scripts/release.py@@ -66,6 +66,7 @@ "[redacted:email]": "qWaitCrypto", "[email protected]": "kidonng", "[redacted:email]": "DanielLSM", + "[email protected]": "v1b3coder", "[redacted:email]": "Qwinty", "[redacted:email]": "CalmProton", "[email protected]": "mbac",
-
2 PRs closed without merging
From the close comments: done elsewhere 1 · merged via another change 1
Closed issues · 1
- Closed#18681fix(gateway): /model command fails on custom providers — api_key not read from config
How this cluster was grouped
-
Link evidence (
structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference. -
Pairwise link density
0.40: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means every pair is linked.
Pick up a Lab task
Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.
Open the LabAt a glance
- Subsystem
- gateway
- Merged PRs
- #22842
- Closed issues
- 1
- Attempts
- 2 PRs closed without merging
- Fix link checked
- 10 May 2026