Decouple toolbox tool schemas#43467
Open
viswabalaji wants to merge 3 commits into
Open
Conversation
Separate toolbox tool request shapes from OpenAI tool schemas and limit toolbox tools to the supported toolbox surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Next Steps to Merge⌛ Please wait. Next steps to merge this PR are being evaluated by automation. ⌛Comment generated by summarize-checks workflow run. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
ToolboxToolhierarchy for toolbox version payloads, separate fromOpenAI.Tooltool_configsonToolboxToolinstead of OpenAI/agent tool schemastoolbox_search_previewout ofOpenAI.Tool[], which is also used by prompt/hosted agentsvector_store_idsoptional while leaving OpenAI file search unchangedcustom_search_configurationon both prompt-agentWebSearchTooland toolboxWebSearchToolboxsrc/toolboxes/models.tspSDK caller experience
Before, toolbox version creation reused
OpenAI.Tool[], so callers could pass the same broad tool set used by prompt/hosted agents. That meant unsupported toolbox tools like SharePoint grounding could appear valid in typed SDK code:After, toolbox version creation accepts the narrower
ToolboxTool[]model. SDK callers use toolbox tool shapes such asFileSearchToolboxandWebSearchToolbox, and unsupported tools likeSharepointPreviewToolare not part of the generated toolbox SDK model:Prompt agents continue to use
OpenAI.Tool[], so the OpenAI/agent tool contract remains separate. For example, prompt-agent web search usesWebSearchTooland can use the Microsoft custom search extension documented for Foundry web search:File search before/after
Before, toolbox file search was coupled to OpenAI file search, so callers had to provide
vector_store_idson the OpenAI-styleFileSearchToolshape:After, toolbox file search can evolve independently and callers use
FileSearchToolbox, wherevector_store_idscan be omitted:Unsupported toolbox tools
Before, toolbox payloads reused
OpenAI.Tool[], so unsupported OpenAI/agent-only tools such as SharePoint grounding could be modeled in a toolbox request. Now toolbox payloads use the narrowerToolboxToolTypeunion and toolbox-specific models. Unsupported toolbox tools are no longer part of the generated toolbox schema/client model, so they can be caught at compile time in typed SDKs instead of only failing later at runtime.Validation
npx tsp format src/tools/models.tsp src/toolboxes/models.tspnpx tsp compile .