Skip to content

Add OpenAI Responses and Conversations support#69070

Merged
kaxil merged 1 commit into
apache:mainfrom
astronomer:openai-provider-responses
Jun 27, 2026
Merged

Add OpenAI Responses and Conversations support#69070
kaxil merged 1 commit into
apache:mainfrom
astronomer:openai-provider-responses

Conversation

@kaxil

@kaxil kaxil commented Jun 26, 2026

Copy link
Copy Markdown
Member

Add OpenAI Responses and Conversations support to the provider -- the interface OpenAI now recommends for text generation and tool use, and the forward path as the Assistants API approaches its 2026-08-26 removal.

Stacked on #69068 (requires openai>=2.37.0). Review the latest commit; the first commit is #69068 and drops out once it merges.

What's added

New OpenAIHook methods:

  • Responses: create_response, get_response, delete_response, cancel_response
  • Conversations: create_conversation, get_conversation, update_conversation, delete_conversation

New operator:

  • OpenAIResponseOperator -- generates a response from an input_text prompt and returns the aggregated output text. Pass instructions, tools, conversation, previous_response_id etc. through response_kwargs.

Design notes

  • Operator scope: the operator is intentionally synchronous and returns output_text (the common case). For previous_response_id chaining, background=True responses, or the full structured Response, use the hook directly -- documented in the operator docstring and the hook guide. It logs a warning when the response status isn't completed so an empty output_text (for example from a queued background response) isn't a silent success.
  • Conversation items (conversations.items) are out of scope here; multi-turn continuity works via conversation=<id> / previous_response_id on responses.

Follow-up

Related:


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Add OpenAIHook methods for the Responses API (create_response,
get_response, delete_response, cancel_response) and Conversations API
(create/get/update/delete_conversation), plus an OpenAIResponseOperator
that returns a response's aggregated output text. These are OpenAI's
recommended interface for text generation and the forward path as the
Assistants API approaches removal.
@kaxil kaxil force-pushed the openai-provider-responses branch from cffd4f1 to 1f46bae Compare June 27, 2026 02:01
@kaxil kaxil merged commit ff47125 into apache:main Jun 27, 2026
77 checks passed
@kaxil kaxil deleted the openai-provider-responses branch June 27, 2026 02:39
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.

2 participants