Skip to content

Bug: opencode-zen incorrectly converts dots to hyphens in model names #7421

@Hypn0sis

Description

@Hypn0sis

Description

When using opencode-zen provider with models like minimax-m2.5-free, the model name gets converted to minimax-m2-5-free (dots replaced with hyphens), which OpenCode doesn't support, returning 401 "Model not supported".

Root cause

opencode-zen was incorrectly included in _DOT_TO_HYPHEN_PROVIDERS in hermes_cli/model_normalize.py. This causes model names like minimax-m2.5-free to be transformed to minimax-m2-5-free before being sent to the API.

OpenCode accepts dots in model names (matching the native API format like minimax-m2.5-free), so this transformation breaks the integration.

Reproduction

  1. Set provider to opencode-zen in config.yaml
  2. Set model to minimax-m2.5-free
  3. Send any message via gateway
  4. Result: 401 "Model minimax-m2-5-free not supported"

Fix

Remove opencode-zen from _DOT_TO_HYPHEN_PROVIDERS in hermes_cli/model_normalize.py:

# Before
_DOT_TO_HYPHEN_PROVIDERS: frozenset[str] = frozenset({
    "anthropic",
    "opencode-zen",
})

# After  
_DOT_TO_HYPHEN_PROVIDERS: frozenset[str] = frozenset({
    "anthropic",
})

Tested

  • Direct API call with minimax-m2.5-free: 200 OK
  • Direct API call with minimax-m2-5-free: 401 "Model not supported"
  • After fix: Gateway works correctly with minimax-m2.5-free on opencode-zen

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/cliCLI entry point, hermes_cli/, setup wizardtype/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