θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

Conversation

@timothycarambat
Copy link
Member

@timothycarambat timothycarambat commented Oct 1, 2025

Pull Request Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ”¨ chore
  • πŸ“ docs

Relevant Issues

resolves #4465

What is in this change?

Migrate OpenAI aibitat provider to use the Responses API from the OpenAI SDK. This allows us to easily support both past and future models through a unified API so now you can use agents for gpt-5 and the o-* models as well as the previous models that have already been launched.

Additional Information

Due to the unique flow by the responses API:

  • OpenAI provider now has its own stream and complete functions on its class to override the inherited Provider which still will use completions (for unification of interface among all other LLM providers)
  • Required us to add originalFunctionCall to the stream and non-stream handler for the main aibitat class so that we can consistently rebuild the function call post-execution since the message history must have a matching function_call and function_call_output in the messages array in order to be valid.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

Additional QA

  • Test new models (gpt-5, o-*, etc)
  • Test older gen models like 3.5
  • Test with and without tools available
  • Test with streaming disabled (manually) to force complete to run
  • Test with followup messages, multiple tool calls, etc.
  • Test existing providers for spot check for changes introduced to the aibitat handlers.

@timothycarambat
Copy link
Member Author

Know bad models:

  • o4 deep research ones
  • o1-* (dont use responses API??)

Everything else works

@timothycarambat timothycarambat marked this pull request as ready for review October 1, 2025 22:59
@timothycarambat timothycarambat merged commit 8f0f9df into master Oct 1, 2025
1 check passed
@timothycarambat timothycarambat deleted the 4465-migrate-openai-agent-to-responses branch October 1, 2025 23:07
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.

[CHORE]: Migrate OpenAI agent provider to Responses API

2 participants