Skip to content

fix: route custom provider models dict selections#1752

Closed
Michaelyklam wants to merge 1 commit intonesquena:masterfrom
Michaelyklam:fix/issue-1240-custom-provider-models-dict
Closed

fix: route custom provider models dict selections#1752
Michaelyklam wants to merge 1 commit intonesquena:masterfrom
Michaelyklam:fix/issue-1240-custom-provider-models-dict

Conversation

@Michaelyklam
Copy link
Copy Markdown
Contributor

Thinking Path

What Changed

  • Updated resolve_model_provider() so named custom_providers match both the singular model field and models dict keys.
  • Added a regression test for a custom_providers[].models-only model routing to custom:<name> with the configured base_url.

Why It Matters

Verification

  • env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_model_resolver.py::test_custom_provider_models_dict_routes_to_named_custom_provider -q
    • First run before implementation failed as expected: provider resolved to xiaomi instead of custom:litellm-proxy.
    • Final run passed.
  • env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_model_resolver.py tests/test_issue1699_model_cache_source_fingerprint.py tests/test_issue1633_models_cache_version_stamp.py tests/test_ttl_cache.py tests/test_pr1339_fallback_providers_list.py -q
    • 51 passed in 48.98s
  • env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/ -q
    • 4597 passed, 2 skipped, 3 xpassed, 1 warning, 8 subtests passed in 378.87s
  • git diff --check

Risks / Follow-ups

Model Used

  • OpenAI Codex gpt-5.5 via Hermes Agent CLI.
  • Tool use: GitHub CLI, git worktree, pytest, and file-edit tools.

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Thanks @Michaelyklam — this shipped in v0.51.12 (commit 34f2243) as part of a 3-PR full-sweep batch release. Stage rebased your branch onto current master, ran the full pre-release gate (4632 pytest, browser tests, Opus advisor verdict SHIP), and merged via release PR #1755.

GitHub didn't auto-close because the merge commit only references the squash-merged stage branch, not your fork's commit directly — closing manually for hygiene.

Live now on https://get-hermes.ai/ and on existing installs after git pull + restart.

Release notes: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.12

pull Bot pushed a commit to soitun/hermes-webui that referenced this pull request May 6, 2026
pull Bot pushed a commit to soitun/hermes-webui that referenced this pull request May 6, 2026
… custom provider routing + session runtime invariants)

Constituent PRs:
- nesquena#1746 (@Michaelyklam) — shorten cron profile lock for manual runs (closes nesquena#1574, RETURNS from v0.51.11 deferral with queue-drain blocker fixed)
- nesquena#1752 (@Michaelyklam) — route custom provider models dict selections (slice of nesquena#1240 umbrella)
- nesquena#1753 (@Michaelyklam) — guard session-owned runtime invariants (refs nesquena#1694)

nesquena#1746 v2 fix: result_queue.get(timeout=...) BEFORE process.join()
(drain-then-join), with queue.Empty recovery + 200,000-char regression test.
Opus stage-306 verified the fix correct + complete; the prior fork→spawn
SHOULD-FIX filed as follow-up issue nesquena#1754 (separate architectural change).

Tests: 4622 → 4632 passing (+10). 0 regressions. Stably green on first try.

Pre-release verification:
- All 3 PRs CI-green individually + rebased onto master with NO conflicts
  (disjoint files: api/config.py + static/messages.js + api/routes.py)
- pytest 4632 passed, 0 failed
- node -c clean on static/messages.js
- 11/11 browser API endpoints PASS
- Opus advisor: SHIP all 3, 0 MUST-FIX, 1 SHOULD-FIX filed as nesquena#1754

Closes nesquena#1574.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify and harden Provider/Model source-of-truth across WebUI, CLI, and Gateway

2 participants