[PR #2996] [CLOSED] serve: "report_dropped_tool_calls": true names the cut tool calls a whole OpenAI answer leaves out (#211, opt-in) #4388

Closed
opened 2026-11-07 15:35:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2996
Author: @LostDakota
Created: 10/18/2026
Status: ❌ Closed

Base: main ← Head: serve-report-dropped-tool-calls


📝 Commits (1)

  • 506bdb0 serve: "report_dropped_tool_calls": true names the cut tool calls a whole OpenAI answer leaves out (#211, opt-in)

📊 Changes

3 files changed (+33 additions, -3 deletions)

View changed files

📝 docs/DETAILS.md (+5 -0)
📝 serve/server.py (+9 -3)
📝 serve/test_server.py (+19 -0)

📄 Description

What it changes

A whole (non-streamed) OpenAI answer that ends in the middle of a tool call leaves that call out (#211, fixed in 0.1.31 by #231), because many SDKs run any call that is present. That is right, but the client then can't tell an answer that lost a call apart from one that finished.

"report_dropped_tool_calls": true in strata-<model>.json adds strata_dropped_tool_calls to the message: the name and the argument length (in characters) of each call left out.

"strata_dropped_tool_calls": [{"name": "write_file", "arguments_chars": 4113}]

What it leaves alone

  • It is off by default. openai_collect builds the same message as before unless the switch is on, so the default answer is byte-identical.
  • Which calls are dropped doesn't change, and neither does finish_reason.
  • Streaming and the Anthropic API don't change.
  • The engine (CUDA, HIP, SYCL) isn't touched.

How I checked

  • serve/test_server.py: the existing test_collect_keeps_calls_whose_arguments_parse now also checks that the field is absent by default. The new test_collect_names_the_dropped_calls_when_asked checks the field for stop and length, and checks it is absent for tool_calls and when nothing was cut.
  • python -m unittest serve.test_server: 338 tests, OK (Linux, the project's .venv).
  • Not tested: a live server with the switch on.

🤖 Generated with Claude Code


🔄 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/2996 **Author:** [@LostDakota](https://github.com/LostDakota) **Created:** 10/18/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `serve-report-dropped-tool-calls` --- ### 📝 Commits (1) - [`506bdb0`](https://github.com/Niko1221/Strata/commit/506bdb0ce9523bb3c795c201f6e877d27a9d1ddc) serve: "report_dropped_tool_calls": true names the cut tool calls a whole OpenAI answer leaves out (#211, opt-in) ### 📊 Changes **3 files changed** (+33 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/DETAILS.md` (+5 -0) 📝 `serve/server.py` (+9 -3) 📝 `serve/test_server.py` (+19 -0) </details> ### 📄 Description ## What it changes A whole (non-streamed) OpenAI answer that ends in the middle of a tool call leaves that call out (#211, fixed in 0.1.31 by #231), because many SDKs run any call that is present. That is right, but the client then can't tell an answer that lost a call apart from one that finished. `"report_dropped_tool_calls": true` in `strata-<model>.json` adds `strata_dropped_tool_calls` to the message: the name and the argument length (in characters) of each call left out. ```json "strata_dropped_tool_calls": [{"name": "write_file", "arguments_chars": 4113}] ``` ## What it leaves alone - It is off by default. `openai_collect` builds the same message as before unless the switch is on, so the default answer is byte-identical. - Which calls are dropped doesn't change, and neither does `finish_reason`. - Streaming and the Anthropic API don't change. - The engine (CUDA, HIP, SYCL) isn't touched. ## How I checked - `serve/test_server.py`: the existing `test_collect_keeps_calls_whose_arguments_parse` now also checks that the field is absent by default. The new `test_collect_names_the_dropped_calls_when_asked` checks the field for `stop` and `length`, and checks it is absent for `tool_calls` and when nothing was cut. - `python -m unittest serve.test_server`: 338 tests, OK (Linux, the project's `.venv`). - Not tested: a live server with the switch on. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:35:21 +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#4388
No description provided.