Skip to content

Unable to use Devstral Small: error due to max tokens #926

@KTibow

Description

@KTibow

Some models (Devstral Small on Chutes, Mercury Coder, many more near the bottom of this list) have context lengths of 32k tokens. Since opencode always sets max tokens to 32k and sends more tokens as context, errors result:

Image

This is likely due to an incorrect context length in models.dev. opencode should adapt its request to use a shorter max tokens (in case the data is incorrect) and/or switch to using data from the models endpoint (always use correct data).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions