Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Implement dynamic provider tools #4053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
virajmehta merged 24 commits into main from viraj/dynamic-provider-tools
Oct 20, 2025
Merged

Conversation

@virajmehta
Copy link
Member

@virajmehta virajmehta commented Oct 20, 2025
edited by ellipsis-dev bot
Loading

This PR add a field provider_tools to the inference API and tensorzero::provider_tools to the OpenAI interface so that you can add provider tools (with optional scopes) that will be used by the providers that support them.

The format looks like this:

provider_tools=[{"scope": {"model_name": "foo", "provider_name": "bar"}, "tool": {"type": "web_search_preview"}}]]

the scope is optional but means the tool will only be sent to "model_name": "foo" and "provider_name": "bar" if it supports built-in tools.

This PR also adds Rust, Python, OpenAI Python, and OpenAI Node client tests .


Important

Introduces dynamic provider tools in the inference API, allowing tools to be specified with optional scopes, with comprehensive updates and tests across multiple components.

  • Behavior:
    • Adds provider_tools field to inference API and tensorzero::provider_tools to OpenAI interface for dynamic tool configuration.
    • Supports optional scopes for tools, restricting them to specific models/providers.
  • Implementation:
    • Updates lib.rs in Python client to handle provider_tools in _prepare_inference_request() and related functions.
    • Adds ProviderTool and ProviderToolScope types in tool.rs.
    • Modifies inference.rs and openai_compatible.rs to integrate provider_tools.
  • Testing:
    • Adds tests in inference-openai-responses-api.test.ts, test_openai_sdk.py, and test_tensorzero_sdk.py for dynamic provider tools.
    • Updates curation.test.ts and inference.test.ts to include provider_tools in test configurations.

This description was created by Ellipsis for f9ee832. You can customize this summary. It will automatically update as commits are pushed.

chatgpt-codex-connector[bot] reacted with thumbs up emoji ellipsis-dev[bot] reacted with rocket emoji
Copy link
Member Author

Copy link
Member Author

Copy link
Member Author

@virajmehta virajmehta marked this pull request as ready for review October 20, 2025 16:32
Copy link
Member Author

/regen-cache

Copy link
Member Author

/regen-fixtures

github-actions[bot] reacted with hooray emoji github-actions[bot] reacted with rocket emoji github-actions[bot] reacted with eyes emoji

@virajmehta virajmehta added this pull request to the merge queue Oct 20, 2025
Merged via the queue into main with commit a245475 Oct 20, 2025
31 checks passed
@virajmehta virajmehta deleted the viraj/dynamic-provider-tools branch October 20, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Aaron1011 Aaron1011 Aaron1011 approved these changes

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add support for dynamic provider tools (OpenAI Responses API)

AltStyle によって変換されたページ (->オリジナル) /