anomalyco / anomalyco/opencode

[Bug]: deepseek-v4-flash max_tokens too large (384000 > 131072)

Open
#43,797 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Description

When using the deepseek-v4-flash model via OpenCode Go, all requests fail with the following error:400: max_tokens is too large: 384000. This model supports at most 131072 completion tokens.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or reproduction steps are named. Start by tracing the deepseek-v4-flash provider configuration and request construction, then reproduce the OpenCode Go request and verify that its max_tokens value is accepted by the model, up to 131072.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.