eemario opened a new pull request, #1471: URL: https://github.com/apache/flink-agents/pull/1471
Closes #1467 ### Purpose of change Chat Completions (Java and Python) and Responses (Java) now omit an unconfigured temperature. Previously each setup supplied 0.1, which reasoning models could reject. Java Responses now sends its documented storage default of false. #### Runtime flow Java setups include an explicit temperature in the parameter map consumed by the connection. Python applies the same rule when building SDK keyword arguments. The Responses setup always includes its storage boolean and the connection passes it to the SDK builder. #### Key decisions Omission depends only on configuration. Explicit values retain the existing validation and additional keyword precedence. Model selection and reasoning effort are tracked in #1462. ### Behavioral Semantics #### Interaction decisions | Setup field | Additional keyword | Request | | --- | --- | --- | | Temperature unset | Absent | Field omitted | | Temperature set | Absent | Configured number, including zero | | Temperature unset or valid | Supplied | Additional keyword wins | | Responses store unset | Absent | Boolean false | | Responses store set | Absent | Configured boolean | | Responses store set | Supplied | Additional keyword wins | #### Behavioral contracts Omitting temperature delegates sampling to the provider. Explicit temperatures reach the API. Responses callers can disable storage by default or explicitly, and can opt in with true. #### Failure behavior Top-level temperature keeps its existing validation from 0 to 2 inclusive. Additional keywords retain their existing passthrough behavior. Provider errors for unsupported explicit settings propagate to the caller. ### Tests | Contract | Regression coverage | | --- | --- | | Omit unset temperature | Java HTTP request body for both APIs and Python SDK kwargs, including Python None | | Preserve and validate explicit temperature | Zero, interior value, upper bound and out-of-range inputs in both languages | | Preserve additional temperature | Additional keyword alone and overriding the top-level value | | Preserve Responses storage flag | Default false, explicit false and true, and additional keyword overrides | Java OpenAI module: 186 tests passed. Python chat model suite: 473 non-integration tests passed. All 10 Java request-parameter cases passed again after tightening the JSON type assertions. Spotless and Ruff checks passed. Live plain chat and a tool-call/result round trip with `gpt-6-luna` remain unverified pending migration testing with API credentials. <details> <summary>Request construction coverage</summary> OpenAISetupRequestParametersTest runs the real Java SDK against a loopback endpoint and checks the captured JSON types and values. Its fixed 400 response ends the call. Python tests in test_openai_setup_parameters.py inspect the keyword arguments received by the mocked SDK method after the real setup and connection construct the request. </details> ### API Callers relying on implicit 0.1 can configure it explicitly on supporting models. Java and Python vLLM setups also inherit the changed sampling default. Python temperature accepts None, and the module-level DEFAULT_TEMPERATURE constant was removed. Java Responses explicitly disables storage by default. ### Documentation - [ ] `doc-needed` - [ ] `doc-not-needed` - [x] `doc-included` ### Was this patch authored or co-authored using generative AI tooling? - [x] Yes - [ ] No Generated-by: Codex CLI 0.171.0-alpha.13.2 (GPT-6.2 Astra) -- 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]
