Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug in the Playground tool filtering logic where tools with different config IDs and display names were not being handled correctly. The issue occurred when a tool's configuration ID (e.g., "answer_question") differed from its display name (e.g., "submit_answer"), causing the tool filtering to fail.
- Updated tool filtering logic to consider both config IDs and display names when filtering static tools
- Added toolsConfig parameter to inference request preparation functions
- Added comprehensive E2E test to verify the fix works correctly
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/fixtures/config/tensorzero.toml | Adds display name "submit_answer" to the "answer_question" tool config for testing |
| ui/e2e_tests/playground.spec.ts | Adds E2E test verifying tool filtering works with different config IDs and display names |
| ui/app/routes/playground/utils.ts | Updates interface and function to accept toolsConfig parameter |
| ui/app/routes/playground/route.tsx | Passes toolsConfig to inference preparation functions |
| ui/app/routes/api/tensorzero/inference.utils.tsx | Updates tool filtering logic to handle both config IDs and display names |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tensorzero/tensorzero into gb/fix-playground-tool-name-bug
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
/regen-fixtures |
|
/regen-fixtures |
|
/regen-fixtures |
1 similar comment
|
/regen-fixtures |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Bug: The playground was comparing tool names as stored in the database to tool IDs in the config (
tools.xxx). This broke inference when the tool included a custom name (tools.xxx.name).https://tensorzero.slack.com/archives/C089WKPUJ80/p1760121010644369
Important
Fixes Playground tool name comparison bug by mapping tool config IDs to display names and adds a test to verify the fix.
inference.utils.tsx.subtractStaticToolsFromInferenceInput()to usetoolsConfigfor correct name mapping.toolsConfigtoprepareInferenceActionRequest()inroute.tsxandutils.ts.playground.spec.tsto verify tool filtering with different config IDs and display names.This description was created by
for decb7e2. You can customize this summary. It will automatically update as commits are pushed.