Skip to content

Bug: capabilities overridden for @ai-sdk/openai-compatible providers #22036

@Claud

Description

@Claud

Description

Description

When using a custom provider with @ai-sdk/openai-compatible, explicitly defined model capabilities are ignored and replaced with default values.

Other fields (family, release_date, limit, variants) are preserved correctly.

Notes

  • This only happens for @ai-sdk/openai-compatible
  • Same models via other providers (e.g. OpenRouter / Anthropic) correctly preserve capabilities
  • Looks like capabilities are being normalized/overridden internally

Related

#21627

Plugins

No response

OpenCode version

1.4.3

Steps to reproduce

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "omniroute": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "http://localhost:20128/v1"
      },
      "models": {
        "minimax/minimax-m2.7": {
          "name": "minimax-m2.7",
          "family": "minimax",
          "release_date": "2026-03-18",
          "capabilities": {
            "reasoning": true,
            "temperature": true,
            "attachment": true
          }
        }
      }
    }
  }
}

Run:

opencode-cli models omniroute --verbose

Actual

"capabilities": {
  "temperature": false,
  "reasoning": false,
  "attachment": false
}

Expected

"capabilities": {
  "temperature": true,
  "reasoning": true,
  "attachment": true
}

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)windows

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