Skip to content

Conversation

@alexyao2015
Copy link
Contributor

@alexyao2015 alexyao2015 commented Oct 8, 2025

Summary

The todo extension added in #4868
causes errors with bedrock because bedrock expects an input schema.

Without this fix, bedrock tool calls fail with

Error: Server error: Failed to call Bedrock:
ValidationException(ValidationException { message: Some("The value at
toolConfig.tools.3.toolSpec.inputSchema.json.type must be one of the
following: object."), meta: ErrorMetadata { code:
Some("ValidationException"), message: Some("The value at
toolConfig.tools.3.toolSpec.inputSchema.json.type must be one of the
following: object."), extras: Some({"aws_request_id":
"9813e4c5-607f-47fc-8a6a-4387ef28acb7"}) } })

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

Testing

Tested by seeing that an error no longer occurs after this patch.

The todo extension added in block#4868
causes errors with bedrock because bedrock expects an input schema.

Without this fix, bedrock tool calls fail with

Error: Server error: Failed to call Bedrock:
ValidationException(ValidationException { message: Some("The value at
toolConfig.tools.3.toolSpec.inputSchema.json.type must be one of the
following: object."), meta: ErrorMetadata { code:
Some("ValidationException"), message: Some("The value at
toolConfig.tools.3.toolSpec.inputSchema.json.type must be one of the
following: object."), extras: Some({"aws_request_id":
"9813e4c5-607f-47fc-8a6a-4387ef28acb7"}) } })

Signed-off-by: alexyao2015 <[email protected]>
@taniandjerry
Copy link
Contributor

Tagged @DOsinga & @alexhancock to review, thank you @alexyao2015 !

// This is required by Bedrock
if !input_schema.contains_key("type") {
input_schema.insert("type".to_string(), Value::String("object".to_string()));
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure this is needed, but it doesn't seem to me like this is in the right place. if the todo tool somehow managed to declare itself without a type in the input schema, we should add a check to extension_manager to make sure all tools have that and make sure that whatever way we setup tools, does the right thing here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the exact same implementation here for the anthropic provider.

if input_schema.is_empty() {

@DOsinga
Copy link
Collaborator

DOsinga commented Oct 12, 2025

yeah, that's not great. let's get this in but see if we can fix this on a higher level

@DOsinga DOsinga merged commit 47d5c96 into block:main Oct 12, 2025
10 checks passed
zanesq added a commit that referenced this pull request Oct 13, 2025
…sion-streaming

* 'main' of github.com:block/goose: (37 commits)
  Clear deeplinks after use (#5128)
  Revert "Fix gpt-5 input context limit (#4619)" (#5135)
  fix: missing cmake and protobuf for windows build, deduplicate sh/pws… (#5028)
  Fix bedrock tool input schema (#5064)
  Add self-test recipe for goose validation (#5111)
  fix: modifies openai request logic for reasoning models (#4221) (#4294)
  Fix race condition threat when set_param and set_secret of c… (#5109)
  Clean room implementation of the chat process (#5079)
  Bump rmcp (#5096)
  set version in an env variable for testing (#5100)
  fix : enhance fuzzy file search in goose desktop (#5071)
  Make async (#5126)
  docs: unlist tutorials for extensions with archived or moved servers (#5116)
  Add API Documentation Generator prompt (#5001)
  Add flag for enabling eleven labs voice dictation (#5095)
  force re-render fields to pick up custom params usage in instructions (#5112)
  Remove isUserInputDisabled (#5115)
  Improve Rust analysis output for `analyze` tool (#5072)
  Remove duplicate prepare_reply_context call (#5063)
  install react dev tools in development (#4979)
  ...

# Conflicts:
#	ui/desktop/src/components/BaseChat2.tsx
#	ui/desktop/src/hooks/useChatStream.ts
katzdave added a commit that referenced this pull request Oct 15, 2025
* 'main' of github.com:block/goose: (49 commits)
  fixing video embed (#5171)
  chore: clean up random unused files (#5166)
  fix: adjust download_cli.sh to tolerate no OS variable (#5169)
  mcp tutorial page for firecrawl (#5152)
  Remove orphaned tool calls before compaction (#5059)
  feat: add copy as markdown button to documentation pages (#5158)
  chore: include vendored node executable (#5160)
  remove extra whitespace from message (#5159)
  Clear deeplinks after use (#5128)
  Revert "Fix gpt-5 input context limit (#4619)" (#5135)
  fix: missing cmake and protobuf for windows build, deduplicate sh/pws… (#5028)
  Fix bedrock tool input schema (#5064)
  Add self-test recipe for goose validation (#5111)
  fix: modifies openai request logic for reasoning models (#4221) (#4294)
  Fix race condition threat when set_param and set_secret of c… (#5109)
  Clean room implementation of the chat process (#5079)
  Bump rmcp (#5096)
  set version in an env variable for testing (#5100)
  fix : enhance fuzzy file search in goose desktop (#5071)
  Make async (#5126)
  ...
@alexyao2015 alexyao2015 deleted the fix/bedrock-input branch October 15, 2025 23:05
michaelneale added a commit that referenced this pull request Oct 16, 2025
* main: (35 commits)
  fix: include apple silicon build of the desktop app in build artifacts (#5174)
  fixing video embed (#5171)
  chore: clean up random unused files (#5166)
  fix: adjust download_cli.sh to tolerate no OS variable (#5169)
  mcp tutorial page for firecrawl (#5152)
  Remove orphaned tool calls before compaction (#5059)
  feat: add copy as markdown button to documentation pages (#5158)
  chore: include vendored node executable (#5160)
  remove extra whitespace from message (#5159)
  Clear deeplinks after use (#5128)
  Revert "Fix gpt-5 input context limit (#4619)" (#5135)
  fix: missing cmake and protobuf for windows build, deduplicate sh/pws… (#5028)
  Fix bedrock tool input schema (#5064)
  Add self-test recipe for goose validation (#5111)
  fix: modifies openai request logic for reasoning models (#4221) (#4294)
  Fix race condition threat when set_param and set_secret of c… (#5109)
  Clean room implementation of the chat process (#5079)
  Bump rmcp (#5096)
  set version in an env variable for testing (#5100)
  fix : enhance fuzzy file search in goose desktop (#5071)
  ...
@alexhancock alexhancock mentioned this pull request Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants