[PR #1314] [CLOSED] serve: keep unfinished tool calls visible as content #3375

Closed
opened 2026-11-07 14:41:02 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1314
Author: @Arthur031221
Created: 10/7/2026
Status: ❌ Closed

Base: main ← Head: serve-unfinished-call-text-20261007-reply3


📝 Commits (1)

  • 53890f9 serve: keep unfinished tool calls visible as content

📊 Changes

4 files changed (+105 additions, -4 deletions)

View changed files

📝 serve/frontend.py (+4 -2)
📝 serve/responses.py (+2 -0)
📝 serve/test_responses.py (+43 -0)
📝 serve/test_server.py (+56 -2)

📄 Description

Replaces #572 after the history cleanup. The original commit was cherry-picked onto the new main, with a follow-up for the Responses API.

When generation ends partway through an announced tool call, its buffered text is discarded. Return that text as content so clients can see the truncated call. Keep its streamed arguments incomplete. The Responses adapter also keeps function and custom calls marked incomplete when returning this text.

Added parser and HTTP regression tests for natural EOF and token limits. python -m unittest serve.test_server.UnfinishedToolCall serve.test_responses.ToolRoundTrip -q passes.

I used Claude/Codex to assist with preparing, checking and double-checking this change.

Co-authored-by: beatcollector 179996382+beatcollector@users.noreply.github.com


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1314 **Author:** [@Arthur031221](https://github.com/Arthur031221) **Created:** 10/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `serve-unfinished-call-text-20261007-reply3` --- ### 📝 Commits (1) - [`53890f9`](https://github.com/Niko1221/Strata/commit/53890f972f64199c89e070ca077abbc36cbe3d94) serve: keep unfinished tool calls visible as content ### 📊 Changes **4 files changed** (+105 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `serve/frontend.py` (+4 -2) 📝 `serve/responses.py` (+2 -0) 📝 `serve/test_responses.py` (+43 -0) 📝 `serve/test_server.py` (+56 -2) </details> ### 📄 Description Replaces #572 after the history cleanup. The original commit was cherry-picked onto the new main, with a follow-up for the Responses API. When generation ends partway through an announced tool call, its buffered text is discarded. Return that text as content so clients can see the truncated call. Keep its streamed arguments incomplete. The Responses adapter also keeps function and custom calls marked incomplete when returning this text. Added parser and HTTP regression tests for natural EOF and token limits. `python -m unittest serve.test_server.UnfinishedToolCall serve.test_responses.ToolRoundTrip -q` passes. I used Claude/Codex to assist with preparing, checking and double-checking this change. Co-authored-by: beatcollector <179996382+beatcollector@users.noreply.github.com> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:41:02 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3375
No description provided.