fix(model): normalize native provider-prefixed model ids - #6943
Closed
bobashopcashier wants to merge 3 commits into
Closed
fix(model): normalize native provider-prefixed model ids#6943bobashopcashier wants to merge 3 commits into
bobashopcashier wants to merge 3 commits into
Conversation
bobashopcashier
force-pushed
the
fix/6211-model-normalize-native-prefixes
branch
from
April 10, 2026 06:30
d49b1b2 to
9915548
Compare
bobashopcashier
force-pushed
the
fix/6211-model-normalize-native-prefixes
branch
from
April 10, 2026 06:33
9915548 to
c4f712c
Compare
Contributor
|
Merged via PR #7187. All 3 commits cherry-picked with your authorship preserved. Thorough fix for the prefix normalization — thanks! |
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.
What does this PR do?
Normalizes native provider-prefixed model IDs only when the prefix matches the active Hermes provider, and applies that same rule everywhere Hermes can send a direct-provider model unchanged: CLI startup,
AIAgentruntime initialization, fallback activation, and auxiliary routing (including vision/main-provider resolution).Related Issue
Fixes #6211
Supersedes the narrower direct-provider overlap in #6224 by covering both main runtime and auxiliary routing with the same active-provider-only rule
Related: #6242
Context: #5910 is already fixed separately in the current codebase
Separate env/pairing hardening is tracked in PR #6956
Type of Change
Changes Made
hermes_cli/model_normalize.pyas the shared normalization source for active-provider-only prefix strippingresolve_provider_client()returns the provider-native model slug it will actually sendrun_agent.pyto consume the resolved normalized model instead of keeping the raw prefixed config valueHow to Test
/Users/kennyxie/Documents/Code/clawspace/hermes-agent/.venv/bin/python -m pytest tests/hermes_cli/test_model_normalize.py -q/Users/kennyxie/Documents/Code/clawspace/hermes-agent/.venv/bin/python -m pytest tests/agent/test_auxiliary_named_custom_providers.py -q/Users/kennyxie/Documents/Code/clawspace/hermes-agent/.venv/bin/python -m pytest tests/run_agent/test_run_agent.py::TestProviderModelNormalization tests/run_agent/test_fallback_model.py::TestTryActivateFallback -qzai/glm-5.1and verify Hermes sends the native slugglm-5.1Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
/Users/kennyxie/Documents/Code/clawspace/hermes-agent/.venv/bin/python -m pytest tests/hermes_cli/test_model_normalize.py tests/agent/test_auxiliary_named_custom_providers.py tests/run_agent/test_run_agent.py::TestProviderModelNormalization tests/run_agent/test_fallback_model.py::TestTryActivateFallback -q→67 passed