Problem
Multi-turn sessions against DeepSeek-family models served by direct OpenAI-compatible profiles (no OpenRouter provider features — e.g. OpenCode Zen, opencode.ai/zen/v1) fail on the second request with:
400 The `reasoning_content` in the thinking mode must be passed back to the API.
The endpoint runs server-managed thinking mode and requires the assistant reasoning_content to be replayed on follow-up requests. jcode stores it (stores_reasoning_content_for_context) but drops it at request-build time for these profiles, because reasoning passback is only unlocked when OpenRouter provider features are enabled or the endpoint is the Kimi coding endpoint (#322).
Repro
- Any model in the DeepSeek family (e.g.
deepseek-v4-flash-free on OpenCode Zen) via a direct OpenAI-compatible profile
- Start a session, let the model emit a tool call (which carries a stored reasoning block), then send a follow-up request
- 400 error above
Workaround (verified): set allow_provider_pinning = true on the named profile so provider features are treated as enabled, which unlocks the reasoning passback path.
Related
Problem
Multi-turn sessions against DeepSeek-family models served by direct OpenAI-compatible profiles (no OpenRouter provider features — e.g. OpenCode Zen,
opencode.ai/zen/v1) fail on the second request with:The endpoint runs server-managed thinking mode and requires the assistant
reasoning_contentto be replayed on follow-up requests. jcode stores it (stores_reasoning_content_for_context) but drops it at request-build time for these profiles, because reasoning passback is only unlocked when OpenRouter provider features are enabled or the endpoint is the Kimi coding endpoint (#322).Repro
deepseek-v4-flash-freeon OpenCode Zen) via a direct OpenAI-compatible profileWorkaround (verified): set
allow_provider_pinning = trueon the named profile so provider features are treated as enabled, which unlocks the reasoning passback path.Related