Dev.to
8/4/2026

The original title is: "DeepSeek V4 Flash API Cost: Thinking Mode Corrupts Strict JSON"
Original: DeepSeek V4 Flash API Cost: Thinking Mode Corrupts Strict JSON
Short summary
DeepSeek V4 Flash (0731 retrain) has a critical defect: with thinking mode on and strict json_schema, integer fields corrupt in 8 of 13 runs, returning schema-valid but numerically wrong JSON. The fix is enable_thinking: false, which produces correct output at 1/7th the tokens. The corruption spans the V4 thinking line (V4 Pro also affected), while the preview build stays clean. Until patched, treat thinking and strict structured output as mutually exclusive.
- •DeepSeek V4 Flash 0731 corrupts integer fields in 8/13 runs with thinking on + strict json_schema
- •Fix: enable_thinking: false — correct output at 1/7th the token cost
- •V4 Pro also affected (2/4 corrupted); only the preview build stays clean
- •Cache serves 1,024-token pages, hits at 0.3s, entries survive 45+ minutes
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



