Anthropic and Gemini APIs require ALL tool_result blocks for a given assistant message to be in a SINGLE user message that immediately follows the assistant message. Previously, each tool AiMessage was converted to a separate user message, causing Anthropic to reject multi-turn tool conversations with 'tool_result must follow a tool_use block' error. Fix: collect consecutive 'tool' role messages into a buffer, then flush as a single user message with all tool_result/functionResponse blocks when a non-tool message is encountered or at end of message list. - Claude: merge N tool results into 1 user message with N content blocks - Gemini: merge N tool results into 1 user message with N functionResponse parts - OpenAI path unchanged (each tool message already has tool_call_id field)
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 asdbx-web.
The workspace root is defined in the repository-level Cargo.toml.