Repository navigation
Description
Summary
On the Provider API, POST /v1/chat/completions for deepseek/deepseek-v4.1-flash returns a one-token reasoning stub, while POST /v1/responses returns readable reasoning for the same model and client. POST /v1/messages returns reasoning for most turns but rejects a specific, ordinary message shape with HTTP 400 Invalid input at messages.N.content.
Expected behavior
With reasoning_effort: "max", the Chat Completions door returns reasoning text for this model, as the Responses door does. /v1/messages accepts the Anthropic-shaped multi-turn tool conversations described below.
Actual behavior
- Chat door: on 2026-11-25, the last day it carried this model, 76.4 percent of max-effort turns (n=4,148) reported
usage.reasoning_tokens = 1with no reasoning text. The Responses door returns reasoning on 58 to 99 percent of turns depending on answer length. - Messages door: 29 of 46 requests were rejected with 400
Invalid input at messages.N.content; every rejected request contains a usercontentarray with atextblock after atool_result, and none of the 17 accepted requests does. The same bodies were accepted by another Anthropic-compatible host 30,688 times.
Steps to reproduce
See the request shapes in the full report below. Chat: any OpenAI-compatible client with tools and reasoning_effort: "max" for this model. Messages: an Anthropic-shaped multi-turn tool conversation whose user turn carries a text block beside a tool result.
Command Code Version
Not the Command Code CLI; a third-party OpenAI-compatible client.
Operating System
Windows 11.
CommandCode Provider API: Chat Completions returns a one-token reasoning stub for DeepSeek V4.1 Flash, while Responses and Messages return reasoning
Prepared: 2026-12-04. Provider: CommandCode Provider API (https://api.commandcode.ai/provider/v1). Model: deepseek/deepseek-v4.1-flash.
1. Summary
On the Chat Completions door, a client that asks for maximum reasoning (reasoning_effort: "max") frequently receives usage.reasoning_tokens = 1 and no reasoning text at all — no reasoning field and no reasoning_content field with any characters. The same model, from the same client, on the same day, on the Responses door returns readable reasoning on most turns. On the Messages door the model returns reasoning too, but a share of otherwise ordinary requests is rejected with HTTP 400 invalid_request_error Invalid input at messages.3.content.
For the Chat stub we are asking for the supported parameters rather than claiming a cause. For the Messages-door 400 we have isolated the content shape from our own log: a user content array that carries a text block after a tool_result is rejected on this host, while the same bodies are accepted by another Anthropic-compatible host. We are asking (a) whether the Chat door forwards reasoning_effort to the DeepSeek backend, (b) what parameter set is supported for maximum reasoning on each door, and (c) whether the mixed content shape is intentionally rejected on /v1/messages.
2. What was measured
All figures are aggregated counts from one client's request log: 67,030 requests to deepseek/deepseek-v4.1-flash between 2026-10-20 and 2026-12-03, sent by an agentic coding client in multi-turn, tool-heavy conversations (tools present on most turns; output length is typically 100–500 tokens on tool hops). The client has no access to your backend and made no changes to your service.
2.1 The stub signature, Chat door
Of Chat-door turns that requested reasoning_effort: "max" on the last day the Chat door carried this model (2026-11-25, n=4,148), 76.4 % reported exactly one reasoning token and zero reasoning text. The remaining 23.6 % carried thinking normally.
| month | door | turns | thinking text present | reasoning_tokens = 1, no text |
|---|---|---|---|---|
| 2026-10 | Chat | 41,557 | 62.0 % | 4.1 % |
| 2026-11 | Chat | 24,418 | 40.8 % | 45.2 % |
| 2026-12 | Responses | 728 | 41.1 % | 0.0 % |
The stub is therefore a Chat-door behaviour of this host and it worsened between October and November. It is not visible on the Responses door at any point.
2.2 Same model, same day, two doors
On 2026-11-25 the client switched this model from /v1/chat/completions to /v1/responses at 17:00 UTC. Matching the two doors on the same calendar day and the same answer-length buckets:
| output tokens | Chat door (before the switch) | Responses door (after) |
|---|---|---|
| 101–250 | 9 % (n=1,283) | 58 % (n=210) |
| 251–500 | 42 % (n=678) | 85 % (n=239) |
| 501–1000 | 46 % (n=385) | 95 % (n=157) |
| 1001–2000 | 62 % (n=172) | 98 % (n=84) |
| 2001+ | 91 % (n=322) | 99 % (n=67) |
Percentages are the share of successful turns whose reply carried non-empty reasoning text.
2.3 The effort value is honoured on the Responses door
On the Responses door, within one client version era and one length bucket, max and high separate cleanly:
| output tokens 101–250 | reasoning.effort: "high" |
reasoning.effort: "max" |
|---|---|---|
| reasoning present | 22.9 % (n=297, 95 % CI 18.5–28.0) | 67.4 % (n=873, 95 % CI 64.2–70.4) |
The confidence intervals do not overlap. So on this host the model does respond to the effort value — on the Responses door. On the Chat door, in the era-controlled comparison, the effort value does not raise the reasoning rate at all (at 101–250 output tokens in October: low 75.8 %, max 59.2 %, high 55.9 %; from 251 tokens up the three are statistically indistinguishable).
2.4 The request was unchanged when the behaviour changed
The Chat-door outbound body is identical in shape in the good era and the bad era — 62–80 % reasoning on 2026-10-20…27 and 23–32 % on 2026-11-23…25 — with the same key set, the same {"reasoning_effort":"max"} object, the same stream and stream_options, and the same tool block. Only max_tokens differed on one credential in October. The reply changed; the request did not.
3. The Messages door returns reasoning, but rejects some requests
On 2026-12-04, between 11:41 and 11:49 UTC, the client sent 46 requests to POST /provider/v1/messages with model: "deepseek/deepseek-v4.1-flash" and an Anthropic-shaped body (see §4.3). 17 succeeded — 12 of them with non-empty reasoning text — and 29 were rejected with:
HTTP 400
{"type":"error","error":{"type":"invalid_request_error","message":"Invalid input at messages.3.content"}}
The rejected requests were ordinary multi-turn conversations of the same workload as the successful ones, sent minutes apart, from the same client, with the same body shape. The path names the fourth message in the array (messages[3]). The client is a coding agent, so message content at that position is typically a mix of text and tool-result blocks.
We have since isolated the shape. In all 29 rejections, the upstream path names the first user message whose content array carries a text block after a tool_result (indices 3 and 16 across requests, never a fixed slot); none of the 17 accepted requests contains that mix. The text block is a 12-character client acknowledgement (Tool loaded.) that our gateway forwards unchanged, and the array is legal Anthropic traffic: Anthropic combines consecutive same-role messages, and the same bodies were accepted by another Anthropic-compatible host 30,688 times in five weeks, with zero rejections of the shape. We are asking whether rejecting this shape is intended for deepseek-v4.1-flash, and whether it can be relaxed or documented.
4. Request shapes (credentials removed)
4.1 Chat Completions
{
"model": "deepseek/deepseek-v4.1-flash",
"stream": true,
"stream_options": { "include_usage": true },
"max_tokens": 65000,
"tools": [ "..." ],
"reasoning_effort": "max"
}Reply when the stub occurs: usage.reasoning_tokens = 1, choices[0].delta.content carries the answer, and no reasoning delta appears in any frame.
4.2 Responses
{
"model": "deepseek/deepseek-v4.1-flash",
"stream": true,
"max_output_tokens": 65000,
"tools": [ "..." ],
"reasoning": { "effort": "max", "summary": "auto" },
"include": ["reasoning.encrypted_content"],
"store": false
}4.3 Messages
{
"model": "deepseek/deepseek-v4.1-flash",
"stream": true,
"max_tokens": 65000,
"tools": [ "..." ],
"thinking": { "type": "enabled", "budget_tokens": 48616 },
"output_config": { "effort": "high" }
}(The client derives budget_tokens from max_tokens; DeepSeek documents that its own Anthropic-compatible endpoint ignores budget_tokens and reads output_config.effort, so the budget value is not load-bearing for us.)
No API keys, key labels, account identifiers, prompt text or session identifiers are included in this report.
5. What the documentation says
All quotes retrieved 2026-12-04.
From https://commandcode.ai/docs/provider (Provider API):
"Available for Claude models, and for GLM-5.3 Flash, Kimi K3 and DeepSeek V4.1 Flash."
"OpenAI and open models answer on
/v1/chat/completions, and most of them on/v1/responsesas well."
Each door is documented as following the corresponding third-party schema: the OpenAI Chat Completions schema for /chat/completions, the OpenAI Responses schema for /responses, and the Anthropic Messages schema for /messages.
The same page documents the invalid_request_error cases as endpoint mismatches, a bad request body, or malformed JSON — a content-level rejection inside a well-formed message array is not described.
The words reasoning, reasoning_effort, thinking, effort, output_config do not appear anywhere on that page (a negative check of the full page text, 2026-12-04). The only token-adjacent feature described is usage reporting: "Every endpoint emits token usage at the end of every stream."
So the documentation states that DeepSeek V4.1 Flash is served on all three doors and that each door follows the corresponding third-party schema, but says nothing about which reasoning field any door reads, which values are legal for this model, or what content shapes /v1/messages accepts.
6. Questions
- Does
POST /v1/chat/completionsforwardreasoning_effortto the DeepSeek backend fordeepseek/deepseek-v4.1-flash? If it is accepted but not forwarded, is that intentional? - Which reasoning parameter set is supported for this model on each door —
reasoning_efforton Chat,reasoning.efforton Responses,thinking+output_config.efforton Messages — and is there a supported way to request the maximum reasoning level? - Why would the same model, from the same client, on the same day, return reasoning on Responses (58 % at 101–250 output tokens) and a one-token stub on Chat (9 %)? Is the Chat door a different upstream path or a different inference profile for this model?
- On
/v1/messages, is a usercontentarray that carries atextblock after atool_resultaccepted fordeepseek-v4.1-flash? Our log shows 29/29 rejections at exactly that shape and zero rejections of the same bodies on another Anthropic-compatible host. If it is intentionally rejected, can it be documented; if not, can the validator be relaxed? - Does
/v1/messageshonour the Anthropic reasoning shape (thinkingandoutput_config.effort) for this model, and must signedthinkingblocks be replayed unchanged in multi-turn conversations? - Is there a recommended parameter set for a coding agent (tools present, many short turns) on each of the three doors?
7. Provenance and data handling
- One client's aggregated request log, read-only, 2026-08-10 to 2026-12-03 (927,823 requests and 944,121 attempts across all providers; 67,030 of them to this model on this host).
- The log records request shapes, usage counters, the presence and size of a reasoning channel, and the error body of failed attempts. It does not store prompt text in this report.
- These are observational counts, not a controlled experiment. They are offered as evidence that the doors differ, not as a diagnosis.
- Provider-side request IDs for the failed Messages-door calls are available on request. They are omitted here so that the document contains no account-linked identifiers.
- The queries that produced every number in §2 and §3 can be re-run and shared on request.
8. What would settle it
Any one of the following:
- a statement in the Provider API documentation of the reasoning parameter set per door and per model, and of any content restrictions on
/v1/messages; - confirmation that the Chat door does or does not forward
reasoning_effortfor DeepSeek models; - a minimal accepted
/v1/messagesbody fordeepseek-v4.1-flashwith tool use, against which we can diff ours; - or a note that these reasoning fields are deliberately ignored on this host, so that clients stop relying on them.
Prepared 2026-12-04.
Activity