Skip to content

Commit

Permalink
Fix Nova tool calling (#1009)
Browse files Browse the repository at this point in the history
additionalProperties must be excluded
  • Loading branch information
dragonstyle authored Dec 16, 2024
1 parent eff9750 commit fddf97e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Bedrock: Support for tool calling on Nova models.
- Bedrock: Support for custom `model_args` passed through to `session.Client`.
- Inspect View: Various improvements to appearance of tool calls in transcript.
- Bugfix: Proper handling of text find for eval raw JSON display
Expand Down
6 changes: 5 additions & 1 deletion src/inspect_ai/model/_providers/bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,11 @@ def converse_tools(tools: list[ToolInfo]) -> list[ConverseTool] | None:
tool_spec = ConverseToolSpec(
name=tool.name,
description=tool.description,
inputSchema={"json": tool.parameters.model_dump(exclude_none=True)},
inputSchema={
"json": tool.parameters.model_dump(
exclude_none=True, exclude={"additionalProperties"}
)
},
)
result.append(ConverseTool(toolSpec=tool_spec))
return result
Expand Down

0 comments on commit fddf97e

Please sign in to comment.