From 81d623709b9e221fe28b5e98d01e21ac1480b895 Mon Sep 17 00:00:00 2001 From: Extra Small Date: Thu, 26 Mar 2026 07:07:37 -0700 Subject: [PATCH] fix: send empty object instead of null for bedrock tool input (#8121) Signed-off-by: Extra Small Signed-off-by: Douwe Osinga Co-authored-by: Douwe Osinga --- .github/workflows/publish-npm.yml | 2 +- crates/goose/src/providers/formats/bedrock.rs | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 1b9d5b26..1420d992 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -298,7 +298,7 @@ jobs: - name: Create Release Pull Request or Publish to npm if: inputs.dry-run != true && github.ref == 'refs/heads/main' id: changesets - uses: changesets/action@6d3568c53fbe1db6c1f9ab1c7fbf9092bc18627f # v1 + uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0 with: publish: pnpm run release version: pnpm run version diff --git a/crates/goose/src/providers/formats/bedrock.rs b/crates/goose/src/providers/formats/bedrock.rs index 5c9a9503..316395db 100644 --- a/crates/goose/src/providers/formats/bedrock.rs +++ b/crates/goose/src/providers/formats/bedrock.rs @@ -72,7 +72,7 @@ pub fn to_bedrock_message_content(content: &MessageContent) -> Result Result Result { )) } +fn args_to_value(args: Option>) -> Value { + match args { + Some(map) => Value::Object(map), + None => Value::Object(serde_json::Map::new()), + } +} + pub fn to_bedrock_json(value: &Value) -> Document { match value { Value::Null => Document::Null,