Skip to content

[BUG]: codestral, pixtral, mixtral skip Mistral tool call transform (has fix) #16636

@tobwen

Description

@tobwen

Description

When using codestral, pixtral, or mixtral via a custom @ai-sdk/openai-compatible endpoint, tool call IDs are not normalized to Mistral's required 9-character alphanumeric format, causing API errors. PR #2440 added this for @ai-sdk/mistral and devstral but missed these three.

Plugins

none

OpenCode version

v1.2.21, dev

Steps to reproduce

  1. Configure a custom provider in opencode.json using @ai-sdk/openai-compatible with a model ID containing codestral, pixtral, or mixtral
  2. Start a session and trigger a tool call
  3. Observe API error due to invalid tool call ID format

Screenshot and/or share link

No response

Operating System

Debian Linux (Trixie, 64-bit)

Terminal

PuTTY

Metadata

Metadata

Assignees

Labels

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

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