yunfengzhou-hub opened a new pull request, #1278: URL: https://github.com/apache/flink-agents/pull/1278
Linked issue: none, every commit here is a hotfix. ### Purpose of change Documented defaults, examples and requirements in the following three areas did not match the code they describe. Those three areas are the focus of this change; two further groups follow them. #### Calling LLMs - Ollama's Java `endpoint` is mandatory and `requestTimeout` defaults to 60, rather than a URL default and 10. - vLLM inherits the OpenAI Completions defaults of 60 seconds and 3 retries, rather than the SDK's. - OpenAI Responses' `api_base_url` falls back to `https://api.openai.com/v1`, as the identical Completions code does. - Anthropic's connection reads a `model` argument that the Bedrock, Gemini and both OpenAI tables already document. - A Java example's format string carried Python f-string braces. - A commented Java descriptor used `extractReasoning` where the source reads `extract_reasoning`. - The `--add-exports` requirement was tied to Java chat calls. The operator builds the continuation executor for every plan, so a job on JDK 21 needs it whether its Actions are Java or Python. #### Vector Search - The Ollama embedding setup's `model` overrides the connection default instead of being required. - The Elasticsearch table omitted `content_field`, `metadata_field` and `store_in_content_field`. - One example looked up a resource under a name no method registers. - Two examples cast to the `VectorStore` annotation, which declares no `query` method, instead of `BaseVectorStore`. - The S3 Vectors note cited a `size()` method that no vector store declares. #### ReAct Agent - The constructor looks up `startAction` by reflection but reported `stopAction` when the lookup failed, which points anyone debugging a broken plan at a method that is not involved. #### Outside those three areas - Nine capitalised `Java` fence info strings in the quickstarts cost those blocks their syntax highlighting. - One quickstart sentence had a subject-verb disagreement. - The same `--add-exports` requirement was stated by language rather than by JDK version in the Actions guide and in the four quickstart hints, which sat inside the Java tab. ### Tests No production behavior changes beyond the exception text, so verification is that each documented claim matches its source and that the site still builds. - Hugo extended 0.110.0 builds the site clean. - The rendered output of the four quickstart pages whose hint moved out of a tab was checked: each renders exactly one hint, positioned after the tab container closes, so it shows for Python and Java alike. - The Java format check passes on the `api` module. - Not verified: no example was executed end to end, so the corrected snippets are verified by reading them against the APIs they call rather than by running them. <details> <summary>Source behind each documentation claim</summary> - Ollama chat: the connection throws on a null or empty `endpoint` and falls back to 60 for `requestTimeout`; the Java example on the same page passes `requestTimeout` as an `int`. - vLLM: `VLLMChatModelConnection extends OpenAICompletionsConnection`, whose constructor always calls `parseTimeout` and `parseMaxRetries`, defaulting to 60 and 3. `parseTimeout` reads a `Number` and validates fractional seconds, so the type is `float`, matching the Completions table. - OpenAI Responses: its `api_base_url` handling is identical to Completions', and openai-java's `ClientOptions.baseUrl()` returns `https://api.openai.com/v1` when unset. - Anthropic: `defaultModel` is read from `model` and used by `getModel()` and by request-model resolution. The Python connection declares no such field, so only the Java tab changes. - Ollama embedding: the setup omits `model` when null and the connection resolves it against a `nomic-embed-text` default. The Python setup has no default, so its `Required` stays. - Elasticsearch: the constructor reads all three field arguments, defaulting to `_content`, `_metadata` and `true`. - Resource name: the plan registers a resource under its declaring method's name, and the resource cache throws for a name it does not hold. - `VectorStore` is an annotation type declaring no methods, so a cast to it compiles but the `query` call after it does not. `BaseVectorStore.query` is the intended entry point, and two other examples on the same page already use it. - `size()`: absent from `BaseVectorStore`, every implementation, and `CollectionManageableVectorStore`. S3 Vectors raises `UnsupportedOperationException` for get-all and delete-all, which is what the note now says. - JDK 21: the operator constructs `ActionTaskContextManager`, which constructs `ContinuationActionExecutor` unconditionally. The runtime jar is multi-release, and the JDK 21 variant initialises a static `ContinuationScope`, which needs the export at class-load time. </details> ### API No public API changes. `ReActAgent`'s exception text is corrected; it is reachable only when a subclass lacks the method the framework itself registers. ### 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: Qoder 0.4.4 (Qwen 3.8-Max) -- 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]
