Files
DeepTutor/deeptutor
Jinguang Gu 62b05fe6bb fix(llm): fall back on DeepSeek reasoning-replay 400s from Responses turns (#1195)
DeepSeek V4 thinking models (v4-flash, v4-pro) served through the
Responses API reject continuation requests whose input is missing the
prior assistant turn's reasoning item:

    The reasoning_text in the thinking mode must be passed back to the API.

Histories persisted before reasoning items were stored (or reused after
a provider/model switch) cannot satisfy the replay, and because the
error text matched none of the existing markers in
_should_fallback_from_responses_error, callers received a hard failure
instead of the existing Chat Completions degradation.

Add reasoning_text / reasoning_content / passed back / thinking mode as
recognized fallback markers. The Chat Completions path already sends
`thinking: disabled` for deepseek-v4-flash (#1058), so the fallback is
safe and preserves the turn; the circuit breaker then stops retrying the
Responses path for the probe interval.

Context: #1048, #1175.
2026-09-03 14:56:17 +08:00
..
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-08-30 12:10:26 -04:00
2026-04-23 19:29:16 +08:00
2026-08-19 17:34:52 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-04-23 19:29:16 +08:00
2026-09-03 01:38:54 +08:00