amoghrajesh commented on code in PR #72150:
URL: https://github.com/apache/airflow/pull/72150#discussion_r3966645295
##########
providers/openai/src/airflow/providers/openai/operators/openai.py:
##########
@@ -87,12 +87,26 @@ class OpenAIResponseOperator(BaseOperator):
``previous_response_id`` chaining, ``background=True`` responses, or
access to the full
structured response, use
:class:`~airflow.providers.openai.hooks.openai.OpenAIHook` directly.
+ ``max_output_tokens`` and ``max_tool_calls`` are *token*-level ceilings
enforced by the OpenAI
+ API itself -- OpenAI exposes no monetary cost limit on the Responses API,
so this operator has
+ no cost cap. For a monetary limit, use
:doc:`apache-airflow-providers-common-ai:index` instead.
+ When ``max_output_tokens`` is hit, the request does not fail: the response
comes back with
+ ``status="incomplete"`` and truncated ``output_text`` -- the ceiling is
not a guarantee that no
+ partial output is returned.
Review Comment:
max_tool_calls caps the number of tool calls, not tokens
--
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]