Skip to content

Conversation

@callycodes
Copy link

@callycodes callycodes commented Sep 13, 2025

Background

When the query param isn't included, tool-output-error chunk is thrown despite the tool executing correctly. Is triggering stopWhen conditions to run until expiry (30 runs for example when stopWhen: stepCountIs(30))

When the search query is not included, the provider determines it.

Summary

Made the query param optional in the file_search openai tool.

Manual Verification

Using this fix in an internal version with positive results.

Tasks

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • Formatting issues have been fixed (run pnpm prettier-fix in the project root)
  • I have reviewed this pull request (self-review)

Future Work

Related Issues

Fixes #8479

@callycodes callycodes force-pushed the fix/openai-file-search-tool-optional-query-param branch from 0fc33c1 to 2ae0aa3 Compare September 13, 2025 17:54
@callycodes callycodes closed this Sep 13, 2025
@callycodes callycodes force-pushed the fix/openai-file-search-tool-optional-query-param branch from 2ae0aa3 to da92132 Compare September 13, 2025 18:02
Copy link
Collaborator

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a test for the file_search without using a query?

I tried to find the docs and looked through OpenAI's OpenAPI spec but couldn't find where it lists the arguments for the file_search tool. Can you point me to it?

@callycodes
Copy link
Author

can you add a test for the file_search without using a query?

I tried to find the docs and looked through OpenAI's OpenAPI spec but couldn't find where it lists the arguments for the file_search tool. Can you point me to it?

Yeah they don't make it easy to find - https://platform.openai.com/docs/api-reference/responses/create#responses-create-tools. Have to toggle 'Show possible types'

Will add a test shortly

@callycodes
Copy link
Author

Closing as this has been resolved in another PR

@callycodes callycodes closed this Oct 2, 2025
@callycodes callycodes deleted the fix/openai-file-search-tool-optional-query-param branch October 2, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAI Responses API fileSearch - sending repeated tool messages

2 participants