wenjin272 opened a new issue, #1477:
URL: https://github.com/apache/flink-agents/issues/1477

   ### Search before asking
   
   - [x] I searched the existing issues and did not find a duplicate.
   
   ### Description
   
   Follow-up to #1470: align the Java OpenAI Responses token-limit setting with 
the Responses API parameter name, `max_output_tokens`.
   
   Currently, `OpenAIResponsesModelSetup` exposes `max_tokens`, and 
`OpenAIResponsesModelConnection` translates it to the SDK's `maxOutputTokens`. 
The outgoing request already uses the correct field. This is an API naming 
cleanup, not a claim that Responses requests currently fail because of the 
token-limit field.
   
   Source: 
[setup](https://github.com/apache/flink-agents/blob/c5976c41a286135b96232e024777142009e28c18/integrations/chat-models/openai/src/main/java/org/apache/flink/agents/integrations/chatmodels/openai/OpenAIResponsesModelSetup.java),
 
[connection](https://github.com/apache/flink-agents/blob/c5976c41a286135b96232e024777142009e28c18/integrations/chat-models/openai/src/main/java/org/apache/flink/agents/integrations/chatmodels/openai/OpenAIResponsesModelConnection.java).
   
   #### Expected changes
   
   - Rename the Java setup and YAML-facing setting from `max_tokens` to 
`max_output_tokens`, including the internal parameter map consumed by the 
connection.
   - Do not retain a compatibility alias for the old top-level setting; 
document the configuration change under the project's beta compatibility policy.
   - Preserve omission when unset, positive-value validation, and the existing 
explicit-value/`additional_kwargs` behavior.
   - Update API documentation, parameter tables, examples, and tests. Explain 
that the limit includes both visible output and reasoning tokens, as defined by 
the [Responses 
API](https://developers.openai.com/api/reference/resources/responses/methods/create).
   - Keep this scoped to Responses. Chat Completions uses 
`max_completion_tokens`. There is no native Python Responses setup to rename; 
configurations targeting the Java implementation should use its new setting.
   
   #### Verification
   
   Add setup-to-request tests showing that an explicit `max_output_tokens` 
reaches the actual request under that name, no `max_tokens` field is sent, and 
an unset limit is omitted. Cover invalid limits and preserve the existing 
additional-parameter precedence without duplicate JSON fields.
   
   This cleanup does not need to block #1470. Temperature and storage handling 
remain in #1467 / #1471.
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!
   


-- 
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