You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] reasoning_content "invalid_request" on follow-up messages with OpenCodeZen DeepSeek-V4-Flash in thinking mode #41061
Description
When using OpenCodeZen's DeepSeek-V4-Flash with thinking mode enabled, sending a follow-up message within the same session intermittently fails with:
Error from provider (Console): Upstream request failed: [invalid_request_error]
The reasoning_content in the thinking mode must be passed back to the API.
The error breaks tool invocations and upstream requests, interrupting the conversation until the session is restarted.
Steps to reproduce
Create a new session with OpenCodeZen's DeepSeek-V4-Flash with thinking mode enabled.
First message works fine.
Send a second (follow-up) message in the same session while reasoning output is present in the history.
The error triggers and the conversation is interrupted.
Expected vs actual
Expected: reasoning_content from history is passed back to the API correctly, or the client omits stale/empty reasoning fields.
Actual: Request rejected with invalid_request_error; upstream request fails.
Environment
Official DeepSeek API does NOT exhibit this issue with the same model — the problem appears specific to the OpenCodeZen gateway's handling of reasoning_content.
Restarting the session temporarily resolves it, but it reproduces again afterward.
changed the title [-][Bug] reasoning_content must be passed back to the API on Console provider (thinking mode)[/-][+][Bug] reasoning_content "invalid_request" on follow-up messages with OpenCodeZen DeepSeek-V4-Flash in thinking mode[/+]on Aug 7, 2026
Activity
github-actions commentedon Aug 7, 2026
This issue might be a duplicate of existing issues. Please check:
reasoning_contentnot being preserved/passed correctly in thinking mode, leading to upstream API errors during multi-turn or tool-call sessions.[-][Bug] reasoning_content must be passed back to the API on Console provider (thinking mode)[/-][+][Bug] reasoning_content "invalid_request" on follow-up messages with OpenCodeZen DeepSeek-V4-Flash in thinking mode[/+]github-actions commentedon Oct 8, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.