dependabot[bot] opened a new pull request, #27400: URL: https://github.com/apache/camel/pull/27400
Bumps the langchain4j group with 17 updates: | Package | From | To | | --- | --- | --- | | [dev.langchain4j:langchain4j-core](https://github.com/langchain4j/langchain4j) | `1.20.2` | `1.21.0` | | [dev.langchain4j:langchain4j](https://github.com/langchain4j/langchain4j) | `1.20.2` | `1.21.0` | | [dev.langchain4j:langchain4j-open-ai](https://github.com/langchain4j/langchain4j) | `1.20.2` | `1.21.0` | | [dev.langchain4j:langchain4j-google-ai-gemini](https://github.com/langchain4j/langchain4j) | `1.20.2` | `1.21.0` | | [dev.langchain4j:langchain4j-ollama](https://github.com/langchain4j/langchain4j) | `1.20.2` | `1.21.0` | | [dev.langchain4j:langchain4j-azure-open-ai](https://github.com/langchain4j/langchain4j) | `1.20.2` | `1.21.0` | | [dev.langchain4j:langchain4j-mcp](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | | [dev.langchain4j:langchain4j-guardrails](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | | [dev.langchain4j:langchain4j-embeddings-bge-small-en-v15-q](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | | [dev.langchain4j:langchain4j-hugging-face](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | | [dev.langchain4j:langchain4j-embeddings](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | | [dev.langchain4j:langchain4j-embeddings-all-minilm-l6-v2](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | | [dev.langchain4j:langchain4j-qdrant](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | | [dev.langchain4j:langchain4j-milvus](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | | [dev.langchain4j:langchain4j-weaviate](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | | [dev.langchain4j:langchain4j-web-search-engine-tavily](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | | [dev.langchain4j:langchain4j-web-search-engine-google-custom](https://github.com/langchain4j/langchain4j) | `1.20.2-beta30` | `1.21.0-beta31` | Updates `dev.langchain4j:langchain4j-core` from 1.20.2 to 1.21.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/langchain4j/langchain4j/releases">dev.langchain4j:langchain4j-core's releases</a>.</em></p> <blockquote> <h2>1.21.0 and 1.21.0-beta31</h2> <h2>Decision Models (experimental)</h2> <p>This release introduces <strong>decision models</strong>: a new model type that answers questions about an input with typed answers and probabilities instead of generated text. They are a fast, cheap fit for classification, routing, gating and grading.</p> <ul> <li><strong><code>DecisionModel</code> API</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6469">#6469</a>, <a href="https://redirect.github.com/langchain4j/langchain4j/issues/6543">#6543</a>): ask yes/no, choice and scale questions in a single call and get the probability of each answer back. The first integration is <a href="https://docs.langchain4j.dev/integrations/decision-models/typesafe">TypeSafe</a>. It also works with servers that speak the same <code>/v1/systemone</code> protocol, such as OpenRouter.</li> <li><strong>Decision Services</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6526">#6526</a>): declare the questions as methods of a Java interface, as you would for AI Services. LangChain4j implements the interface and converts the answers to <code>boolean</code>, enums, <code>Choice<E></code> or records.</li> <li><strong>Ready-made integrations</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6545">#6545</a>): <code>RoutingChatModel</code> sends each request to the right chat model. There is also re-ranking for RAG (<code>DecisionScoringModel</code>), query routing, tool selection and input/output guardrails, and they all work with any <code>DecisionModel</code>.</li> <li><strong>Agentic router</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6561">#6561</a>): <code>DecisionRouterPlanner</code> uses a decision model to choose which subagents handle a request.</li> </ul> <p>All of these APIs are <code>@Experimental</code> and may change in future releases. Start with the <a href="https://docs.langchain4j.dev/tutorials/decision-models">Decision Models</a> and <a href="https://docs.langchain4j.dev/tutorials/decision-services">Decision Services</a> tutorials.</p> <h1>Notable Changes</h1> <ul> <li>Decision Models: <ul> <li>Add experimental <code>DecisionModel</code> API and TypeSafe integration by <a href="https://github.com/maeste"><code>@maeste</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6469">langchain4j/langchain4j#6469</a></li> <li>Add <code>DecisionServices</code>: AI Service-like API for decision models by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6526">langchain4j/langchain4j#6526</a></li> <li>Add <code>DecisionModel</code> integrations: model routing, re-ranking, query routing, tool selection and guardrails by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6545">langchain4j/langchain4j#6545</a></li> <li>Introduce a <code>DecisionModel</code>-based router agentic pattern by <a href="https://github.com/mariofusco"><code>@mariofusco</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6561">langchain4j/langchain4j#6561</a></li> </ul> </li> <li>Tool error handling: let each exception decide what the LLM is told by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6420">langchain4j/langchain4j#6420</a></li> <li>Add jitLLM integration (successor of GPULlama3.java) by <a href="https://github.com/mikepapadim"><code>@mikepapadim</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6508">langchain4j/langchain4j#6508</a></li> <li>Add <code>OpenAiOfficialBatchChatModel</code> for the OpenAI Batch API by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6094">langchain4j/langchain4j#6094</a></li> </ul> <h1>Other Changes</h1> <ul> <li>fix(mcp): preserve the HTTP status code when a Streamable HTTP request is rejected by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6291">langchain4j/langchain4j#6291</a></li> <li>feat(google-genai): expose thoughts and cached content token counts by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6204">langchain4j/langchain4j#6204</a></li> <li>fix: skip files that fail to parse in loadDocuments() instead of aborting the whole batch by <a href="https://github.com/stlahxm"><code>@stlahxm</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6096">langchain4j/langchain4j#6096</a></li> <li>fix(mcp): report a tool-execution timeout as an error result by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6310">langchain4j/langchain4j#6310</a></li> <li>feat(mcp): merge allOf sub-schemas when converting tool input schemas by <a href="https://github.com/however-yir"><code>@however-yir</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6320">langchain4j/langchain4j#6320</a></li> <li>Fix filter expression injection via metadata keys in Milvus embedding stores by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6333">langchain4j/langchain4j#6333</a></li> <li>MCP: honor refs in allOf schemas, log a warning on scalars and unresolved refs by <a href="https://github.com/jmartisk"><code>@jmartisk</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6332">langchain4j/langchain4j#6332</a></li> <li>Fix containsString LIKE wildcard escaping in Milvus stores by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6334">langchain4j/langchain4j#6334</a></li> <li>Give SupervisorAgentIT's invoice agent a task its model can finish by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6330">langchain4j/langchain4j#6330</a></li> <li>Add detailed Javadoc for Agent.typedOutputKey() by <a href="https://github.com/harikrishna553"><code>@harikrishna553</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6337">langchain4j/langchain4j#6337</a></li> <li>fix: Map <code>cacheDiagnostics</code> in <code>AnthropicBatchChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6234">langchain4j/langchain4j#6234</a></li> <li>fix: Keep grounding and URL context metadata in <code>GoogleAiGeminiStreamingChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6232">langchain4j/langchain4j#6232</a></li> <li>fix(anthropic): send thinking blocks that carry only a signature by <a href="https://github.com/ReuDa"><code>@ReuDa</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6246">langchain4j/langchain4j#6246</a></li> <li>fix: Produce each agent's summarized context with its own ChatModel by <a href="https://github.com/kevinyang03"><code>@kevinyang03</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6247">langchain4j/langchain4j#6247</a></li> <li>feat(google-ai-gemini): expose safety ratings and block reason in chat response metadata by <a href="https://github.com/ZhangDT-sky"><code>@ZhangDT-sky</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6249">langchain4j/langchain4j#6249</a></li> <li>Fix: Handle negative tool call index in OpenAI streaming response by <a href="https://github.com/dc-pbrgr"><code>@dc-pbrgr</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6254">langchain4j/langchain4j#6254</a></li> <li>fix: return output printed by the GraalVM code execution engines by <a href="https://github.com/DragonFSKY"><code>@DragonFSKY</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/5094">langchain4j/langchain4j#5094</a></li> <li>fix: Map every tool call of one message in <code>OllamaStreamingChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6230">langchain4j/langchain4j#6230</a></li> <li>fix: resolve tools by the name published in their ToolSpecification by <a href="https://github.com/CryoThrust"><code>@CryoThrust</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6268">langchain4j/langchain4j#6268</a></li> <li>fix(onnx-scoring): release native resources when initialization fails by <a href="https://github.com/liziing"><code>@liziing</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6318">langchain4j/langchain4j#6318</a></li> <li>fix(google-genai): preserve thought signatures on non-function-call parts by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6296">langchain4j/langchain4j#6296</a></li> <li>fix: prevent infinite recursion in TokenUsage.add() by <a href="https://github.com/alxkm"><code>@alxkm</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6322">langchain4j/langchain4j#6322</a></li> <li>fix(pgvector): close the connection when getConnection() fails by <a href="https://github.com/dlwldn30"><code>@dlwldn30</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6324">langchain4j/langchain4j#6324</a></li> <li>fix(elasticsearch): skip text-only documents in script vector search by <a href="https://github.com/liziing"><code>@liziing</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6326">langchain4j/langchain4j#6326</a></li> <li>fix: prevent float overflow in embedding normalization and cosine similarity by <a href="https://github.com/GellertGG"><code>@GellertGG</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6339">langchain4j/langchain4j#6339</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/langchain4j/langchain4j/commit/c95f2afcf3262d227486bf1d720e5a52adb1c0a3"><code>c95f2af</code></a> Release versions 1.21.0 and 1.21.0-beta31</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/bf8ba58dc3bc0f8185f592393cb2903e64994ba8"><code>bf8ba58</code></a> Introduce a DecisionModel-based router agentic pattern (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6561">#6561</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/1613ff57a3d28426cdda10bbb45c46bcf15a92d4"><code>1613ff5</code></a> fix(jackson3): restore the remaining Jackson 2 defaults and document the deli...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/b8fd0c6559ea8c949c3ed07cdb096472d59aeecb"><code>b8fd0c6</code></a> Add jitLLM integration (successor of GPULlama3.java) (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6508">#6508</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/0a2f73711dd4252a2190ec6b45bd9b4ca1d2d183"><code>0a2f737</code></a> fix(openai): deserialize image token details with Jackson 3 and expose image ...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/c2685e383e4959de88cc8e59e8057993e07458a4"><code>c2685e3</code></a> Update OpenAI Java SDK to 4.73.0 (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6478">#6478</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/a318c071f5c4daf93e7e200c8110598fabaf9c47"><code>a318c07</code></a> fix: trim whitespace when coercing tool enum arguments (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6551">#6551</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/875befaffe44a8f50f356a6529805b717c22a022"><code>875befa</code></a> Preserve earlier guardrail rewrites when a later guardrail returns success (#...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/917de4a607a816fab06ad4145d73f6aca245e785"><code>917de4a</code></a> Allow to programmatically define non-AI agents (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6496">#6496</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/53466fc505b0d282c5f3306f919949b2e9175e40"><code>53466fc</code></a> fix(google-genai): surface generated images from chat responses (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6457">#6457</a>)</li> <li>Additional commits viewable in <a href="https://github.com/langchain4j/langchain4j/compare/1.20.2...1.21.0">compare view</a></li> </ul> </details> <br /> Updates `dev.langchain4j:langchain4j` from 1.20.2 to 1.21.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/langchain4j/langchain4j/releases">dev.langchain4j:langchain4j's releases</a>.</em></p> <blockquote> <h2>1.21.0 and 1.21.0-beta31</h2> <h2>Decision Models (experimental)</h2> <p>This release introduces <strong>decision models</strong>: a new model type that answers questions about an input with typed answers and probabilities instead of generated text. They are a fast, cheap fit for classification, routing, gating and grading.</p> <ul> <li><strong><code>DecisionModel</code> API</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6469">#6469</a>, <a href="https://redirect.github.com/langchain4j/langchain4j/issues/6543">#6543</a>): ask yes/no, choice and scale questions in a single call and get the probability of each answer back. The first integration is <a href="https://docs.langchain4j.dev/integrations/decision-models/typesafe">TypeSafe</a>. It also works with servers that speak the same <code>/v1/systemone</code> protocol, such as OpenRouter.</li> <li><strong>Decision Services</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6526">#6526</a>): declare the questions as methods of a Java interface, as you would for AI Services. LangChain4j implements the interface and converts the answers to <code>boolean</code>, enums, <code>Choice<E></code> or records.</li> <li><strong>Ready-made integrations</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6545">#6545</a>): <code>RoutingChatModel</code> sends each request to the right chat model. There is also re-ranking for RAG (<code>DecisionScoringModel</code>), query routing, tool selection and input/output guardrails, and they all work with any <code>DecisionModel</code>.</li> <li><strong>Agentic router</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6561">#6561</a>): <code>DecisionRouterPlanner</code> uses a decision model to choose which subagents handle a request.</li> </ul> <p>All of these APIs are <code>@Experimental</code> and may change in future releases. Start with the <a href="https://docs.langchain4j.dev/tutorials/decision-models">Decision Models</a> and <a href="https://docs.langchain4j.dev/tutorials/decision-services">Decision Services</a> tutorials.</p> <h1>Notable Changes</h1> <ul> <li>Decision Models: <ul> <li>Add experimental <code>DecisionModel</code> API and TypeSafe integration by <a href="https://github.com/maeste"><code>@maeste</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6469">langchain4j/langchain4j#6469</a></li> <li>Add <code>DecisionServices</code>: AI Service-like API for decision models by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6526">langchain4j/langchain4j#6526</a></li> <li>Add <code>DecisionModel</code> integrations: model routing, re-ranking, query routing, tool selection and guardrails by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6545">langchain4j/langchain4j#6545</a></li> <li>Introduce a <code>DecisionModel</code>-based router agentic pattern by <a href="https://github.com/mariofusco"><code>@mariofusco</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6561">langchain4j/langchain4j#6561</a></li> </ul> </li> <li>Tool error handling: let each exception decide what the LLM is told by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6420">langchain4j/langchain4j#6420</a></li> <li>Add jitLLM integration (successor of GPULlama3.java) by <a href="https://github.com/mikepapadim"><code>@mikepapadim</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6508">langchain4j/langchain4j#6508</a></li> <li>Add <code>OpenAiOfficialBatchChatModel</code> for the OpenAI Batch API by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6094">langchain4j/langchain4j#6094</a></li> </ul> <h1>Other Changes</h1> <ul> <li>fix(mcp): preserve the HTTP status code when a Streamable HTTP request is rejected by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6291">langchain4j/langchain4j#6291</a></li> <li>feat(google-genai): expose thoughts and cached content token counts by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6204">langchain4j/langchain4j#6204</a></li> <li>fix: skip files that fail to parse in loadDocuments() instead of aborting the whole batch by <a href="https://github.com/stlahxm"><code>@stlahxm</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6096">langchain4j/langchain4j#6096</a></li> <li>fix(mcp): report a tool-execution timeout as an error result by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6310">langchain4j/langchain4j#6310</a></li> <li>feat(mcp): merge allOf sub-schemas when converting tool input schemas by <a href="https://github.com/however-yir"><code>@however-yir</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6320">langchain4j/langchain4j#6320</a></li> <li>Fix filter expression injection via metadata keys in Milvus embedding stores by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6333">langchain4j/langchain4j#6333</a></li> <li>MCP: honor refs in allOf schemas, log a warning on scalars and unresolved refs by <a href="https://github.com/jmartisk"><code>@jmartisk</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6332">langchain4j/langchain4j#6332</a></li> <li>Fix containsString LIKE wildcard escaping in Milvus stores by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6334">langchain4j/langchain4j#6334</a></li> <li>Give SupervisorAgentIT's invoice agent a task its model can finish by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6330">langchain4j/langchain4j#6330</a></li> <li>Add detailed Javadoc for Agent.typedOutputKey() by <a href="https://github.com/harikrishna553"><code>@harikrishna553</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6337">langchain4j/langchain4j#6337</a></li> <li>fix: Map <code>cacheDiagnostics</code> in <code>AnthropicBatchChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6234">langchain4j/langchain4j#6234</a></li> <li>fix: Keep grounding and URL context metadata in <code>GoogleAiGeminiStreamingChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6232">langchain4j/langchain4j#6232</a></li> <li>fix(anthropic): send thinking blocks that carry only a signature by <a href="https://github.com/ReuDa"><code>@ReuDa</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6246">langchain4j/langchain4j#6246</a></li> <li>fix: Produce each agent's summarized context with its own ChatModel by <a href="https://github.com/kevinyang03"><code>@kevinyang03</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6247">langchain4j/langchain4j#6247</a></li> <li>feat(google-ai-gemini): expose safety ratings and block reason in chat response metadata by <a href="https://github.com/ZhangDT-sky"><code>@ZhangDT-sky</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6249">langchain4j/langchain4j#6249</a></li> <li>Fix: Handle negative tool call index in OpenAI streaming response by <a href="https://github.com/dc-pbrgr"><code>@dc-pbrgr</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6254">langchain4j/langchain4j#6254</a></li> <li>fix: return output printed by the GraalVM code execution engines by <a href="https://github.com/DragonFSKY"><code>@DragonFSKY</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/5094">langchain4j/langchain4j#5094</a></li> <li>fix: Map every tool call of one message in <code>OllamaStreamingChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6230">langchain4j/langchain4j#6230</a></li> <li>fix: resolve tools by the name published in their ToolSpecification by <a href="https://github.com/CryoThrust"><code>@CryoThrust</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6268">langchain4j/langchain4j#6268</a></li> <li>fix(onnx-scoring): release native resources when initialization fails by <a href="https://github.com/liziing"><code>@liziing</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6318">langchain4j/langchain4j#6318</a></li> <li>fix(google-genai): preserve thought signatures on non-function-call parts by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6296">langchain4j/langchain4j#6296</a></li> <li>fix: prevent infinite recursion in TokenUsage.add() by <a href="https://github.com/alxkm"><code>@alxkm</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6322">langchain4j/langchain4j#6322</a></li> <li>fix(pgvector): close the connection when getConnection() fails by <a href="https://github.com/dlwldn30"><code>@dlwldn30</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6324">langchain4j/langchain4j#6324</a></li> <li>fix(elasticsearch): skip text-only documents in script vector search by <a href="https://github.com/liziing"><code>@liziing</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6326">langchain4j/langchain4j#6326</a></li> <li>fix: prevent float overflow in embedding normalization and cosine similarity by <a href="https://github.com/GellertGG"><code>@GellertGG</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6339">langchain4j/langchain4j#6339</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/langchain4j/langchain4j/commit/c95f2afcf3262d227486bf1d720e5a52adb1c0a3"><code>c95f2af</code></a> Release versions 1.21.0 and 1.21.0-beta31</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/bf8ba58dc3bc0f8185f592393cb2903e64994ba8"><code>bf8ba58</code></a> Introduce a DecisionModel-based router agentic pattern (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6561">#6561</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/1613ff57a3d28426cdda10bbb45c46bcf15a92d4"><code>1613ff5</code></a> fix(jackson3): restore the remaining Jackson 2 defaults and document the deli...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/b8fd0c6559ea8c949c3ed07cdb096472d59aeecb"><code>b8fd0c6</code></a> Add jitLLM integration (successor of GPULlama3.java) (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6508">#6508</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/0a2f73711dd4252a2190ec6b45bd9b4ca1d2d183"><code>0a2f737</code></a> fix(openai): deserialize image token details with Jackson 3 and expose image ...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/c2685e383e4959de88cc8e59e8057993e07458a4"><code>c2685e3</code></a> Update OpenAI Java SDK to 4.73.0 (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6478">#6478</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/a318c071f5c4daf93e7e200c8110598fabaf9c47"><code>a318c07</code></a> fix: trim whitespace when coercing tool enum arguments (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6551">#6551</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/875befaffe44a8f50f356a6529805b717c22a022"><code>875befa</code></a> Preserve earlier guardrail rewrites when a later guardrail returns success (#...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/917de4a607a816fab06ad4145d73f6aca245e785"><code>917de4a</code></a> Allow to programmatically define non-AI agents (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6496">#6496</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/53466fc505b0d282c5f3306f919949b2e9175e40"><code>53466fc</code></a> fix(google-genai): surface generated images from chat responses (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6457">#6457</a>)</li> <li>Additional commits viewable in <a href="https://github.com/langchain4j/langchain4j/compare/1.20.2...1.21.0">compare view</a></li> </ul> </details> <br /> Updates `dev.langchain4j:langchain4j-open-ai` from 1.20.2 to 1.21.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/langchain4j/langchain4j/releases">dev.langchain4j:langchain4j-open-ai's releases</a>.</em></p> <blockquote> <h2>1.21.0 and 1.21.0-beta31</h2> <h2>Decision Models (experimental)</h2> <p>This release introduces <strong>decision models</strong>: a new model type that answers questions about an input with typed answers and probabilities instead of generated text. They are a fast, cheap fit for classification, routing, gating and grading.</p> <ul> <li><strong><code>DecisionModel</code> API</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6469">#6469</a>, <a href="https://redirect.github.com/langchain4j/langchain4j/issues/6543">#6543</a>): ask yes/no, choice and scale questions in a single call and get the probability of each answer back. The first integration is <a href="https://docs.langchain4j.dev/integrations/decision-models/typesafe">TypeSafe</a>. It also works with servers that speak the same <code>/v1/systemone</code> protocol, such as OpenRouter.</li> <li><strong>Decision Services</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6526">#6526</a>): declare the questions as methods of a Java interface, as you would for AI Services. LangChain4j implements the interface and converts the answers to <code>boolean</code>, enums, <code>Choice<E></code> or records.</li> <li><strong>Ready-made integrations</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6545">#6545</a>): <code>RoutingChatModel</code> sends each request to the right chat model. There is also re-ranking for RAG (<code>DecisionScoringModel</code>), query routing, tool selection and input/output guardrails, and they all work with any <code>DecisionModel</code>.</li> <li><strong>Agentic router</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6561">#6561</a>): <code>DecisionRouterPlanner</code> uses a decision model to choose which subagents handle a request.</li> </ul> <p>All of these APIs are <code>@Experimental</code> and may change in future releases. Start with the <a href="https://docs.langchain4j.dev/tutorials/decision-models">Decision Models</a> and <a href="https://docs.langchain4j.dev/tutorials/decision-services">Decision Services</a> tutorials.</p> <h1>Notable Changes</h1> <ul> <li>Decision Models: <ul> <li>Add experimental <code>DecisionModel</code> API and TypeSafe integration by <a href="https://github.com/maeste"><code>@maeste</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6469">langchain4j/langchain4j#6469</a></li> <li>Add <code>DecisionServices</code>: AI Service-like API for decision models by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6526">langchain4j/langchain4j#6526</a></li> <li>Add <code>DecisionModel</code> integrations: model routing, re-ranking, query routing, tool selection and guardrails by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6545">langchain4j/langchain4j#6545</a></li> <li>Introduce a <code>DecisionModel</code>-based router agentic pattern by <a href="https://github.com/mariofusco"><code>@mariofusco</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6561">langchain4j/langchain4j#6561</a></li> </ul> </li> <li>Tool error handling: let each exception decide what the LLM is told by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6420">langchain4j/langchain4j#6420</a></li> <li>Add jitLLM integration (successor of GPULlama3.java) by <a href="https://github.com/mikepapadim"><code>@mikepapadim</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6508">langchain4j/langchain4j#6508</a></li> <li>Add <code>OpenAiOfficialBatchChatModel</code> for the OpenAI Batch API by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6094">langchain4j/langchain4j#6094</a></li> </ul> <h1>Other Changes</h1> <ul> <li>fix(mcp): preserve the HTTP status code when a Streamable HTTP request is rejected by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6291">langchain4j/langchain4j#6291</a></li> <li>feat(google-genai): expose thoughts and cached content token counts by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6204">langchain4j/langchain4j#6204</a></li> <li>fix: skip files that fail to parse in loadDocuments() instead of aborting the whole batch by <a href="https://github.com/stlahxm"><code>@stlahxm</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6096">langchain4j/langchain4j#6096</a></li> <li>fix(mcp): report a tool-execution timeout as an error result by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6310">langchain4j/langchain4j#6310</a></li> <li>feat(mcp): merge allOf sub-schemas when converting tool input schemas by <a href="https://github.com/however-yir"><code>@however-yir</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6320">langchain4j/langchain4j#6320</a></li> <li>Fix filter expression injection via metadata keys in Milvus embedding stores by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6333">langchain4j/langchain4j#6333</a></li> <li>MCP: honor refs in allOf schemas, log a warning on scalars and unresolved refs by <a href="https://github.com/jmartisk"><code>@jmartisk</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6332">langchain4j/langchain4j#6332</a></li> <li>Fix containsString LIKE wildcard escaping in Milvus stores by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6334">langchain4j/langchain4j#6334</a></li> <li>Give SupervisorAgentIT's invoice agent a task its model can finish by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6330">langchain4j/langchain4j#6330</a></li> <li>Add detailed Javadoc for Agent.typedOutputKey() by <a href="https://github.com/harikrishna553"><code>@harikrishna553</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6337">langchain4j/langchain4j#6337</a></li> <li>fix: Map <code>cacheDiagnostics</code> in <code>AnthropicBatchChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6234">langchain4j/langchain4j#6234</a></li> <li>fix: Keep grounding and URL context metadata in <code>GoogleAiGeminiStreamingChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6232">langchain4j/langchain4j#6232</a></li> <li>fix(anthropic): send thinking blocks that carry only a signature by <a href="https://github.com/ReuDa"><code>@ReuDa</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6246">langchain4j/langchain4j#6246</a></li> <li>fix: Produce each agent's summarized context with its own ChatModel by <a href="https://github.com/kevinyang03"><code>@kevinyang03</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6247">langchain4j/langchain4j#6247</a></li> <li>feat(google-ai-gemini): expose safety ratings and block reason in chat response metadata by <a href="https://github.com/ZhangDT-sky"><code>@ZhangDT-sky</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6249">langchain4j/langchain4j#6249</a></li> <li>Fix: Handle negative tool call index in OpenAI streaming response by <a href="https://github.com/dc-pbrgr"><code>@dc-pbrgr</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6254">langchain4j/langchain4j#6254</a></li> <li>fix: return output printed by the GraalVM code execution engines by <a href="https://github.com/DragonFSKY"><code>@DragonFSKY</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/5094">langchain4j/langchain4j#5094</a></li> <li>fix: Map every tool call of one message in <code>OllamaStreamingChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6230">langchain4j/langchain4j#6230</a></li> <li>fix: resolve tools by the name published in their ToolSpecification by <a href="https://github.com/CryoThrust"><code>@CryoThrust</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6268">langchain4j/langchain4j#6268</a></li> <li>fix(onnx-scoring): release native resources when initialization fails by <a href="https://github.com/liziing"><code>@liziing</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6318">langchain4j/langchain4j#6318</a></li> <li>fix(google-genai): preserve thought signatures on non-function-call parts by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6296">langchain4j/langchain4j#6296</a></li> <li>fix: prevent infinite recursion in TokenUsage.add() by <a href="https://github.com/alxkm"><code>@alxkm</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6322">langchain4j/langchain4j#6322</a></li> <li>fix(pgvector): close the connection when getConnection() fails by <a href="https://github.com/dlwldn30"><code>@dlwldn30</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6324">langchain4j/langchain4j#6324</a></li> <li>fix(elasticsearch): skip text-only documents in script vector search by <a href="https://github.com/liziing"><code>@liziing</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6326">langchain4j/langchain4j#6326</a></li> <li>fix: prevent float overflow in embedding normalization and cosine similarity by <a href="https://github.com/GellertGG"><code>@GellertGG</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6339">langchain4j/langchain4j#6339</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/langchain4j/langchain4j/commit/c95f2afcf3262d227486bf1d720e5a52adb1c0a3"><code>c95f2af</code></a> Release versions 1.21.0 and 1.21.0-beta31</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/bf8ba58dc3bc0f8185f592393cb2903e64994ba8"><code>bf8ba58</code></a> Introduce a DecisionModel-based router agentic pattern (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6561">#6561</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/1613ff57a3d28426cdda10bbb45c46bcf15a92d4"><code>1613ff5</code></a> fix(jackson3): restore the remaining Jackson 2 defaults and document the deli...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/b8fd0c6559ea8c949c3ed07cdb096472d59aeecb"><code>b8fd0c6</code></a> Add jitLLM integration (successor of GPULlama3.java) (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6508">#6508</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/0a2f73711dd4252a2190ec6b45bd9b4ca1d2d183"><code>0a2f737</code></a> fix(openai): deserialize image token details with Jackson 3 and expose image ...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/c2685e383e4959de88cc8e59e8057993e07458a4"><code>c2685e3</code></a> Update OpenAI Java SDK to 4.73.0 (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6478">#6478</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/a318c071f5c4daf93e7e200c8110598fabaf9c47"><code>a318c07</code></a> fix: trim whitespace when coercing tool enum arguments (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6551">#6551</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/875befaffe44a8f50f356a6529805b717c22a022"><code>875befa</code></a> Preserve earlier guardrail rewrites when a later guardrail returns success (#...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/917de4a607a816fab06ad4145d73f6aca245e785"><code>917de4a</code></a> Allow to programmatically define non-AI agents (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6496">#6496</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/53466fc505b0d282c5f3306f919949b2e9175e40"><code>53466fc</code></a> fix(google-genai): surface generated images from chat responses (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6457">#6457</a>)</li> <li>Additional commits viewable in <a href="https://github.com/langchain4j/langchain4j/compare/1.20.2...1.21.0">compare view</a></li> </ul> </details> <br /> Updates `dev.langchain4j:langchain4j-google-ai-gemini` from 1.20.2 to 1.21.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/langchain4j/langchain4j/releases">dev.langchain4j:langchain4j-google-ai-gemini's releases</a>.</em></p> <blockquote> <h2>1.21.0 and 1.21.0-beta31</h2> <h2>Decision Models (experimental)</h2> <p>This release introduces <strong>decision models</strong>: a new model type that answers questions about an input with typed answers and probabilities instead of generated text. They are a fast, cheap fit for classification, routing, gating and grading.</p> <ul> <li><strong><code>DecisionModel</code> API</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6469">#6469</a>, <a href="https://redirect.github.com/langchain4j/langchain4j/issues/6543">#6543</a>): ask yes/no, choice and scale questions in a single call and get the probability of each answer back. The first integration is <a href="https://docs.langchain4j.dev/integrations/decision-models/typesafe">TypeSafe</a>. It also works with servers that speak the same <code>/v1/systemone</code> protocol, such as OpenRouter.</li> <li><strong>Decision Services</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6526">#6526</a>): declare the questions as methods of a Java interface, as you would for AI Services. LangChain4j implements the interface and converts the answers to <code>boolean</code>, enums, <code>Choice<E></code> or records.</li> <li><strong>Ready-made integrations</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6545">#6545</a>): <code>RoutingChatModel</code> sends each request to the right chat model. There is also re-ranking for RAG (<code>DecisionScoringModel</code>), query routing, tool selection and input/output guardrails, and they all work with any <code>DecisionModel</code>.</li> <li><strong>Agentic router</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6561">#6561</a>): <code>DecisionRouterPlanner</code> uses a decision model to choose which subagents handle a request.</li> </ul> <p>All of these APIs are <code>@Experimental</code> and may change in future releases. Start with the <a href="https://docs.langchain4j.dev/tutorials/decision-models">Decision Models</a> and <a href="https://docs.langchain4j.dev/tutorials/decision-services">Decision Services</a> tutorials.</p> <h1>Notable Changes</h1> <ul> <li>Decision Models: <ul> <li>Add experimental <code>DecisionModel</code> API and TypeSafe integration by <a href="https://github.com/maeste"><code>@maeste</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6469">langchain4j/langchain4j#6469</a></li> <li>Add <code>DecisionServices</code>: AI Service-like API for decision models by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6526">langchain4j/langchain4j#6526</a></li> <li>Add <code>DecisionModel</code> integrations: model routing, re-ranking, query routing, tool selection and guardrails by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6545">langchain4j/langchain4j#6545</a></li> <li>Introduce a <code>DecisionModel</code>-based router agentic pattern by <a href="https://github.com/mariofusco"><code>@mariofusco</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6561">langchain4j/langchain4j#6561</a></li> </ul> </li> <li>Tool error handling: let each exception decide what the LLM is told by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6420">langchain4j/langchain4j#6420</a></li> <li>Add jitLLM integration (successor of GPULlama3.java) by <a href="https://github.com/mikepapadim"><code>@mikepapadim</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6508">langchain4j/langchain4j#6508</a></li> <li>Add <code>OpenAiOfficialBatchChatModel</code> for the OpenAI Batch API by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6094">langchain4j/langchain4j#6094</a></li> </ul> <h1>Other Changes</h1> <ul> <li>fix(mcp): preserve the HTTP status code when a Streamable HTTP request is rejected by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6291">langchain4j/langchain4j#6291</a></li> <li>feat(google-genai): expose thoughts and cached content token counts by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6204">langchain4j/langchain4j#6204</a></li> <li>fix: skip files that fail to parse in loadDocuments() instead of aborting the whole batch by <a href="https://github.com/stlahxm"><code>@stlahxm</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6096">langchain4j/langchain4j#6096</a></li> <li>fix(mcp): report a tool-execution timeout as an error result by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6310">langchain4j/langchain4j#6310</a></li> <li>feat(mcp): merge allOf sub-schemas when converting tool input schemas by <a href="https://github.com/however-yir"><code>@however-yir</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6320">langchain4j/langchain4j#6320</a></li> <li>Fix filter expression injection via metadata keys in Milvus embedding stores by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6333">langchain4j/langchain4j#6333</a></li> <li>MCP: honor refs in allOf schemas, log a warning on scalars and unresolved refs by <a href="https://github.com/jmartisk"><code>@jmartisk</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6332">langchain4j/langchain4j#6332</a></li> <li>Fix containsString LIKE wildcard escaping in Milvus stores by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6334">langchain4j/langchain4j#6334</a></li> <li>Give SupervisorAgentIT's invoice agent a task its model can finish by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6330">langchain4j/langchain4j#6330</a></li> <li>Add detailed Javadoc for Agent.typedOutputKey() by <a href="https://github.com/harikrishna553"><code>@harikrishna553</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6337">langchain4j/langchain4j#6337</a></li> <li>fix: Map <code>cacheDiagnostics</code> in <code>AnthropicBatchChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6234">langchain4j/langchain4j#6234</a></li> <li>fix: Keep grounding and URL context metadata in <code>GoogleAiGeminiStreamingChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6232">langchain4j/langchain4j#6232</a></li> <li>fix(anthropic): send thinking blocks that carry only a signature by <a href="https://github.com/ReuDa"><code>@ReuDa</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6246">langchain4j/langchain4j#6246</a></li> <li>fix: Produce each agent's summarized context with its own ChatModel by <a href="https://github.com/kevinyang03"><code>@kevinyang03</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6247">langchain4j/langchain4j#6247</a></li> <li>feat(google-ai-gemini): expose safety ratings and block reason in chat response metadata by <a href="https://github.com/ZhangDT-sky"><code>@ZhangDT-sky</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6249">langchain4j/langchain4j#6249</a></li> <li>Fix: Handle negative tool call index in OpenAI streaming response by <a href="https://github.com/dc-pbrgr"><code>@dc-pbrgr</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6254">langchain4j/langchain4j#6254</a></li> <li>fix: return output printed by the GraalVM code execution engines by <a href="https://github.com/DragonFSKY"><code>@DragonFSKY</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/5094">langchain4j/langchain4j#5094</a></li> <li>fix: Map every tool call of one message in <code>OllamaStreamingChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6230">langchain4j/langchain4j#6230</a></li> <li>fix: resolve tools by the name published in their ToolSpecification by <a href="https://github.com/CryoThrust"><code>@CryoThrust</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6268">langchain4j/langchain4j#6268</a></li> <li>fix(onnx-scoring): release native resources when initialization fails by <a href="https://github.com/liziing"><code>@liziing</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6318">langchain4j/langchain4j#6318</a></li> <li>fix(google-genai): preserve thought signatures on non-function-call parts by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6296">langchain4j/langchain4j#6296</a></li> <li>fix: prevent infinite recursion in TokenUsage.add() by <a href="https://github.com/alxkm"><code>@alxkm</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6322">langchain4j/langchain4j#6322</a></li> <li>fix(pgvector): close the connection when getConnection() fails by <a href="https://github.com/dlwldn30"><code>@dlwldn30</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6324">langchain4j/langchain4j#6324</a></li> <li>fix(elasticsearch): skip text-only documents in script vector search by <a href="https://github.com/liziing"><code>@liziing</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6326">langchain4j/langchain4j#6326</a></li> <li>fix: prevent float overflow in embedding normalization and cosine similarity by <a href="https://github.com/GellertGG"><code>@GellertGG</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6339">langchain4j/langchain4j#6339</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/langchain4j/langchain4j/commit/c95f2afcf3262d227486bf1d720e5a52adb1c0a3"><code>c95f2af</code></a> Release versions 1.21.0 and 1.21.0-beta31</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/bf8ba58dc3bc0f8185f592393cb2903e64994ba8"><code>bf8ba58</code></a> Introduce a DecisionModel-based router agentic pattern (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6561">#6561</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/1613ff57a3d28426cdda10bbb45c46bcf15a92d4"><code>1613ff5</code></a> fix(jackson3): restore the remaining Jackson 2 defaults and document the deli...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/b8fd0c6559ea8c949c3ed07cdb096472d59aeecb"><code>b8fd0c6</code></a> Add jitLLM integration (successor of GPULlama3.java) (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6508">#6508</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/0a2f73711dd4252a2190ec6b45bd9b4ca1d2d183"><code>0a2f737</code></a> fix(openai): deserialize image token details with Jackson 3 and expose image ...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/c2685e383e4959de88cc8e59e8057993e07458a4"><code>c2685e3</code></a> Update OpenAI Java SDK to 4.73.0 (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6478">#6478</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/a318c071f5c4daf93e7e200c8110598fabaf9c47"><code>a318c07</code></a> fix: trim whitespace when coercing tool enum arguments (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6551">#6551</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/875befaffe44a8f50f356a6529805b717c22a022"><code>875befa</code></a> Preserve earlier guardrail rewrites when a later guardrail returns success (#...</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/917de4a607a816fab06ad4145d73f6aca245e785"><code>917de4a</code></a> Allow to programmatically define non-AI agents (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6496">#6496</a>)</li> <li><a href="https://github.com/langchain4j/langchain4j/commit/53466fc505b0d282c5f3306f919949b2e9175e40"><code>53466fc</code></a> fix(google-genai): surface generated images from chat responses (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6457">#6457</a>)</li> <li>Additional commits viewable in <a href="https://github.com/langchain4j/langchain4j/compare/1.20.2...1.21.0">compare view</a></li> </ul> </details> <br /> Updates `dev.langchain4j:langchain4j-ollama` from 1.20.2 to 1.21.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/langchain4j/langchain4j/releases">dev.langchain4j:langchain4j-ollama's releases</a>.</em></p> <blockquote> <h2>1.21.0 and 1.21.0-beta31</h2> <h2>Decision Models (experimental)</h2> <p>This release introduces <strong>decision models</strong>: a new model type that answers questions about an input with typed answers and probabilities instead of generated text. They are a fast, cheap fit for classification, routing, gating and grading.</p> <ul> <li><strong><code>DecisionModel</code> API</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6469">#6469</a>, <a href="https://redirect.github.com/langchain4j/langchain4j/issues/6543">#6543</a>): ask yes/no, choice and scale questions in a single call and get the probability of each answer back. The first integration is <a href="https://docs.langchain4j.dev/integrations/decision-models/typesafe">TypeSafe</a>. It also works with servers that speak the same <code>/v1/systemone</code> protocol, such as OpenRouter.</li> <li><strong>Decision Services</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6526">#6526</a>): declare the questions as methods of a Java interface, as you would for AI Services. LangChain4j implements the interface and converts the answers to <code>boolean</code>, enums, <code>Choice<E></code> or records.</li> <li><strong>Ready-made integrations</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6545">#6545</a>): <code>RoutingChatModel</code> sends each request to the right chat model. There is also re-ranking for RAG (<code>DecisionScoringModel</code>), query routing, tool selection and input/output guardrails, and they all work with any <code>DecisionModel</code>.</li> <li><strong>Agentic router</strong> (<a href="https://redirect.github.com/langchain4j/langchain4j/issues/6561">#6561</a>): <code>DecisionRouterPlanner</code> uses a decision model to choose which subagents handle a request.</li> </ul> <p>All of these APIs are <code>@Experimental</code> and may change in future releases. Start with the <a href="https://docs.langchain4j.dev/tutorials/decision-models">Decision Models</a> and <a href="https://docs.langchain4j.dev/tutorials/decision-services">Decision Services</a> tutorials.</p> <h1>Notable Changes</h1> <ul> <li>Decision Models: <ul> <li>Add experimental <code>DecisionModel</code> API and TypeSafe integration by <a href="https://github.com/maeste"><code>@maeste</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6469">langchain4j/langchain4j#6469</a></li> <li>Add <code>DecisionServices</code>: AI Service-like API for decision models by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6526">langchain4j/langchain4j#6526</a></li> <li>Add <code>DecisionModel</code> integrations: model routing, re-ranking, query routing, tool selection and guardrails by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6545">langchain4j/langchain4j#6545</a></li> <li>Introduce a <code>DecisionModel</code>-based router agentic pattern by <a href="https://github.com/mariofusco"><code>@mariofusco</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6561">langchain4j/langchain4j#6561</a></li> </ul> </li> <li>Tool error handling: let each exception decide what the LLM is told by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6420">langchain4j/langchain4j#6420</a></li> <li>Add jitLLM integration (successor of GPULlama3.java) by <a href="https://github.com/mikepapadim"><code>@mikepapadim</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6508">langchain4j/langchain4j#6508</a></li> <li>Add <code>OpenAiOfficialBatchChatModel</code> for the OpenAI Batch API by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6094">langchain4j/langchain4j#6094</a></li> </ul> <h1>Other Changes</h1> <ul> <li>fix(mcp): preserve the HTTP status code when a Streamable HTTP request is rejected by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6291">langchain4j/langchain4j#6291</a></li> <li>feat(google-genai): expose thoughts and cached content token counts by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6204">langchain4j/langchain4j#6204</a></li> <li>fix: skip files that fail to parse in loadDocuments() instead of aborting the whole batch by <a href="https://github.com/stlahxm"><code>@stlahxm</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6096">langchain4j/langchain4j#6096</a></li> <li>fix(mcp): report a tool-execution timeout as an error result by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6310">langchain4j/langchain4j#6310</a></li> <li>feat(mcp): merge allOf sub-schemas when converting tool input schemas by <a href="https://github.com/however-yir"><code>@however-yir</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6320">langchain4j/langchain4j#6320</a></li> <li>Fix filter expression injection via metadata keys in Milvus embedding stores by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6333">langchain4j/langchain4j#6333</a></li> <li>MCP: honor refs in allOf schemas, log a warning on scalars and unresolved refs by <a href="https://github.com/jmartisk"><code>@jmartisk</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6332">langchain4j/langchain4j#6332</a></li> <li>Fix containsString LIKE wildcard escaping in Milvus stores by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6334">langchain4j/langchain4j#6334</a></li> <li>Give SupervisorAgentIT's invoice agent a task its model can finish by <a href="https://github.com/dliubarskyi"><code>@dliubarskyi</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6330">langchain4j/langchain4j#6330</a></li> <li>Add detailed Javadoc for Agent.typedOutputKey() by <a href="https://github.com/harikrishna553"><code>@harikrishna553</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6337">langchain4j/langchain4j#6337</a></li> <li>fix: Map <code>cacheDiagnostics</code> in <code>AnthropicBatchChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6234">langchain4j/langchain4j#6234</a></li> <li>fix: Keep grounding and URL context metadata in <code>GoogleAiGeminiStreamingChatModel</code> by <a href="https://github.com/subhashpolisetti"><code>@subhashpolisetti</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6232">langchain4j/langchain4j#6232</a></li> <li>fix(anthropic): send thinking blocks that carry only a signature by <a href="https://github.com/ReuDa"><code>@ReuDa</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6246">langchain4j/langchain4j#6246</a></li> <li>fix: Produce each agent's summarized context with its own ChatModel by <a href="https://github.com/kevinyang03"><code>@kevinyang03</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6247">langchain4j/langchain4j#6247</a></li> <li>feat(google-ai-gemini): expose safety ratings and block reason in chat response metadata by <a href="https://github.com/ZhangDT-sky"><code>@ZhangDT-sky</code></a> in <a href="https://redirect.github.com/langchain4j/langchain4j/pull/6249">langchain4j/langchain4j#6249</a></li> <li>Fix: Handle negative tool ca... _Description has been truncated_ -- 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]
