Skip to content

deepseek-v4-pro: no working reasoning-budget control (only all-or-nothing thinking) #89

Description

@justrach

Summary

On the OpenAI-compatible gateway (POST /v1/chat/completions) with deepseek-v4-pro, end-to-end latency is dominated by reasoning tokens, and there's no working way to get a bounded amount of reasoning. The only effective control is turning reasoning fully on or fully off — no middle setting.

What I measured

All via POST /v1/chat/completions, model: deepseek-v4-pro, standard OpenAI-compatible client.

  • Reasoning is the latency driver, not throughput. Streaming rate is ~90 tok/s (healthy). But the model emits hidden reasoning tokens before the answer:
    • simple prompt → ~149 reasoning tokens → ~4s
    • rich prompt → ~1000–1700 reasoning tokens (+ large output) → ~40s
  • Concurrency is fine (not the problem): 6 concurrent requests run in parallel — ~7s wall for light prompts, ~55s for heavy (serial would be ~240s). Per-key throughput is good; this is purely per-request reasoning cost.

The gap: no working reasoning-effort / budget knob

param tried result
thinking: { type: "disabled" } ✅ works — reasoning_tokens=0, ~2s replies
reasoning_effort: "minimal" ❌ HTTP 400 invalid_request_error — "Failed to deserialize the JSON body"
reasoning_effort: "low" ⚠️ accepted but ignored — reasoning tokens not reduced (sometimes higher)
reasoning: { effort: "low" } ⚠️ partial / inconsistent (~400 reasoning tokens, not reliably controllable)

So the only real choice is ~2s with zero reasoning (which hurts quality on logic / multi-constraint tasks) or ~40s with full reasoning. There's no "give me a small reasoning budget and cap latency" option in between.

Request

A documented, working reasoning-budget control for deepseek-v4-pro, e.g. one of:

  • reasoning: { max_tokens: N } — a hard cap on reasoning tokens, and/or
  • a real reasoning_effort: "minimal" | "low" | "medium" | "high" enum that actually scales reasoning (and doesn't 400 on "minimal").

This lets latency-sensitive apps trade a little reasoning for a lot of speed instead of the current all-or-nothing.

Environment

  • Endpoint: https://gateway.codegraff.com/v1/chat/completions
  • Model: deepseek-v4-pro
  • Auth: Bearer cg_sk_… (redacted)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions