Skip to content

[Bug]: custom anthropic_messages providers can rewrite model names by replacing '.' with '-' #16417

@gfzhx

Description

@gfzhx

Bug Description

When using a custom provider with the anthropic_messages protocol, Hermes can rewrite the configured model name by replacing . with -.

This affects custom Anthropic-compatible endpoints that expect the model ID exactly as configured by the user.

Examples:

  • claude-sonnet-4.6claude-sonnet-4-6
  • glm-4.7glm-4-7
  • qwen3.5-plusqwen3-5-plus

Steps to Reproduce

  1. Configure a custom provider that uses an Anthropic-compatible endpoint.
  2. Set its API mode / transport to anthropic_messages.
  3. Configure a model name containing dots, such as claude-sonnet-4.6.
  4. Send a request through Hermes.
  5. Observe that the outgoing model name is rewritten with . replaced by -.

Expected Behavior

For custom providers, Hermes should send the configured model name unchanged.

If the configured model is claude-sonnet-4.6, the request should use claude-sonnet-4.6.

Actual Behavior

On the anthropic_messages path, Hermes can rewrite the model name before sending the request, replacing dots with hyphens.

As a result, custom endpoints may receive a different model ID than the one configured by the user.

Affected Component

  • Configuration (config.yaml, .env, hermes setup)
  • Agent Core (conversation loop, provider/runtime handling)

Messaging Platform (if gateway-related)

  • N/A (CLI only)

Debug Report

Not attached yet. This was identified from source analysis and behavior inspection rather than a runtime crash. I can provide a debug report if needed.

Operating System

  • macOS

Python Version

  • Python 3.12.12

Hermes Version

  • Hermes Agent v0.11.0 (2026.4.23)

Additional Logs / Traceback (optional)

No traceback. This appears to be a model-name normalization behavior issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/configConfig system, migrations, profilescomp/agentCore agent loop, run_agent.py, prompt buildertype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions