Problem Description
Model switching fails when using Alibaba Cloud Dashscope Coding Plan models. The default model works perfectly, but switching to any other model via /model <model-name> results in authentication errors (401) or fallback to incorrect providers (OpenRouter).
Hermes Agent Version
Latest version as of April 24, 2026
Operating System
Windows with WSL2 (Ubuntu)
Steps to Reproduce
- Configure
config.yaml with an Alibaba Coding Plan model as default:
model:
default: kimi-k2.5
provider: alibaba_coding
api_key: sk-sp-***(your actual API key)
- The default model works correctly
- Attempt to switch to another model:
/model MiniMax-M2.5
- Error occurs - Hermes auto-resolves to
alibaba-coding-plan provider but fails
Expected Behavior
Switching models should use the same provider configuration as the default model, or respect the user-defined provider settings in config.yaml.
Actual Behavior
Hermes ignores the provider field in config.yaml for models and uses auto-resolution from models_dev_cache.json, which causes authentication failures.
Additional Relevant Information
.env configuration:
ALIBABA_CODING_PLAN_API_KEY=sk-sp-***(your actual API key)
Providers in models_dev_cache.json:
alibaba - endpoint: dashscope-intl.aliyuncs.com/compatible-mode/v1 (standard)
alibaba-coding-plan - endpoint: coding-intl.dashscope.aliyuncs.com/v1 (coding plan)
Model distribution:
- Models like
kimi-k2.5, MiniMax-M2.5, glm-5 are in alibaba-coding-plan
- Model
qwen3-coder-plus is in alibaba (standard)
Observed Errors
⚠️ API call failed (attempt 1/3): AuthenticationError [HTTP 401]
🔌 Provider: custom Model: kimi-k2.5
🌐 Endpoint: https://coding-intl.dashscope.aliyuncs.com/v1
📝 Error: HTTP 401: invalid access token or token expired
When using provider: alibaba-coding-plan:
⚠️ API call failed: HTTP 402
🔌 Provider: custom Model: kimi-k2.5
🌐 Endpoint: https://openrouter.ai/api/v1
Configurations Attempted (all failed)
provider: alibaba_coding - default works, switching fails
provider: alibaba-coding-plan - Hermes ignores and falls back to OpenRouter
provider: custom with base_url - endpoint correct but API key rejected
- Using aliases with
leo- prefix - "model not supported"
- Modifying
models_dev_cache.json - no effect
Hypothesis
Hermes has a provider auto-resolution system (step 4 in the precedence order) that overrides user configuration. When switching models, Hermes:
- Looks up the model in
models_dev_cache.json
- Finds the model belongs to
alibaba-coding-plan
- Ignores user-defined
provider in config.yaml
- Uses wrong provider or fails to read environment variables correctly
Problem Description
Model switching fails when using Alibaba Cloud Dashscope Coding Plan models. The default model works perfectly, but switching to any other model via
/model <model-name>results in authentication errors (401) or fallback to incorrect providers (OpenRouter).Hermes Agent Version
Latest version as of April 24, 2026
Operating System
Windows with WSL2 (Ubuntu)
Steps to Reproduce
config.yamlwith an Alibaba Coding Plan model as default:/model MiniMax-M2.5alibaba-coding-planprovider but failsExpected Behavior
Switching models should use the same provider configuration as the default model, or respect the user-defined provider settings in
config.yaml.Actual Behavior
Hermes ignores the
providerfield inconfig.yamlfor models and uses auto-resolution frommodels_dev_cache.json, which causes authentication failures.Additional Relevant Information
.env configuration:
Providers in models_dev_cache.json:
alibaba- endpoint:dashscope-intl.aliyuncs.com/compatible-mode/v1(standard)alibaba-coding-plan- endpoint:coding-intl.dashscope.aliyuncs.com/v1(coding plan)Model distribution:
kimi-k2.5,MiniMax-M2.5,glm-5are inalibaba-coding-planqwen3-coder-plusis inalibaba(standard)Observed Errors
When using
provider: alibaba-coding-plan:Configurations Attempted (all failed)
provider: alibaba_coding- default works, switching failsprovider: alibaba-coding-plan- Hermes ignores and falls back to OpenRouterprovider: customwithbase_url- endpoint correct but API key rejectedleo-prefix - "model not supported"models_dev_cache.json- no effectHypothesis
Hermes has a provider auto-resolution system (step 4 in the precedence order) that overrides user configuration. When switching models, Hermes:
models_dev_cache.jsonalibaba-coding-planproviderinconfig.yaml