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
- Set provider to
opencode-zen in config.yaml
- Set model to
minimax-m2.5-free
- Send any message via gateway
- 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
Description
When using opencode-zen provider with models like
minimax-m2.5-free, the model name gets converted tominimax-m2-5-free(dots replaced with hyphens), which OpenCode doesn't support, returning 401 "Model not supported".Root cause
opencode-zenwas incorrectly included in_DOT_TO_HYPHEN_PROVIDERSinhermes_cli/model_normalize.py. This causes model names likeminimax-m2.5-freeto be transformed tominimax-m2-5-freebefore 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
opencode-zenin config.yamlminimax-m2.5-freeFix
Remove
opencode-zenfrom_DOT_TO_HYPHEN_PROVIDERSinhermes_cli/model_normalize.py:Tested
minimax-m2.5-free: 200 OKminimax-m2-5-free: 401 "Model not supported"