weiqingy opened a new pull request, #1096: URL: https://github.com/apache/flink-agents/pull/1096
Linked issue: #280 ### Purpose of change `GeminiChatModelConnection.buildConfig` assembles the request configuration for every Gemini call: the system instruction, sampling parameters, forwarded extra arguments, and tool declarations. It had no test coverage at all, because it was private and nothing could reach it. This makes it package-private, following the convention five other members of the same class already use, and covers it. The gap that mattered most: nothing verified that `buildConfig` actually forwards extra arguments to the code that applies them. The existing tests for that code call it directly, so the connection between the two was never exercised. While adding the tests, three things turned out to be executed by the new tests but checked by none of them. They are now checked: the description and parameter schema on a tool declaration, and the guard that keeps a user's message from being sent as part of the system instruction. Groundwork for native structured output on Gemini, which follows separately. ### Tests Four unit tests added to `GeminiChatModelConnectionTest`. Module suite goes from 25 to 29, no failures. They run offline and need no API key. Each test was checked by breaking the production code it covers and confirming the test fails. Each break is caught by exactly one test, so a failure points at one cause. ### API No public API change. `buildConfig` moves from private to package-private, which widens it only within its own package. No signature, behaviour, or dependency change. ### Documentation - [ ] `doc-needed` - [x] `doc-not-needed` - [ ] `doc-included` ### Was this patch authored or co-authored using generative AI tooling? - [x] Yes - [ ] No Generated-by: Claude Code 2.1.259 (Claude Opus 5) -- 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]
