feat: advertise configured governed API server models - #36110
Open
bshenderson wants to merge 1 commit into
Open
Conversation
Author
|
Maintainer validation summary:
Reviewer focus:
|
Collaborator
mxnstrexgl
approved these changes
Jun 1, 2026
mxnstrexgl
left a comment
There was a problem hiding this comment.
LGTM — automated review passed. No security, quality, or test coverage issues detected.
Codename-11
added a commit
to Codename-11/hermes-agent
that referenced
this pull request
Jun 17, 2026
Desktop/external clients that send a model field in the session chat or
chat/stream request body can now override the gateway default for that
turn. _create_agent() and _run_agent() accept requested_model, which
takes priority over _resolve_gateway_model() when present.
Wired through:
- POST /api/sessions/{id}/chat
- POST /api/sessions/{id}/chat/stream
This enables the desktop composer model picker to hot-swap the model
mid-session without requiring a config.yaml write + gateway restart.
Upstream PRs NousResearch#22825, NousResearch#25552, and NousResearch#36110 address similar gaps on /v1/*
paths; this patch is scoped to the /api/sessions/* surface only.
Contributor
|
Thanks for the focused configured-provider proposal. The automatic catalog behavior is still distinct from current main, so it remains worth preserving for salvage. Problems
Suggested changes
Automated hermes-sweeper review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hermes-agentmodel only/v1/modelsWhy
Today the API server can expose a misleading model surface: the advertised model list and request-time routing can drift from the provider/model truth actually configured in Hermes. That makes governed Open WebUI and other API clients bind against an authority surface that is not the real runtime authority.
This change makes the API server expose and resolve models from the same configured source of truth.
Scope
gateway/platforms/api_server.pytests/gateway/test_api_server.pyBehavior change
/v1/modelsnow includes configured-provider model IDs derived from Hermes configValidation
python3 -m py_compile gateway/platforms/api_server.py tests/gateway/test_api_server.py/opt/hermes/.venv/bin/python -m pytest -q tests/gateway/test_api_server.py -k 'TestModelsEndpoint and (models_returns_hermes_agent or models_advertise_governed_provider_models_from_config or models_returns_profile_name or resolve_model_name_explicit or resolve_model_name_default_profile or resolve_model_name_named_profile)'Result:
Risks / reviewer focus
hermes-agentmodel IDNotes
bshenderson/hermes-agent.778740b78017c142cc76ff61663abf808257199f.