wenjin272 opened a new issue, #1467: URL: https://github.com/apache/flink-agents/issues/1467
### Search before asking - [x] I searched the existing issues and did not find a duplicate. ### Description While checking the OpenAI default-model migration in #1462, I found two parameter-handling problems in the Java Responses integration. This issue tracks them together, separately from choosing the new default model. Verified against main at `d0f819a7e45dd54533ace6efdb7e870909616930`. #### 1. The default temperature breaks requests to reasoning models [`OpenAIResponsesModelSetup`](https://github.com/apache/flink-agents/blob/d0f819a7e45dd54533ace6efdb7e870909616930/integrations/chat-models/openai/src/main/java/org/apache/flink/agents/integrations/chatmodels/openai/OpenAIResponsesModelSetup.java#L77) defaults `temperature` to `0.1` and always includes it in `getParameters()`. The connection forwards it to the Responses API even when the user did not configure it. Direct requests to the official `/v1/responses` endpoint with `model="gpt-6-luna"` and a function tool produced these results: | Temperature | Reasoning effort | Result | | --- | --- | --- | | `0.1` | Omitted | HTTP 400: `Unsupported parameter: 'temperature' is not supported with this model.` | | Omitted | Omitted | HTTP 200; the response reports `medium`, and returns a function call | | `0.1` | `none` | HTTP 200; returns a function call | The successful default-reasoning case also completed a second request containing a simulated tool result. Therefore, the Responses path does not need to disable reasoning for tool calling, but it must avoid injecting an incompatible temperature by default. These were direct HTTP checks using parameters matching the current implementation, not a Java end-to-end test. #### 2. `store=false` is dropped before reaching the API The setup declares `store=false` by default, but [`getParameters()`](https://github.com/apache/flink-agents/blob/d0f819a7e45dd54533ace6efdb7e870909616930/integrations/chat-models/openai/src/main/java/org/apache/flink/agents/integrations/chatmodels/openai/OpenAIResponsesModelSetup.java#L161) adds the parameter only when it is `true`. [`OpenAIResponsesModelConnection.buildRequest()`](https://github.com/apache/flink-agents/blob/d0f819a7e45dd54533ace6efdb7e870909616930/integrations/chat-models/openai/src/main/java/org/apache/flink/agents/integrations/chatmodels/openai/OpenAIResponsesModelConnection.java#L191) likewise calls `builder.store(true)` only for `true`. Consequently, even an explicitly configured `false` is omitted from the request. In the direct API checks above, omitting `store` resulted in responses reporting `store=true`. #### Expected behavior and verification - Avoid automatically sending a temperature that is incompatible with the selected model and reasoning configuration. Leaving temperature unspecified by default is one option; explicit user configuration should not be silently discarded. - Preserve both `true` and `false` for `store` through the setup and connection. The documented default `false` must reach the API as `false`. - Keep Responses reasoning effort unset unless the user configures it; do not apply the Chat Completions tool-calling workaround here. - Add request-construction regression tests covering omitted/explicit temperature, default/explicit `store=false`, and `store=true`. Verify the setup-to-request path, not just one of the two layers. - Update parameter documentation and examples to match the resulting behavior, and cover a tool-call/result round trip with the new default model. ### 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]
