Skip to content

gemini - tool_use_id_to_name - local#1521

Merged
pgrayy merged 1 commit intostrands-agents:mainfrom
pgrayy:gemini-tooluseid
Jan 20, 2026
Merged

gemini - tool_use_id_to_name - local#1521
pgrayy merged 1 commit intostrands-agents:mainfrom
pgrayy:gemini-tooluseid

Conversation

@pgrayy
Copy link
Member

@pgrayy pgrayy commented Jan 20, 2026

Description

For Gemini request formatting, we construct a tool use id to tool name mapping to help construct a FunctionResponse from a tool result content block. Currently, this mapping is setup as an instance variable which has caused a bit of confusion. It is not something that needs to persist and thus redefining it as a local variable.

Related Issues

#1200

Documentation PR

N/A

Type of Change

Other (please describe): Code readability update

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: Relying on existing unit tests that target the mapping.

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.

@pgrayy pgrayy marked this pull request as ready for review January 20, 2026 16:42
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@pgrayy pgrayy merged commit 456b70a into strands-agents:main Jan 20, 2026
20 of 26 checks passed
manoj-selvakumar5 pushed a commit to manoj-selvakumar5/strands-sdk-python that referenced this pull request Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants