Bug Description
When Hermes is configured to use a custom Anthropic-compatible endpoint with api_mode: anthropic_messages, dotted GLM model ids can be rewritten incorrectly.
Example:
- configured model:
z-ai/glm-5.1
- actual model sent upstream:
z-ai/glm-5-1
This breaks providers/proxies that require the original dotted model id.
Steps to Reproduce
- Configure Hermes with a custom Anthropic-compatible proxy:
model:
provider: custom
default: z-ai/glm-5.1
base_url: https://<custom-proxy>/anthropic
api_mode: anthropic_messages
- Start Hermes gateway or CLI.
- Send a normal message.
- Inspect the upstream request / request dump.
Expected Behavior
Hermes should preserve the configured model id exactly as z-ai/glm-5.1 for this custom Anthropic-compatible proxy.
Actual Behavior
Hermes rewrites the model to z-ai/glm-5-1.
The upstream proxy then rejects the request. Example provider error:
No available channel for model z-ai/glm-5-1 under group Other (distributor)
A nearby model without a dotted version suffix works fine:
z-ai/glm-5-turbo works
z-ai/glm-5.1 fails because it is rewritten
Affected Component
- Agent Core (conversation loop, model routing)
- Configuration (
config.yaml, custom providers)
- Gateway (reproduced through gateway)
Debug Report
Report https://paste.rs/zsEZJ
agent.log https://paste.rs/3WZ9B
gateway.log https://paste.rs/boVOE
Operating System
Ubuntu 24.04
Python Version
3.11.15
Hermes Version
Hermes Agent v0.10.0 (2026.4.16)
Additional Logs / Traceback
Relevant request-dump symptom from local reproduction:
No available channel for model z-ai/glm-5-1 under group Other (distributor)
Root Cause Analysis
The current dot-preservation guard only preserves dotted model ids when Hermes can infer the upstream provider from:
provider being a known built-in provider such as zai, or
base_url containing provider-specific markers such as bigmodel.cn, dashscope, minimax, etc.
For opaque custom proxy domains, neither condition is true. As a result, the Anthropic model normalization path still converts dots to hyphens.
This is especially visible for GLM model ids like:
glm-4.7
glm-5.1
z-ai/glm-5.1
The bug is reproducible even after updating the local install to the latest origin/main on April 17, 2026.
Bug Description
When Hermes is configured to use a custom Anthropic-compatible endpoint with
api_mode: anthropic_messages, dotted GLM model ids can be rewritten incorrectly.Example:
z-ai/glm-5.1z-ai/glm-5-1This breaks providers/proxies that require the original dotted model id.
Steps to Reproduce
Expected Behavior
Hermes should preserve the configured model id exactly as
z-ai/glm-5.1for this custom Anthropic-compatible proxy.Actual Behavior
Hermes rewrites the model to
z-ai/glm-5-1.The upstream proxy then rejects the request. Example provider error:
A nearby model without a dotted version suffix works fine:
z-ai/glm-5-turboworksz-ai/glm-5.1fails because it is rewrittenAffected Component
config.yaml, custom providers)Debug Report
Report https://paste.rs/zsEZJ
agent.log https://paste.rs/3WZ9B
gateway.log https://paste.rs/boVOE
Operating System
Ubuntu 24.04
Python Version
3.11.15
Hermes Version
Hermes Agent v0.10.0 (2026.4.16)
Additional Logs / Traceback
Relevant request-dump symptom from local reproduction:
Root Cause Analysis
The current dot-preservation guard only preserves dotted model ids when Hermes can infer the upstream provider from:
providerbeing a known built-in provider such aszai, orbase_urlcontaining provider-specific markers such asbigmodel.cn,dashscope,minimax, etc.For opaque custom proxy domains, neither condition is true. As a result, the Anthropic model normalization path still converts dots to hyphens.
This is especially visible for GLM model ids like:
glm-4.7glm-5.1z-ai/glm-5.1The bug is reproducible even after updating the local install to the latest
origin/mainon April 17, 2026.