Skip to content

Conversation

pgrayy
Copy link
Member

@pgrayy pgrayy commented May 23, 2025

Description

Handling an edge case where some models executed through the OpenAI model provider return None arguments with the start tool call chunk. The following is an example tool call start chunk from a Qwen model:

ChatCompletionChunk(..., tool_calls=[ChoiceDeltaToolCall(index=0, id='chatcmpl-tool-d01e322b370a4bdd9af5bdea0afda466', function=ChoiceDeltaToolCallFunction(arguments=None, name='calculator'), type='function')]), ...)

We have now seen cases where this is None, '', and '{...'.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

  • hatch fmt --linter
  • hatch fmt --formatter
  • hatch test --all
  • Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

Checklist

  • I have read the CONTRIBUTING document
  • I have added 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
  • 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.

@pgrayy pgrayy requested a review from a team as a code owner May 23, 2025 22:46
@pgrayy pgrayy mentioned this pull request May 23, 2025
6 tasks
@pgrayy pgrayy merged commit 61c3bf7 into strands-agents:main May 23, 2025
20 checks passed
awsarron pushed a commit to awsarron/sdk-python that referenced this pull request May 26, 2025
awsarron added a commit that referenced this pull request May 26, 2025
* models - openai - argument none (#97)

* docs(readme): add open PRs badge + link to samples repo + change 'Docs' to 'Documentation' (#100)

* docs(readme): add logo (#101)

* docs(readme): add logo, title, badges, links to other repos, standardize headings (#102)

* style(readme): use dark logo for clearer visibility when system is using light color scheme (#104)

* fix(readme): use logo that changes color automatically depending on user's color preference scheme (#105)

* feat(handlers): add reasoning text to callback handler and related tests (#109)

* feat(handlers): add reasoning text to callback handler and related tests

* feat(handlers): removed redundant comment in .gitignore file

* feat(handlers): Updated reasoningText type as (Optional[str]

* feat: Add dynamic system prompt override functionality (#108)

* Modularizing Event Loop (#106)

* fix(telemetry): fix agent span start and end when using Agent.stream_async() (#119)

* feat: Update SlidingWindowConversationManager (#120)

* v0.1.5

---------

Co-authored-by: Patrick Gray <[email protected]>
Co-authored-by: Gokhan (Joe) Gultekin <[email protected]>
Co-authored-by: Shubham Raut <[email protected]>
Co-authored-by: fede-dash <[email protected]>
Co-authored-by: Nick Clegg <[email protected]>
@pgrayy pgrayy deleted the openai-tool-call branch May 27, 2025 13:35
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.

2 participants