GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: preserve empty reasoning_content for DeepSeek V4 thinking mode by heimoshuiyu · Pull Request #24146 · anomalyco/opencode

Conversation

@heimoshuiyu

@heimoshuiyu heimoshuiyu commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #24104
Closes #24097
Closes #24130
Closes #24124
Closes #24135
Closes #24114
Closes #24111
Closes #17523

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Problem: When using DeepSeek models (e.g. deepseek-v4-pro) with thinking mode enabled through the @ai-sdk/openai-compatible provider, multi-turn tool call chains fail with:

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

Root cause: DeepSeek's thinking mode can return reasoning_content: "" (empty string) on assistant messages within a tool call chain. This empty string is semantically meaningful — DeepSeek requires it to be sent back verbatim in subsequent requests. However, it gets dropped at two points:

  1. AI SDK (@ai-sdk/openai-compatible): The response parser uses truthy checks (if (reasoningContent), reasoning.length > 0) that discard empty reasoning_content before it ever reaches opencode's storage layer. No reasoning part is created, so the database has no record that reasoning occurred.

  2. opencode (transform.ts): The interleaved transform uses if (reasoningText) — another truthy check — to decide whether to set the reasoning_content field in providerOptions. Even if a reasoning part existed with empty text, it would be dropped here.

Fix: Remove the if (reasoningText) guard in the interleaved transform. Always set providerOptions.openaiCompatible[field] for assistant messages. When reasoningText is empty, the AI SDK's ...metadata spread in convert-to-openai-compatible-chat-messages.ts still carries reasoning_content: "" into the outgoing request, bypassing its own reasoning.length > 0 discard. Single-location fix, no upstream changes needed.

AI SDK upstream context: The same issue was identified in @ai-sdk/deepseek and a fix is proposed in vercel/ai#13203, but that fix is provider-specific and does not cover @ai-sdk/openai-compatible.

Trigger conditions (not every request hits this):

  1. DeepSeek thinking mode enabled (thinking.type: "enabled")
  2. Multi-turn tool call chain (assistant → tool → assistant → tool → ...)
  3. An assistant message in the chain returns reasoning_content: "" (e.g. reasoning_tokens: 0)
  4. That message is included in the next request's message history

How did you verify your code works?

  • All 135 existing tests in test/provider/transform.test.ts pass with the change
  • bun typecheck passes
  • Scoped to models with interleaved: { field: "reasoning_content" } only

Screenshots / recordings

N/A — no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

NightingaleCen, mike1858, and SuperKenVery reacted with heart emoji
All reactions
  • ❤️ 3 reactions
@heimoshuiyu
fix: preserve empty reasoning_content in interleaved transform
931e6ed
DeepSeek thinking mode may return empty reasoning_content on assistant
messages in a tool call chain, which must be sent back in subsequent
requests. The interleaved transform's truthy check was dropping it.

Always set providerOptions.openaiCompatible[field] for assistant
messages so the AI SDK's metadata spread carries it through.
@github-actions github-actions Bot added the contributor label Apr 24, 2026
@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

Related PR:

  • PR fix(opencode): Error 400 missing reasoning_content – transform reasoning according to DeepSeek API and aditional test cases #17529: "fix(opencode): Error 400 missing reasoning_content – transform reasoning according to DeepSeek API and aditional test cases"
    • fix(opencode): Error 400 missing reasoning_content – transform reasoning according to DeepSeek API and aditional test cases #17529
    • This PR appears to address similar DeepSeek reasoning_content issues, though it's from an earlier effort

Why it might be related: Both PRs address the missing/empty reasoning_content problem with DeepSeek models. PR #17529 seems to be a predecessor attempt at handling reasoning transformation for DeepSeek API compatibility. However, PR #24146 (the current PR) specifically targets the empty string case in thinking mode within multi-turn tool call chains using the @ai-sdk/openai-compatible provider.

