-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
questionQuestion about using the SDKQuestion about using the SDK
Description
Is it possible to get citation annotations when using structured output?
With the following conifig:
research_agent = Agent(
name="Agent",
model="gpt-5-2025-08-07",
model_settings=ModelSettings(response_include=['web_search_call.action.sources', 'web_search_call.results']),
instructions='...',
tools=[WebSearchTool()],
)
I can get annotations in the response content=[ResponseOutputText(annotations=[AnnotationURLCitation(end_index=516, start_index=344, title='...', type='url_citation', url='https...'), ...], text='response')]
When using structured outputs i.e. providing output_type to be a pydantic model, the annotations list is empty and the text contains citation artifacts like \ue200cite\ue202turn1search0\ue201 or \ue200cite\ue202turn0news14\ue201". Can i somehow get regular citation annotations or map the artifacts in the web search tool results?
Metadata
Metadata
Assignees
Labels
questionQuestion about using the SDKQuestion about using the SDK