Lee-W commented on code in PR #72049:
URL: https://github.com/apache/airflow/pull/72049#discussion_r4013838745


##########
providers/openai/docs/operators/openai.rst:
##########
@@ -58,6 +58,54 @@ specify the OpenAI connection to use, and 
``response_kwargs`` to pass through op
     :start-after: [START howto_operator_openai_response]
     :end-before: [END howto_operator_openai_response]
 
+Passing Responses API options
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+See the `Responses API reference
+<https://platform.openai.com/docs/api-reference/responses/create>`__ for the 
authoritative list
+of parameters. ``response_kwargs`` passes straight through to the underlying 
``create_response``
+call, so most keyword arguments the Responses API accepts can be set there, 
with the exceptions
+noted below. Options worth knowing about:
+
+- ``background``: run the response asynchronously on OpenAI's side. See the 
note below before
+  using this with ``OpenAIResponseOperator``.
+- ``stream``: return a stream of response events instead of a single completed 
response. Do not
+  set this on ``OpenAIResponseOperator``: ``execute`` reads 
``response.status`` and
+  ``response.output_text``, neither of which exists on the streamed response 
object, so the task
+  raises ``AttributeError``. Stream responses from a ``@task`` using
+  :class:`~airflow.providers.openai.hooks.openai.OpenAIHook` instead.
+- ``store``: whether the response is retained on OpenAI's side, for example so 
it can later be
+  used as a ``previous_response_id``.
+- ``reasoning``: reasoning configuration for reasoning models.

Review Comment:
   * `reasoning` now names `{"effort": ...}` and says the operator's own 
default `gpt-4o-mini` is not a reasoning model, so the option only takes effect 
if `model` is set to one. I left out "gpt-5 and o-series models only" — that 
line is in the SDK at 2.37.0 and 2.54.0 but is gone
   by 3.13.0, so quoting it would pin a claim that is already wrong on a fresh 
install.
   
   * For cache retention there is no name that is correct across the supported 
range:
   `prompt_cache_retention` carries no deprecation marker at the 2.37.0 floor 
but is deprecated from 2.54.0 in favour of `prompt_cache_options.ttl`, which 
does not exist at the floor at all. The `prompt_cache_key` bullet now names 
both with their version attribution instead of recommending either.
   
   * `previous_response_id` has its own bullet stating it cannot be combined 
with `conversation`. The `background` bullet now says "See the note on 
`background` below", so it no longer depends on which note comes first.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to