mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-27 22:06:31 +02:00
Bedrock's Converse API returns HTTP 400 with "toolConfig field must be defined when using toolUse and toolResult content blocks" whenever the message history contains toolUse or toolResult blocks but toolConfig is absent from the request. The /btw side-chat sends the frozen main transcript as context with no tools defined. If the main conversation included tool calls the serialised messages will contain toolUse/toolResult blocks, triggering the 400. Fix: add bedrockMessagesHaveToolBlocks() to detect this case and, when req.Tools is empty but tool blocks are present in the history, inject a minimal stub toolConfig with an inert placeholder tool. Bedrock accepts the request and the stub can never be invoked since no tool_use stop reason can fire when the advertised tool list is effectively empty. |
||
|---|---|---|
| .. | ||
| agent | ||
| core | ||
| provider | ||
| tui | ||