Skip to content

fix ActionSearchSource to accept type='api' and optional fields#3291

Open
rmotgi1227 wants to merge 1 commit into
openai:mainfrom
rmotgi1227:fix/action-search-source-api-type
Open

fix ActionSearchSource to accept type='api' and optional fields#3291
rmotgi1227 wants to merge 1 commit into
openai:mainfrom
rmotgi1227:fix/action-search-source-api-type

Conversation

@rmotgi1227
Copy link
Copy Markdown

The API returns type='api' for built-in OpenAI data sources (e.g. oai-weather, oai-sports, oai-finance). The current type only declares Literal["url"], causing a Pydantic validation error on any response that includes these sources.

  • Add "api" to the type literal
  • Make url optional (absent when type is "api")
  • Add optional name field for the data source identifier

Fixes #2736

The API returns type='api' for built-in OpenAI data sources (oai-weather,
oai-sports, oai-finance). The type Literal only had 'url', causing Pydantic
validation errors. Also make url optional and add name for api sources.

Fixes openai#2736
@rmotgi1227 rmotgi1227 requested a review from a team as a code owner May 20, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ActionSearchSource type definition incomplete - missing type='api' and name field

1 participant