# NousResearch/hermes-agent · Fix API key handling when probing custom endpoints

## Open now

- 1 issue, 3 PRs open on GitHub.
- #83837: Bug: model_switch.py section 3b hardcodes empty api_key when probing custom endpoints
- PR #83850: fix(model-switch): pass current_api_key when probing current custom endpoint
- PR #113148: fix(gateway): thread config api_key into model switch
- PR #113149: fix(model): authenticate bare custom picker probes

These members address a bug where custom endpoint probing incorrectly used an empty or hardcoded API key instead of the configured one. The issue and related fixes target the model switch logic responsible for passing the correct API key during endpoint checks.

## TL;DR

- 8 member(s): 1 open issue(s), 0 closed issue(s), 3 open PR(s), 0 merged PR(s), 4 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.25`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Open related issues

- #83837: Bug: model_switch.py section 3b hardcodes empty api_key when probing custom endpoints

## Prior & competing PRs

- **#83850: fix(model-switch): pass current_api_key when probing current custom endpoint**. open
  - maintainer direction: category `superseded_by_pr`; implication `superseded`
  - files: `hermes_cli/model_switch.py`
- **#83930: fix(model): probe bare custom endpoints with the configured api_key (#83837)**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `0c5c44195`
- **#99893: fix(picker): resolve key_cmd credentials for model discovery**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `520e63661c8eaa2135ebd60a07192f0d8aa45e6e`
- **#100069: fix(gateway): pass config API key to model switch**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#113148`
- **#100170: fix(model): authenticate bare custom picker probes**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#113149`
- **#113148: fix(gateway): thread config api_key into model switch**. open
  - maintainer direction: category `silent_close`; implication `active`
  - files: `gateway/slash_commands_model.py`, `tests/gateway/test_model_command_custom_providers.py`
- **#113149: fix(model): authenticate bare custom picker probes**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#83837`, `#83850`, `#59808`, `#83930`, `#100170`, `#113148`
  - files: `hermes_cli/model_switch_providers.py`, `tests/hermes_cli/test_model_switch_custom_providers.py`

## Fix status

- No merged fix on record.
- Subsystem: `gateway`
