Responses replay puts assistant text between function_call and function_call_output
Maintainer thường phản hồi trong vòng 1 ngày
@tombeckenham đang làm issue này rồi.
Từ ngày 15/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.2k
- Fork
- 361
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 252
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/ai
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
Maintainer thường phản hồi trong vòng 1 ngày
-
move to modelschemasCó thể đã có người làm @jherr đã nhận hôm nay. Đang mởhas-pr waiting-on: maintainer
TanStack/ai#1788 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Text adapters fail chat()'s adapter constraint under exactOptionalPropertyTypes (midConversationChannels)Có thể đã có người làm @tombeckenham đã nhận 1 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1777 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chat(): sign the state of a suspended run so a resume without persistence cannot change itCó thể đã có người làm @AlemTuzlak đã nhận 2 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1740 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
@tanstack/ai-anthropic: a stream that fails after message_start loses the call's input usageCó thể đã có người làm @AlemTuzlak đã nhận 3 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1735 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
area:ui effort:S enhancement priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
QuantumNous/new-api#7839 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dark-princezz/stellar-hooks#1010 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
interledger/rhyza#352 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày