feat: allow custom-client for OpenAIModel and GeminiModel#1366
Merged
poshinchen merged 1 commit intostrands-agents:mainfrom Dec 21, 2025
Merged
Conversation
8ef2f27 to
bf7af85
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
bf7af85 to
5448261
Compare
5448261 to
0734f39
Compare
0734f39 to
3208acf
Compare
zastrowm
reviewed
Dec 19, 2025
Member
zastrowm
left a comment
There was a problem hiding this comment.
One question/comment about the close method, but otherwise approved
3208acf to
1463df0
Compare
1463df0 to
b805bfc
Compare
b805bfc to
7eb595e
Compare
dbschmigelski
requested changes
Dec 19, 2025
Member
dbschmigelski
left a comment
There was a problem hiding this comment.
nit: lets just make sure the commit message also reflects that we are updating gemini too
7eb595e to
237357d
Compare
237357d to
9c98024
Compare
dbschmigelski
approved these changes
Dec 19, 2025
zastrowm
approved these changes
Dec 19, 2025
6 tasks
manoj-selvakumar5
pushed a commit
to manoj-selvakumar5/strands-sdk-python
that referenced
this pull request
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Allow customer to pass custom client to OpenAIModel and GeminiModel. This solves the issue of [BUG] OpenAI Implementation does not support passing custom HTTP client.
Note
clientto be aclient_factoryin the future. Just as of now, this change only support the single client.Example
Users can now pass custom http client to the OpenAIModel and GeminiModel. Below is the example of the OpenAIModel.
Related Issues
#1036
Some parts of #1103
Documentation PR
Will update the documentation for this change.
Type of Change
New feature
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
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.