fix(models): preserve model tags for aggregator providers during normalisation#6088
Closed
edmundman wants to merge 1 commit into
Closed
fix(models): preserve model tags for aggregator providers during normalisation#6088edmundman wants to merge 1 commit into
edmundman wants to merge 1 commit into
Conversation
Safely convert legacy 'vendor:model' format to 'vendor/model', preserving provider tags.
teknium1
added a commit
that referenced
this pull request
Apr 9, 2026
…t) during model switch Step c in switch_model() blindly converted the first colon to a slash for aggregator providers, even when the model name already contained a slash (vendor/model format). This mangled variant tags like :free into /free, causing 400 Bad Request from the API. Fix: skip the colon→slash conversion when the model already has a slash, since the colon is a variant tag, not a vendor separator. The module docstring already documented this intent (line 17-18) but the implementation didn't enforce it. Reported via Discord. Related to PR #6088 (which identified the same bug but placed the fix in model_normalize.py instead of model_switch.py where the actual mangling occurs).
teknium1
added a commit
that referenced
this pull request
Apr 9, 2026
…t) during model switch (#6383) Step c in switch_model() blindly converted the first colon to a slash for aggregator providers, even when the model name already contained a slash (vendor/model format). This mangled variant tags like :free into /free, causing 400 Bad Request from the API. Fix: skip the colon→slash conversion when the model already has a slash, since the colon is a variant tag, not a vendor separator. The module docstring already documented this intent (line 17-18) but the implementation didn't enforce it. Reported via Discord. Related to PR #6088 (which identified the same bug but placed the fix in model_normalize.py instead of model_switch.py where the actual mangling occurs).
Contributor
|
Thanks for identifying this bug, @edmundman! The root cause was in Fixed in PR #6383 with a one-line guard: skip colon→slash conversion when the model already contains a |
Tommyeds
pushed a commit
to Tommyeds/hermes-agent
that referenced
this pull request
Apr 12, 2026
…t) during model switch (NousResearch#6383) Step c in switch_model() blindly converted the first colon to a slash for aggregator providers, even when the model name already contained a slash (vendor/model format). This mangled variant tags like :free into /free, causing 400 Bad Request from the API. Fix: skip the colon→slash conversion when the model already has a slash, since the colon is a variant tag, not a vendor separator. The module docstring already documented this intent (line 17-18) but the implementation didn't enforce it. Reported via Discord. Related to PR NousResearch#6088 (which identified the same bug but placed the fix in model_normalize.py instead of model_switch.py where the actual mangling occurs).
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
…t) during model switch (NousResearch#6383) Step c in switch_model() blindly converted the first colon to a slash for aggregator providers, even when the model name already contained a slash (vendor/model format). This mangled variant tags like :free into /free, causing 400 Bad Request from the API. Fix: skip the colon→slash conversion when the model already has a slash, since the colon is a variant tag, not a vendor separator. The module docstring already documented this intent (line 17-18) but the implementation didn't enforce it. Reported via Discord. Related to PR NousResearch#6088 (which identified the same bug but placed the fix in model_normalize.py instead of model_switch.py where the actual mangling occurs).
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 28, 2026
…t) during model switch Step c in switch_model() blindly converted the first colon to a slash for aggregator providers, even when the model name already contained a slash (vendor/model format). This mangled variant tags like :free into /free, causing 400 Bad Request from the API. Fix: skip the colon→slash conversion when the model already has a slash, since the colon is a variant tag, not a vendor separator. The module docstring already documented this intent (line 17-18) but the implementation didn't enforce it. Reported via Discord. Related to PR NousResearch#6088 (which identified the same bug but placed the fix in model_normalize.py instead of model_switch.py where the actual mangling occurs).
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…t) during model switch (NousResearch#6383) Step c in switch_model() blindly converted the first colon to a slash for aggregator providers, even when the model name already contained a slash (vendor/model format). This mangled variant tags like :free into /free, causing 400 Bad Request from the API. Fix: skip the colon→slash conversion when the model already has a slash, since the colon is a variant tag, not a vendor separator. The module docstring already documented this intent (line 17-18) but the implementation didn't enforce it. Reported via Discord. Related to PR NousResearch#6088 (which identified the same bug but placed the fix in model_normalize.py instead of model_switch.py where the actual mangling occurs).
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
…t) during model switch (NousResearch#6383) Step c in switch_model() blindly converted the first colon to a slash for aggregator providers, even when the model name already contained a slash (vendor/model format). This mangled variant tags like :free into /free, causing 400 Bad Request from the API. Fix: skip the colon→slash conversion when the model already has a slash, since the colon is a variant tag, not a vendor separator. The module docstring already documented this intent (line 17-18) but the implementation didn't enforce it. Reported via Discord. Related to PR NousResearch#6088 (which identified the same bug but placed the fix in model_normalize.py instead of model_switch.py where the actual mangling occurs).
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…t) during model switch (NousResearch#6383) Step c in switch_model() blindly converted the first colon to a slash for aggregator providers, even when the model name already contained a slash (vendor/model format). This mangled variant tags like :free into /free, causing 400 Bad Request from the API. Fix: skip the colon→slash conversion when the model already has a slash, since the colon is a variant tag, not a vendor separator. The module docstring already documented this intent (line 17-18) but the implementation didn't enforce it. Reported via Discord. Related to PR NousResearch#6088 (which identified the same bug but placed the fix in model_normalize.py instead of model_switch.py where the actual mangling occurs).
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…t) during model switch (NousResearch#6383) Step c in switch_model() blindly converted the first colon to a slash for aggregator providers, even when the model name already contained a slash (vendor/model format). This mangled variant tags like :free into /free, causing 400 Bad Request from the API. Fix: skip the colon→slash conversion when the model already has a slash, since the colon is a variant tag, not a vendor separator. The module docstring already documented this intent (line 17-18) but the implementation didn't enforce it. Reported via Discord. Related to PR NousResearch#6088 (which identified the same bug but placed the fix in model_normalize.py instead of model_switch.py where the actual mangling occurs).
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.
Previously, the model normalization logic indiscriminately replaced
:with/for aggregator providers (like OpenRouter). This broke valid model IDs that already followed thevendor/modelslug format but included a version or tier tag, such asnvidia/nemotron-3-super-120b-a12b:free. The logic incorrectly converted the tag to.../free, resulting in a 400 Bad Request error from the API. As can be seen in this issue : https://discord.com/channels/1053877538025386074/1491347485728313354This commit updates
normalize_model_for_providerinhermes_cli/model_normalize.py. It now safely converts legacyvendor:modelinputs to the requiredvendor/modelformat ONLY if a forward slash (/) is not already present in the string, ensuring that provider-specific trailing tags remain intact.