Skip to content

Conversation

dbschmigelski
Copy link
Member

@dbschmigelski dbschmigelski commented Sep 19, 2025

Description

The release of v1.8.0 introduced tool_choice to the Model interface to better support structured_output. This was accidentally added as a positional argument instead of a keyword argument. This is breaking for custom implementations of the Model interface.

The fix here is to switch to an optional keyword arg.

Type of Change

Bug fix
Breaking change

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dbschmigelski dbschmigelski marked this pull request as ready for review September 19, 2025 18:39
@dbschmigelski dbschmigelski changed the title fix(models):make tool_choice an optional keyword arg instead positional fix(models): make tool_choice an optional keyword arg instead positional Sep 19, 2025
@dbschmigelski dbschmigelski enabled auto-merge (squash) September 19, 2025 18:47
@dbschmigelski dbschmigelski force-pushed the fix/positional-arg-models branch from b16059a to 38dc249 Compare September 19, 2025 18:49
@dbschmigelski dbschmigelski merged commit 00a1f28 into strands-agents:main Sep 19, 2025
12 checks passed
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.

3 participants