anomalyco / anomalyco/opencode

DeepSeek V4 output limit is capped at 32K

Open
#38,236 2 comments 1 reaction 1 assignee View on GitHub

@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
  1. Configure a DeepSeek V4 model with its models.dev output limit.
  2. Start a request without setting OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX.
  3. 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

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.