Bug Description
When using OpenAI-compatible providers like MiMo, GLM, or Qwen, OpenCode forces for all providers. This translates to in the API request.
However, these providers do not support the parameter and return a 'Param Incorrect' error, making them completely unusable.
Affected Providers
- MiMo (api.xiaomimimo.com)
- Zhipu/GLM (open.bigmodel.cn)
- Alibaba/Qwen (dashscope.aliyuncs.com)
- Baidu/Qianfan (qianfan.baidubce.com)
- And others
Steps to Reproduce
- Configure a MiMo provider in opencode.json
- Try to use any MiMo model
- Error: 'Param Incorrect'
Expected Behavior
OpenCode should not force for providers that don't support .
Proposed Solution
Use URL host detection to identify incompatible providers and skip forcing for them, while maintaining backward compatibility for compatible providers.
Bug Description
When using OpenAI-compatible providers like MiMo, GLM, or Qwen, OpenCode forces for all providers. This translates to in the API request.
However, these providers do not support the parameter and return a 'Param Incorrect' error, making them completely unusable.
Affected Providers
Steps to Reproduce
Expected Behavior
OpenCode should not force for providers that don't support .
Proposed Solution
Use URL host detection to identify incompatible providers and skip forcing for them, while maintaining backward compatibility for compatible providers.