Skip to content

MiMo and other Chinese OpenAI-compatible providers fail with 'Param Incorrect' #27675

@Fatty911

Description

@Fatty911

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

  1. Configure a MiMo provider in opencode.json
  2. Try to use any MiMo model
  3. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

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