anomalyco / anomalyco/opencode
DeepSeek V4 output limit is capped at 32K
Open
@rekram1-node is already working on this.
Since Jul 22, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
DeepSeek V4 models declare a 384K/393,216-token output limit, but ProviderTransform.maxOutputTokens() applies the global 32K default to every model. Requests therefore send 32K even though DeepSeek V4 advertises a much larger supported output budget.
DeepSeek V4 should use its positive model-declared output limit by default. Other model families should retain the existing 32K default, and an explicit OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX should remain authoritative.
Plugins
None
OpenCode version
1.18.4
Steps to reproduce
- Configure a DeepSeek V4 model with its models.dev output limit.
- Start a request without setting
OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX. - Observe that the request max output tokens is 32,000 instead of 384,000/393,216.
Screenshot and/or share link
No response
Operating System
macOS 26.5.2
Terminal
Terminal.app
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.