Skip to content

Conversation

tsuzaki430
Copy link
Collaborator

@tsuzaki430 tsuzaki430 commented Oct 13, 2025

Background

fix response.output_text.annotation.added object.
I found some differences between OpenAI API and AI SDK.
OpenAI API's annotations are very useful for expand their features.
Built-in tools such as code interpreters can obtain important results from annotations.

Summary

Currently there are 4 types in annotations file_citation, url_citation, container_file_citation and file_path.

  • Added new type file_path.
  • These annotations are fixed correct types.
    • Removed quota was Assistants API's property.
    • Removed .nullish() option.
    • Fixed index or start_index ,end_index.

OpenAI API Reference - Responses API annotations Reference

github OpenAI annotations definitions

Manual Verification

Checklist

  • 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

Add a test for file_path annotation.
Currently I don't know how to get this annotation.

Related Issues

@tsuzaki430 tsuzaki430 changed the title fix(openai) : annotaiton fix url_citation/file_citation/container_file_citation/file_path fix(openai) : solve the correct annotaitons url_citation file_citation container_file_citation file_path Oct 13, 2025
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.

1 participant