dbx/crates
jischeng c6719eec55
fix(ai): preserve tool name when OpenAI-compatible provider re-sends empty id (#2196)
GLM-5.2 (and potentially other OpenAI-compatible providers) send id="" on
every tool-call delta after the first, while only the first delta carries
function.name. The streaming parser treated Some("") as a valid id and
emitted ToolCallStart for every chunk; the accumulator's insert then
overwrote the previously-correct name with "", producing "Unknown tool:"
errors and trapping the agent in a retry loop until the 30-turn limit.

Two fixes, mutually reinforcing:

1. OpenAI parser: only treat a non-empty id as a genuine tool-call start
   (filter out id=""), so subsequent deltas no longer trigger ToolCallStart.

2. Accumulator: merge ToolCallStart into an existing entry instead of
   blind insert — keep the known name when the new one is empty, and
   preserve accumulated arguments. Defense in depth for any other provider
   that re-sends id or splits name across chunks.

Added a regression test that feeds a re-sent ToolCallStart with an empty
name and asserts the name and arguments survive.

Verified end-to-end with the real GLM-5.2 provider: Unknown tool count
dropped from 12+ to 0, and the agent completed in 3 turns instead of
hitting the 30-turn safety limit.
2026-06-30 19:52:43 +08:00
..
dbx-core fix(ai): preserve tool name when OpenAI-compatible provider re-sends empty id (#2196) 2026-06-30 19:52:43 +08:00
dbx-web feat(kafka): support Kafka MQ admin client 2026-06-30 17:01:24 +08:00
README.md docs(repo): add directory readmes 2026-05-18 02:50:50 +08:00

README.md

Crates

Rust crates for DBX live here.

Directories

  • dbx-core/ - shared database core, drivers, schema/query logic, import/export, transfer, and plugin support.
  • dbx-web/ - the Docker/web backend service binary published as dbx-web.

The workspace root is defined in the repository-level Cargo.toml.