Skip to content

fix: preserve static custom provider models - #58453

Closed
lord-dubious wants to merge 1 commit into
NousResearch:mainfrom
lord-dubious:fix/desktop-static-custom-provider-models
Closed

fix: preserve static custom provider models#58453
lord-dubious wants to merge 1 commit into
NousResearch:mainfrom
lord-dubious:fix/desktop-static-custom-provider-models

Conversation

@lord-dubious

Copy link
Copy Markdown
Contributor

Summary

  • normalize configured custom provider model lists when they are written as [{id: ...}] rows
  • keep static custom provider models in the shared model-options payload when discover_models: false
  • reuse the same declared-model parsing for picker rows, typed model routing, and validation overrides

Context

Some OpenAI-compatible gateways serve chat completions but do not expose a working /models endpoint. In that case the desktop picker should still show the models explicitly configured under providers: / custom_providers: rather than rendering an empty provider row.

This keeps the fix in the backend inventory/model-switch path shared by Desktop, TUI, and gateway callers instead of adding a Desktop-only special case.

Test plan

  • venv/bin/python -m pytest -q tests/hermes_cli/test_model_switch_custom_providers.py tests/hermes_cli/test_inventory.py
  • venv/bin/python -m ruff check hermes_cli/config.py hermes_cli/model_switch.py tests/hermes_cli/test_inventory.py tests/hermes_cli/test_model_switch_custom_providers.py
  • git diff --check

Refs #58393

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles P2 Medium — degraded but workaround exists labels Jul 4, 2026
webdevtodayjason added a commit to webdevtodayjason/hermes-agent that referenced this pull request Jul 4, 2026
…aces

Per maintainer feedback on the interface-ideas thread: a context-engine
plugin already owns the full compression policy (should_compress /
compress / preflight on the ContextEngine ABC), and a ProviderProfile
already owns its model catalog (models_url / fetch_models /
fallback_models). Call both out explicitly — the queued PRs that patch
core for these (NousResearch#58418, NousResearch#58444, NousResearch#58453) suggest contributors don't
find the existing surface, which is the failure mode this guide exists
to fix. Also adds both rows to the PR-shape → seam mapping table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FWMcB7RPSYUpsXDfBgwjzM
@teknium1

teknium1 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Merged via PR #58505 (#58505). Your commit was cherry-picked onto current main with your authorship preserved in git log (fc18d15). Thanks for the fix!

webdevtodayjason added a commit to webdevtodayjason/hermes-agent that referenced this pull request Aug 3, 2026
…aces

Per maintainer feedback on the interface-ideas thread: a context-engine
plugin already owns the full compression policy (should_compress /
compress / preflight on the ContextEngine ABC), and a ProviderProfile
already owns its model catalog (models_url / fetch_models /
fallback_models). Call both out explicitly — the queued PRs that patch
core for these (NousResearch#58418, NousResearch#58444, NousResearch#58453) suggest contributors don't
find the existing surface, which is the failure mode this guide exists
to fix. Also adds both rows to the PR-shape → seam mapping table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FWMcB7RPSYUpsXDfBgwjzM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants