Pull requests / #2996
#2996 serve: "report_dropped_tool_calls": true names the cut tool calls a whole OpenAI answer leaves out (#211, opt-in)
open · @LostDakota · 0 comentarios · En GitHub
Server & APIAMD / HIPNVIDIA / CUDALinux
Descripción
## 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)
En el sitio
Enlaces a install, modelos, releases.