docs(agent-tools): add example for custom model provider propagation (#663)#2545
Closed
furkankoykiran wants to merge 1 commit intoopenai:mainfrom
Closed
docs(agent-tools): add example for custom model provider propagation (#663)#2545furkankoykiran wants to merge 1 commit intoopenai:mainfrom
furkankoykiran wants to merge 1 commit intoopenai:mainfrom
Conversation
Member
|
Thanks for sending this patch! However, we already have a similar example at https://github.com/openai/openai-agents-python/blob/main/examples/model_providers/custom_example_provider.py, so we won't have this one. |
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.
What this PR does / why we need it
This PR adds an example demonstrating the behavior fixed in #2463 where a custom
ModelProviderspecified viaRunConfigis correctly inherited when using an agent as a tool.Since the core engineering fix to
Agent.as_tool()was already merged in #2463, this documentation addition serves to close out the remaining gap from #663 by giving users a runnable example of this requested pattern.Changes
examples/agent_patterns/agents_as_tools_custom_provider.pywhich shows how a customModelProvideris passed to the orchestrator agent and properly inherited by nested agent-tools.examples/agent_patterns/README.mdto reference the new example.Fixes #663