The current PR (#24146) is not a duplicate but represents a refined, targeted fix for a specific edge case that the earlier attempt may not have fully covered.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@heimoshuiyu

heimoshuiyu commented Apr 24, 2026

Copy link
Copy Markdown
Contributor Author

MITM of response from deepseek
image

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@simonklee
Merge branch 'dev' into fix/empty-reasoning-content
7f708c6
@github-actions github-actions Bot mentioned this pull request Apr 24, 2026
fix(transform): inject reasoning_content for ALL assistant msgs to fix DeepSeek thinking mode #24150
Closed
3 of 6 tasks
@simonklee
simonklee requested a review from rekram1-node April 24, 2026 11:09
@fkyah3 fkyah3 mentioned this pull request Apr 24, 2026
DeepSeek thinking mode: reasoning_content must be passed back to API on conversation continuation #24104
Closed
@rekram1-node
rekram1-node merged commit 923af96 into anomalyco:dev Apr 24, 2026
8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node

rekram1-node commented Apr 24, 2026

Copy link
Copy Markdown
Member

@heimoshuiyu very well done, thank you!

heimoshuiyu, devcxl, bilbillm, and mike1858 reacted with hooray emoji
All reactions
  • 🎉 4 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

XXUZZWZ
XXUZZWZ reviewed Apr 24, 2026
View reviewed changes

@XXUZZWZ XXUZZWZ left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hope this can update to 1.14.23

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kilo-code-bot kilo-code-bot Bot mentioned this pull request Apr 24, 2026
fix(cli): preserve empty reasoning_content in interleaved transform Kilo-Org/kilocode#9470
Merged
kilo-code-bot Bot pushed a commit to Kilo-Org/kilocode that referenced this pull request Apr 24, 2026
@heimoshuiyu @kilo-code-bot
fix(cli): preserve empty reasoning_content in interleaved transform
70d205d
DeepSeek thinking mode may return empty reasoning_content on assistant
messages in a tool call chain, which must be sent back in subsequent
requests. The interleaved transform's truthy check was dropping it.

Always set providerOptions.openaiCompatible[field] for assistant
messages so the AI SDK's metadata spread carries it through.

Cherry-picked from anomalyco/opencode#24146 (931e6ed).
kilo-code-bot Bot pushed a commit to Kilo-Org/kilocode that referenced this pull request Apr 24, 2026
@heimoshuiyu @kilo-code-bot
fix(cli): preserve empty reasoning_content in interleaved transform
439cba7
DeepSeek thinking mode may return empty reasoning_content on assistant
messages in a tool call chain, which must be sent back in subsequent
requests. The interleaved transform's truthy check was dropping it.

Always set providerOptions.openaiCompatible[field] for assistant
messages so the AI SDK's metadata spread carries it through.

Cherry-picked from anomalyco/opencode#24146 (931e6ed).
ihoooohi added a commit to ihoooohi/opencode that referenced this pull request Apr 24, 2026
@ihoooohi
fix: preserve empty reasoning_content for DeepSeek V4 in non-streamin…
9fbb8a4
…g and streaming paths

Three truthy checks were dropping empty reasoning_content ('') from DeepSeek
V4's thinking mode responses, causing 'must be passed back to the API' errors
in multi-turn tool call chains:

1. Non-streaming parser: if (reasoning != null && reasoning.length > 0)
   -> Now: if (reasoning != null) to preserve empty strings
2. Streaming parser: if (reasoningContent) truthy check
   -> Now: if ('reasoning_text' in delta) to detect field presence
3. Outbound converter: if (part.text) reasoningText = part.text
   -> Now: reasoningText = part.text ?? '' to preserve empty text

PR anomalyco#24146 fixed the transform.ts path; this completes the remaining cases.
This was referenced Apr 24, 2026
fix: preserve empty reasoning_content for DeepSeek V4 in non-streaming and streaming paths ihoooohi/opencode#1
Closed
fix: preserve empty reasoning_content for DeepSeek V4 in non-streaming and streaming paths ihoooohi/opencode#2
Closed
fix: preserve empty reasoning_content for DeepSeek V4 in non-streaming and streaming paths #24200
Closed
[DeepSeek V4] reasoning_content not round-tripped — 400 error on multi-turn tool calls #24190
Closed
@fkyah3 fkyah3 mentioned this pull request Apr 25, 2026
fix(provider): auto-enable interleaved for reasoning models #24218
Closed
3 of 6 tasks
@kobe2000

kobe2000 commented Apr 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Does this really work?

The same error in 1.14.24:

Bad Request: {"error":{"message":"The `content[].thinking` in the thinking mode must be passed back to the API.","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Apr 25, 2026
📊 AI CLI 工具社区动态日报 2026-04-25 borq168/radar-forge#13
Open
@XXUZZWZ

XXUZZWZ commented Apr 25, 2026 via email

Copy link
Copy Markdown
when I  update to 1.12.24,opencode not show this error in tooluse and thinking in 3 turns
…
---Original--- From: ***@***.***> Date: Sat, Apr 25, 2026 09:28 AM To: ***@***.***>; Cc: ***@***.******@***.***>; Subject: Re: [anomalyco/opencode] fix: preserve empty reasoning_content for DeepSeek V4 thinking mode (PR #24146) kobe2000 left a comment (anomalyco/opencode#24146) Does this really work? The same error in 1.12.24: Bad Request: {"error":{"message":"The `content[].thinking` in the thinking mode must be passed back to the API.","type":"invalid_request_error","param":null,"code":"invalid_request_error"}} — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: ***@***.***>
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node

rekram1-node commented Apr 25, 2026

Copy link
Copy Markdown
Member

idk how yall are hitting the api but these errors look like custom models or maybe openrouter

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

knefenk added a commit to knefenk/opencode that referenced this pull request Apr 25, 2026
@knefenk
fix(provider): complete DeepSeek reasoning_content round-trip for mul…
b6a7cdb
…ti-turn conversations

Fixes the two-layer bug where reasoning_content is dropped on conversation
replay for DeepSeek thinking mode and OpenRouter-routed DeepSeek models.

Three changes:

1. provider.ts: Auto-enable interleaved for reasoning models
   - When model.reasoning is true but interleaved is not explicitly set,
     default to { field: "reasoning_content" } instead of false
   - This triggers the interleaved transform that extracts reasoning
     and passes it via providerOptions

2. transform.ts: Use dynamic SDK key in interleaved transform
   - Replace hardcoded "openaiCompatible" with sdkKey(model.api.npm)
   - Fixes OpenRouter provider which expects "openrouter" key, not
     "openaiCompatible" (prevents key mismatch in providerOptions)

3. transform.ts: Inject reasoning_content for ALL assistant messages
   - New fallback transform fires when capabilities.reasoning is true
   - Sets reasoning_content: "" in providerOptions for every assistant
     message, including historical messages stored before reasoning mode
     was enabled (no reasoning part to extract from)
   - Also expands DeepSeek detection to check model.id in addition to
     model.api.id, covering OpenRouter-routed DeepSeek models

Closes anomalyco#24104
Related: anomalyco#24203 (OpenRouter users still affected by PR anomalyco#24218 alone)
Supersedes partial fix from PR anomalyco#24146 (merged but incomplete)
chiyuki0325 added a commit to chiyuki0325/Edelweiss that referenced this pull request Apr 25, 2026
@chiyuki0325
fix: preserve empty reasoning_content in interleaved transform
9f9784e
fix for deepseek v4

ref: anomalyco/opencode#24146
@claudianus claudianus mentioned this pull request Apr 26, 2026
fix: preserve existing reasoning_content on second interleaved pass (#24146 follow-up) #24428
Closed
@rekram1-node

rekram1-node commented Apr 26, 2026

Copy link
Copy Markdown
Member

Did a fix for openrouter just now their sdk had a bug so I bumped the pkg. will be in next release

heimoshuiyu reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Apr 26, 2026
DeepSeek V4: reasoning_content lost on second interleaved pass (regression from #24146) #24442
Closed
fix(provider): preserve reasoning_content on second interleaved pass (#24146 follow-up) #24443
Closed
@knefenk knefenk mentioned this pull request Apr 26, 2026
fix(provider): complete DeepSeek reasoning_content round-trip for multi-turn conversations #24250
Closed
8 of 11 tasks
@Astro-Han Astro-Han mentioned this pull request Apr 27, 2026
fix: preserve empty reasoning_content for DeepSeek V4 thinking mode Astro-Han/pawwork#261
Merged
7 tasks done
balcsida added a commit to balcsida/opencode that referenced this pull request Apr 28, 2026
@balcsida @kitlangton
@opencode-agent @Hona @Brendonovich @nexxeln @StevenTCramer @MrMushrooooom @gigamonster256 @rekram1-node opencode @fwang @simonklee @jlongster @1rgs rgs_ramp @heimoshuiyu @07akioni @kommander @altendky @b0o @thdxr @ariane-emory @jjjermiah @OpeOginni @github-actions @21pounder @SeashoreShi Seashore @CasualDeveloper
ci: add release-cli workflow (#1)
dd72fa5
* refactor(core): migrate MessageV2 internal Cursor to Effect Schema (anomalyco#23763)

* refactor(core): migrate MessageV2 errors to Schema-backed named errors (anomalyco#23764)

* chore: generate

* chore: bump Bun to 1.3.13 (anomalyco#23791)

* fix(app): improve icon override handling in project edit dialog (anomalyco#23768)

* chore: update nix node_modules hashes

* fix: preserve BOM in text tool round-trips (anomalyco#23797)

* chore: generate

* test: fix cross-spawn stderr race on Windows CI (anomalyco#23808)

* chore: generate

* fix: consolidate project avatar source logic (anomalyco#23819)

* fix(tui): fail fast on invalid session startup (anomalyco#23837)

* chore: generate

* fix(session): improve session compaction (anomalyco#23870)

* chore: generate

* fix(project): use git common dir for bare repo project cache (anomalyco#19054)

* docs: add MiMo V2.5 to Go pages (anomalyco#23876)

* chore: generate

* chore: update nix bun version (anomalyco#23881)

* feat: support pull diagnostics in the LSP client (C#, Kotlin, etc) (anomalyco#23771)

* chore: generate

* log session sdk errors (anomalyco#23652)

* fix(beta): PR resolvers/smoke check should typecheck all pacakges (anomalyco#23913)

* tweak: codex model logic (anomalyco#23925)

* refactor: remove redundant pending check from working memo (anomalyco#23929)

* sync release versions for v1.14.21

* zen: hy3 preview

* fix: add keyed prop to Show components for proper reactivity (anomalyco#23935)

* feat(project): add icon_url_override field to projects (anomalyco#23955)

* chore: generate

* chore: add to TEAM_MEMBERS (anomalyco#23975)

* fix(npm): respect npmrc config (anomalyco#24001)

* fix(tui): render all non-synthetic text parts of a user message (anomalyco#24009)

* refactor(session): migrate session domain to Effect Schema (anomalyco#24005)

* chore: generate

* sync release versions for v1.14.22

* fix(npm): respect npmrc for version lookups (anomalyco#24016)

* chore: generate

* refactor(sync): make session events schema-first (anomalyco#24019)

* chore: generate

* docs(schema): mark sync/index.ts migrated with compat-bridge note (anomalyco#24024)

* sync

* refactor(provider): migrate provider domain to Effect Schema (anomalyco#24027)

* refactor(schema): use Schema.Int and consolidate PositiveInt/NonNegativeInt (anomalyco#24029)

* refactor(bus): migrate BusEvent to Effect Schema (anomalyco#24040)

* chore: generate

* refactor(tool): migrate tool framework + all 18 built-in tools to Effect Schema (anomalyco#23244)

* chore: generate

* feat(tui): support builtin protocol for handling context from editors (anomalyco#24034)

* chore: generate

* docs: update effect schema migration tracker (anomalyco#24054)

* refactor(control-plane): migrate workspace DTO schemas (anomalyco#24056)

* chore: generate

* chore: update copilot readme to symlink to an agents md to prevent dumbass agents from touching these files (anomalyco#24057)

* fix: account for additional openai retry case (anomalyco#24063)

* feat(httpapi): bridge workspace read endpoints (anomalyco#24062)

* feat(truncate): allow configuring tool output truncation limits (anomalyco#23770)

Co-authored-by: rgs_ramp <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>

* chore: generate

* ci: add platform-specific bun install flags (anomalyco#23822)

* fix(desktop): avoid relaunching without installing updates (anomalyco#23806)

* chore: generate

* feat(prompt): add shell mode UI with cancel button, custom icon, and example placeholder (anomalyco#24105)

* sync

* zen: deepseek v4 pro

* fix(app): conditionally show model variant selector (anomalyco#24115)

* test(prompt): align shell placeholder expectation (anomalyco#24147)

* fix: deepseek variants (anomalyco#24157)

* fix: preserve empty reasoning_content for DeepSeek V4 thinking mode (anomalyco#24146)

Co-authored-by: Simon Klee <[email protected]>

* fix: support `max` for deepseek (anomalyco#24163)

* feat(httpapi): bridge file read endpoints (anomalyco#24098)

* sync release versions for v1.14.23

* feat(httpapi): bridge mcp status endpoint (anomalyco#24100)

* chore: generate

* fix: use existingModel as fallback for interleaved field (anomalyco#24172)

* fix: ensure assistant messages always have reasoning on them for deepseek (anomalyco#24180)

* Use OpenTUI theme detection for initial TUI mode, again (anomalyco#23846)

* chore: update nix node_modules hashes

* zen: deepseek v4 pro

* chore: generate

* sync release versions for v1.14.24

* zen: gpt-5.5

* zen: gpt-5.5

* zen: gpt-5.5

* zen: gpt-5.5

* Refactor HttpApi auth middleware wiring (anomalyco#24168)

* refactor(schema): decode effect schemas directly (anomalyco#24169)

* chore: generate

* Clarify HttpApi migration plan (anomalyco#24211)

* ignore: denounce ai spammer

* chore: generate

* fix: ensure gpt-5.5 compacts at correct context size when using openai oauth (anomalyco#24212)

* fix(opencode): clarify git amend condition to require verifying commit landed (anomalyco#19937)

Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Luke Parker <[email protected]>
Co-authored-by: Brendan Allan <[email protected]>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Shoubhit Dash <[email protected]>

* refactor(ripgrep): migrate result schemas to effect (anomalyco#24213)

* test(httpapi): cover hono bridge middleware (anomalyco#24216)

* chore: generate

* Add Roslyn support for Razor and C# scripts (anomalyco#24228)

* fix: validate beta before pushing (anomalyco#24230)

* chore: generate

* chore: group beta PR logs (anomalyco#24236)

* fix(build): add prettier to devDependencies (anomalyco#23255)

* chore: update nix node_modules hashes

* ci: adjust auto close issue script to use not planned instead of completed (anomalyco#24253)

* Fix shell cwd after login startup (anomalyco#24215)

* tool/lsp: include request details in permission metadata (anomalyco#24139)

* fix permission config order (anomalyco#24222)

* chore: generate

* ci: centralize opentui dependencies in workspace catalog

Use catalog references for @opentui/core, @opentui/solid, and opentui-spinner
across packages to ensure consistent versions and simplify updates.

* core: permission config schema now provides full IntelliSense for all tool permission keys

The permission configuration previously used a generic record type that didn't offer editor completions. Updated the schema to explicitly list all tool permission keys (read, edit, glob, grep, list, bash, task, external_directory, lsp, skill, todowrite, question, webfetch, websearch, codesearch, doom_loop) with proper types, enabling autocomplete when editing permission files.

* sync release versions for v1.14.25

* feat(httpapi): bridge instance read endpoints (anomalyco#24258)

* chore: generate

* refactor: remove lazy cross-spawn runtime (anomalyco#24305)

* refactor: rename shared package to core (anomalyco#24309)

* feat: add startup debug command (anomalyco#24310)

* chore: update nix node_modules hashes

* fix(config): preserve permission order with Effect decode (anomalyco#24308)

* core: consolidate shared infrastructure into core package

Moves effect logging, observability, runtime utilities, flags, installation
version info, and process utilities from opencode to core package. This
enables better code sharing across packages and establishes core as the
single source of truth for foundational utilities.

All internal imports updated to use @opencode-ai/core paths for consistency.

* chore: generate

* chore: update nix node_modules hashes

* ci: adjust review flow (anomalyco#24355)

* core: move Global module to @opencode-ai/core for centralized path management

Move the Global module from packages/opencode/src/global to packages/core/src/global
to provide a unified location for managing XDG directories and application paths.
This eliminates duplicate path definitions across packages and ensures consistent
access to data, config, cache, state, log, and bin directories throughout the codebase.

* feat(httpapi): bridge catalog read endpoints (anomalyco#24353)

* chore: generate

* feat(tui): read Zed editor context from state db (anomalyco#24352)

* feat(httpapi): bridge file search endpoints (anomalyco#24356)

* ci: fix model name

* chore: generate

* core: move cross-spawn-spawner from opencode to core package

Moved the cross-spawn-spawner module from packages/opencode to packages/core
to enable code sharing across the monorepo. This consolidates the process
spawning infrastructure into the core package so other packages can use
cross-platform child process spawning without duplicating the implementation.

Updated all import statements across the codebase to reference the new
location (@opencode-ai/core/effect/cross-spawn-spawner). Removed the
local copy from the opencode package along with its tests.

* core: move cross-spawn-spawner to root and remove unused types

The cross-spawn-spawner module has been moved from src/effect/ to src/
to simplify the core package structure. The src/types.d.ts file which
contained unused type declarations has also been removed. All imports
throughout the codebase have been updated to reflect the new location.

This change reduces the package's internal complexity by flattening the
module hierarchy and removing dead code, making future maintenance easier.

* core: move npm service to core package for shared dependency management

* feat(httpapi): bridge experimental read endpoints (anomalyco#24365)

* chore: generate

* chore: update nix node_modules hashes

* feat(httpapi): bridge worktree read endpoint (anomalyco#24366)

* chore: generate

* feat(tui): show /connect tip when user has no models configured (anomalyco#24014)

* feat(httpapi): bridge instance dispose endpoint (anomalyco#24368)

* chore: generate

* feat(httpapi): bridge worktree mutations (anomalyco#24371)

* chore: generate

* feat(httpapi): bridge config update endpoint (anomalyco#24387)

* feat(httpapi): bridge project git init endpoint (anomalyco#24394)

* chore: generate

* feat(httpapi): bridge project update endpoint (anomalyco#24398)

* feat(httpapi): bridge mcp control endpoints (anomalyco#24403)

* chore: generate

* feat(httpapi): bridge mcp oauth endpoints (anomalyco#24405)

* chore: generate

* feat(httpapi): bridge experimental tool routes (anomalyco#24407)

* chore: generate

* test(provider): avoid plugin dependency install timeout (anomalyco#24416)

* sync

* core: Add User-Agent header to identify client version in HTTP requests

* fix: bump openrouter sdk version to resolve deepseek reasoning issue (bug was in sdk pkg) (anomalyco#24435)

* chore: update nix node_modules hashes

* fix: correct typo in comment (anomalyco#24420)

* feat(httpapi): bridge experimental session list (anomalyco#24478)

* chore: generate

* feat(httpapi): bridge workspace mutations (anomalyco#24483)

* chore: generate

* fix(docs): correct OpenCode Go DeepSeek endpoints (anomalyco#24500)

* ci: update team assignments in github-triage

Update team member assignments in the triage tool:
- Remove thdxr from tui and core teams
- Add simonklee to tui team
- Add kitlangton to core team

* feat(httpapi): bridge sync routes (anomalyco#24484)

* chore: generate

* feat(httpapi): bridge session read routes (anomalyco#24485)

* chore: generate

* feat(httpapi): bridge session lifecycle routes (anomalyco#24486)

* chore: generate

* feat(httpapi): bridge session message mutations (anomalyco#24487)

* chore: generate

* feat(httpapi): bridge remaining session routes (anomalyco#24510)

* chore: generate

* sync

* sync

* chore: generate

* chore: rm empty file

* fix(editor): reject lock files with no workspace match for cwd (anomalyco#24323)

* feat(go): add Go model listing endpoint (anomalyco#24304)

Co-authored-by: Frank <[email protected]>

* upgrade opentui to 0.1.104 (anomalyco#24531)

* chore: update nix node_modules hashes

* sync release versions for v1.14.26

* fix(tui): update toast duration handling to use default value (anomalyco#23395)

Co-authored-by: Aiden Cline <[email protected]>

* tui: remove excessive debug logging from workspace creation flow to reduce terminal output noise

* feat(httpapi): bridge event stream (anomalyco#24518)

* chore: generate

* feat: configurable shell selection + desktop settings UI (anomalyco#20602)

* feat(httpapi): bridge pty routes (anomalyco#24547)

* core: refactor Installation service to use a single consolidated result object

Reorganizes the Installation service implementation by grouping info, method, latest, and upgrade methods into a single result object. This improves code locality and makes the service interface more maintainable. Also adds a clarifying comment explaining why the package manager's resolver is used for version lookups (to ensure registries, mirrors, auth, proxies, and dist-tags match upgrade behavior).

* feat(httpapi): bridge tui routes (anomalyco#24548)

* fix(tui): hide provider checks before onboarding (anomalyco#24551)

* upgrade opentui to 0.1.105 (anomalyco#24555)

* chore: update nix node_modules hashes

* sync release versions for v1.14.27

* go: models endpoint

* Update VOUCHED list

anomalyco#24563 (comment)

* fix: ignore GitHub Actions changelog contributor (anomalyco#24567)

* Refactor npm config handling (anomalyco#24565)

* go: add deepseek icon

* chore: generate

* sync release versions for v1.14.28

* fix: default tool call streaming to false for google vertex (anomalyco#24573)

* sync

* ignore: split up reasoning transforms (anomalyco#24574)

* update Go DeepSeek request estimates for cache pricing changes (anomalyco#24575)

* fix(opencode): agent create generates permissions field with deny ins… (anomalyco#24482)

Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>

* chore: generate

* zen: coupons

* chore: generate

* fix: pass workspace symbol query to experimental LSP tool (anomalyco#24576)

* chore: generate

* update Go DeepSeek flash limits for cache pricing drop (anomalyco#24592)

* docs: fix duplicated word in CLI env var table (anomalyco#24614)

Co-authored-by: Seashore <[email protected]>

* chore: generate

* tweak: make interleaved reasoning_content default to true for openai compat deepseek setups (anomalyco#24630)

* fix(httpapi): mount workspace bridge routes (anomalyco#24626)

* fix(httpapi): accept empty session create body (anomalyco#24640)

* refactor: remove module barrels (anomalyco#24554)

* chore: generate

* fix: ensure toolStreaming is set to off by default when using non anthropic models with anthropic sdk (anomalyco#24642)

* fix(tui): stabilize Zed editor context polling (anomalyco#24656)

* chore: generate

* fix(httpapi): enforce instance route parity (anomalyco#24660)

* feat(core): file context improvements and option to disable (anomalyco#24661)

* fix(tui): preserve Zed context on terminal focus (anomalyco#24662)

* test(httpapi): verify reflected route mounts (anomalyco#24663)

* chore: generate

* fix(tui): consume Enter in dialog useKeyboard handlers (anomalyco#23390)

* fix(session): harden shell cancellation (anomalyco#24553)

* test(httpapi): cover full OpenAPI route inventory (anomalyco#24667)

* chore: generate

* fix(httpapi): preserve optional session fields (anomalyco#24671)

* fix(session): omit undefined optional fields (anomalyco#24676)

* fix(session): remove compaction summary dividers (anomalyco#24677)

* test(httpapi): cover session json parity (anomalyco#24682)

* fix(httpapi): align session boolean query parsing (anomalyco#24693)

* chore: generate

* fix(httpapi): preserve provider oauth authorize parity (anomalyco#24703)

* chore: generate

* chore: bump effect beta (anomalyco#24705)

* chore: update nix node_modules hashes

* fix(tui): keep Zed context polling responsive (anomalyco#24711)

* fix(httpapi): preserve mcp oauth error parity (anomalyco#24706)

* chore: generate

* refactor(app): load sync state through TanStack Query (anomalyco#23792)

* fix: sanitize tools for moonshot (anomalyco#24730)

* chore: generate

* Update VOUCHED list

anomalyco#24732 (comment)

* fix(ui): remove redundant flex overrides in tool components (anomalyco#24749)

* ci: add release-cli workflow

---------

Co-authored-by: Kit Langton <[email protected]>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Luke Parker <[email protected]>
Co-authored-by: Brendan Allan <[email protected]>
Co-authored-by: Shoubhit Dash <[email protected]>
Co-authored-by: Steven T. Cramer <[email protected]>
Co-authored-by: Jack <[email protected]>
Co-authored-by: Caleb Norton <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: opencode <[email protected]>
Co-authored-by: Frank <[email protected]>
Co-authored-by: Simon Klee <[email protected]>
Co-authored-by: James Long <[email protected]>
Co-authored-by: rahul <[email protected]>
Co-authored-by: rgs_ramp <[email protected]>
Co-authored-by: 黑墨水鱼 <[email protected]>
Co-authored-by: 07akioni <[email protected]>
Co-authored-by: Sebastian <[email protected]>
Co-authored-by: Kyle Altendorf <[email protected]>
Co-authored-by: Maddison Hellstrom <[email protected]>
Co-authored-by: Dax <[email protected]>
Co-authored-by: Dax Raad <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Ariane Emory <[email protected]>
Co-authored-by: Jermiah Joseph <[email protected]>
Co-authored-by: OpeOginni <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 21pounder <[email protected]>
Co-authored-by: Seashore Shi <[email protected]>
Co-authored-by: Seashore <[email protected]>
Co-authored-by: Cas <[email protected]>
@dixoxib dixoxib mentioned this pull request Apr 29, 2026
fix(opencode): Error 400 missing reasoning_content – transform reasoning according to DeepSeek API and aditional test cases #17529
Closed
3 of 6 tasks
@shenshuoyaoyouguang shenshuoyaoyouguang mentioned this pull request May 16, 2026
fix: preserve reasoning_content for OpenAI-compatible providers router-for-me/CLIProxyAPI#3427
Closed
3 tasks done
jliounis pushed a commit to jliounis/kilocode that referenced this pull request May 18, 2026
@heimoshuiyu @kilo-code-bot
fix(cli): preserve empty reasoning_content in interleaved transform
9464740
DeepSeek thinking mode may return empty reasoning_content on assistant
messages in a tool call chain, which must be sent back in subsequent
requests. The interleaved transform's truthy check was dropping it.

Always set providerOptions.openaiCompatible[field] for assistant
messages so the AI SDK's metadata spread carries it through.

Cherry-picked from anomalyco/opencode#24146 (931e6ed).
@Astro-Han Astro-Han mentioned this pull request May 19, 2026
[Task] sync upstream opencode provider fixes (12 items, post-fork 2026-04-14) Astro-Han/pawwork#743
Closed
2 tasks
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
@heimoshuiyu @simonklee
fix: preserve empty reasoning_content for DeepSeek V4 thinking mode (a…
b12f045
…nomalyco#24146)

Co-authored-by: Simon Klee <[email protected]>
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
@heimoshuiyu @simonklee
fix: preserve empty reasoning_content for DeepSeek V4 thinking mode (a…
2cb58ca
…nomalyco#24146)

Co-authored-by: Simon Klee <[email protected]>
@Oxygen56 Oxygen56 mentioned this pull request Jun 24, 2026
In one session developing for awhile with DeepSeek-V4-Flash, received "all messages must have non-empty content" errors #31971
Closed
@bsbds bsbds mentioned this pull request Jun 25, 2026
fix(deepseek): preserve empty reasoning content xorbitsai/xagent#690
Merged
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
@heimoshuiyu @simonklee
fix: preserve empty reasoning_content for DeepSeek V4 thinking mode (…
5372b77
…#24146)

Co-authored-by: Simon Klee <[email protected]>
@coderabbitai coderabbitai Bot mentioned this pull request Aug 6, 2026
fix(agent-exploration): support DeepSeek thinking mode (reasoning_content) GhostXia/AIRP#502
Merged
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
@heimoshuiyu @kilo-code-bot
fix(cli): preserve empty reasoning_content in interleaved transform
2e920d7
DeepSeek thinking mode may return empty reasoning_content on assistant
messages in a tool call chain, which must be sent back in subsequent
requests. The interleaved transform's truthy check was dropping it.

Always set providerOptions.openaiCompatible[field] for assistant
messages so the AI SDK's metadata spread carries it through.

Cherry-picked from anomalyco/opencode#24146 (931e6ed).
@simensgreen simensgreen mentioned this pull request Aug 14, 2026
DeepSeek V4 thinking mode + tool_calls fails on custom OpenAI-compatible provider: reasoning_content is not round-tripped (400 "must be passed back to the API") vellum-ai/vellum-assistant#40691
Closed
@sam-saffron-jarvis sam-saffron-jarvis mentioned this pull request Oct 21, 2026
Preserve empty assistant reasoning for DeepSeek replay term-llm/term-llm#1260
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rekram1-node rekram1-node Awaiting requested review from rekram1-node
1 more reviewer
@XXUZZWZ XXUZZWZ XXUZZWZ left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Support DeepSeek V4 Thinking Mode with reasoning_content handling An error occurred when using the deepseek-v4-pro model DeepSeek thinking mode: reasoning_content must be passed back to API on conversation continuation deepseek-v4-pro model ID is not recognized as a thinking model, causing reasoning_content errors even with interleaved configured Missing reasoning_content field in the assistant message for DeepSeek API implementation
[Bug] DeepSeek V4 fails with 'reasoning_content must be passed back' error in multi-turn conversations DeepSeek V4 Flash: reasoning_content must be passed back to API when using thinking mode use DeepSeek v4 think show The reasoning_content in the thinking mode must be passed back to the API.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@heimoshuiyu @rekram1-node @kobe2000 @XXUZZWZ @simonklee
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.