Responses replay puts assistant text between function_call and function_call_output
メンテナーはふだん 1 日以内に返信
@tombeckenham がすでに取り組んでいます。
2026年10月15日 から。
評価
この issue はまだ評価されていません。
説明
TanStack AI version
@tanstack/ai0.68.0@tanstack/ai-openai0.29.1@tanstack/openai-base0.13.1
Provider / API
DeepSeek Responses API, called through TanStack's OpenAICompatibleResponsesAdapter at /responses.
Describe the bug and steps to reproduce it
When an assistant ModelMessage contains both non-empty text content and a function tool call, and the next ModelMessage contains the matching tool result, the shared Responses conversion currently serializes the assistant items in this order:
function_call
message (assistant text)
function_call_output
DeepSeek rejects this request with HTTP 400 and No tool output found for function call.
In a live A/B test using the same tool call and matching call_id, moving the assistant message before the function_call produced this order:
message (assistant text)
function_call
function_call_output
That request succeeded. The call_id and tool output were unchanged. This reproduces with reasoning enabled as well; changing the reasoning item's text representation did not change the result.
Expected behavior
The Responses adapter should avoid placing the assistant message between a function_call and its matching function_call_output, or expose a provider-specific way to choose this serialization order if the current order is intentional for other providers.
Additional context
This seems distinct from the reasoning/function-call replay ordering issue in #1345: here the intervening item is an assistant message, and DeepSeek reports that the corresponding tool output is missing.
The current workaround is a DeepSeek-specific subclass that calls super.convertMessagesToInput(messages), reorders the assistant message before function calls, and leaves the shared tool-output conversion intact.
- 主要言語
- TypeScript
- スター
- 3.2k
- フォーク
- 361
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 266
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/ai のほかの issue
-
Discriminate status-dependent record and option types (RunRecord, SessionIndexEntry, InputState, durable-only options)対応中かも @jherr が今日担当しました。 オープンenhancement waiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
ai-harness: an input with no principal runs with the owner session's principal対応中かも @tombeckenham が 1 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
ai-harness: a forwarded command completes with no result, also when the owner rejects it対応中かも @tombeckenham が 1 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
ai-harness: recovery runs a turn without the user message when the turn never started対応中かも @tombeckenham が 1 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
ai-mcp: modern tool calls omit x-mcp-header parameter headers in 0.9.0対応中かも @tombeckenham が 1 日前に担当しました。 オープンwaiting-on: maintainer
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commit対応中かも @myOmikron が今日担当しました。 オープンbug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
platform:windows tool triaged wontfix
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
nicolettas-muggelbude/RechnungsFee#448 ·
メンテナーはふだん 1 日以内に返信
-
Android bug feature/error-tracking react-native team/error-tracking
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PostHog/posthog-js#5310 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信