| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| 1.21.0 and 1.21.0-beta31 source code.tar.gz | 2026-10-02 | 14.7 MB | |
| 1.21.0 and 1.21.0-beta31 source code.zip | 2026-10-02 | 18.0 MB | |
| README.md | 2026-10-02 | 16.6 kB | |
| Totals: 3 Items | 32.7 MB | 1 | |
Decision Models (experimental)
This release introduces decision models: 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.
DecisionModelAPI (#6469, [#6543]): ask yes/no, choice and scale questions in a single call and get the probability of each answer back. The first integration is TypeSafe. It also works with servers that speak the same/v1/systemoneprotocol, such as OpenRouter.- Decision Services (#6526): declare the questions as methods of a Java interface, as you would for AI Services. LangChain4j implements the interface and converts the answers to
boolean, enums,Choice<E>or records. - Ready-made integrations (#6545):
RoutingChatModelsends each request to the right chat model. There is also re-ranking for RAG (DecisionScoringModel), query routing, tool selection and input/output guardrails, and they all work with anyDecisionModel. - Agentic router (#6561):
DecisionRouterPlanneruses a decision model to choose which subagents handle a request.
All of these APIs are @Experimental and may change in future releases. Start with the Decision Models and Decision Services tutorials.
Notable Changes
- Decision Models:
- Add experimental
DecisionModelAPI and TypeSafe integration by @maeste in https://github.com/langchain4j/langchain4j/pull/6469 - Add
DecisionServices: AI Service-like API for decision models by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/6526 - Add
DecisionModelintegrations: model routing, re-ranking, query routing, tool selection and guardrails by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/6545 - Introduce a
DecisionModel-based router agentic pattern by @mariofusco in https://github.com/langchain4j/langchain4j/pull/6561 - Tool error handling: let each exception decide what the LLM is told by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/6420
- Add jitLLM integration (successor of GPULlama3.java) by @mikepapadim in https://github.com/langchain4j/langchain4j/pull/6508
- Add
OpenAiOfficialBatchChatModelfor the OpenAI Batch API by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6094
Other Changes
- fix(mcp): preserve the HTTP status code when a Streamable HTTP request is rejected by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6291
- feat(google-genai): expose thoughts and cached content token counts by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6204
- fix: skip files that fail to parse in loadDocuments() instead of aborting the whole batch by @stlahxm in https://github.com/langchain4j/langchain4j/pull/6096
- fix(mcp): report a tool-execution timeout as an error result by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6310
- feat(mcp): merge allOf sub-schemas when converting tool input schemas by @however-yir in https://github.com/langchain4j/langchain4j/pull/6320
- Fix filter expression injection via metadata keys in Milvus embedding stores by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/6333
- MCP: honor refs in allOf schemas, log a warning on scalars and unresolved refs by @jmartisk in https://github.com/langchain4j/langchain4j/pull/6332
- Fix containsString LIKE wildcard escaping in Milvus stores by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/6334
- Give SupervisorAgentIT's invoice agent a task its model can finish by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/6330
- Add detailed Javadoc for Agent.typedOutputKey() by @harikrishna553 in https://github.com/langchain4j/langchain4j/pull/6337
- fix: Map
cacheDiagnosticsinAnthropicBatchChatModelby @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6234 - fix: Keep grounding and URL context metadata in
GoogleAiGeminiStreamingChatModelby @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6232 - fix(anthropic): send thinking blocks that carry only a signature by @ReuDa in https://github.com/langchain4j/langchain4j/pull/6246
- fix: Produce each agent's summarized context with its own ChatModel by @kevinyang03 in https://github.com/langchain4j/langchain4j/pull/6247
- feat(google-ai-gemini): expose safety ratings and block reason in chat response metadata by @ZhangDT-sky in https://github.com/langchain4j/langchain4j/pull/6249
- Fix: Handle negative tool call index in OpenAI streaming response by @dc-pbrgr in https://github.com/langchain4j/langchain4j/pull/6254
- fix: return output printed by the GraalVM code execution engines by @DragonFSKY in https://github.com/langchain4j/langchain4j/pull/5094
- fix: Map every tool call of one message in
OllamaStreamingChatModelby @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6230 - fix: resolve tools by the name published in their ToolSpecification by @CryoThrust in https://github.com/langchain4j/langchain4j/pull/6268
- fix(onnx-scoring): release native resources when initialization fails by @liziing in https://github.com/langchain4j/langchain4j/pull/6318
- fix(google-genai): preserve thought signatures on non-function-call parts by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6296
- fix: prevent infinite recursion in TokenUsage.add() by @alxkm in https://github.com/langchain4j/langchain4j/pull/6322
- fix(pgvector): close the connection when getConnection() fails by @dlwldn30 in https://github.com/langchain4j/langchain4j/pull/6324
- fix(elasticsearch): skip text-only documents in script vector search by @liziing in https://github.com/langchain4j/langchain4j/pull/6326
- fix: prevent float overflow in embedding normalization and cosine similarity by @GellertGG in https://github.com/langchain4j/langchain4j/pull/6339
- fix(vertex-ai-gemini, core): correct WMV and M4A extension-to-MIME mappings by @obielin in https://github.com/langchain4j/langchain4j/pull/6344
- feat(open-ai): support the gpt-5.6+ prompt caching API by @helmirifai-t212 in https://github.com/langchain4j/langchain4j/pull/6272
- fix(bedrock): make image format lookup locale-independent by @obielin in https://github.com/langchain4j/langchain4j/pull/6346
- fix: make Workers AI role and Gemini thinking level mapping locale-independent by @obielin in https://github.com/langchain4j/langchain4j/pull/6348
- chore(deps): bump svgo from 3.3.4 to 3.3.5 in /docs by @dependabot[bot] in https://github.com/langchain4j/langchain4j/pull/6352
- chore(deps): bump js-yaml from 3.15.1 to 3.15.2 in /docs by @dependabot[bot] in https://github.com/langchain4j/langchain4j/pull/6358
- chore(deps): bump joi from 17.13.3 to 17.13.7 in /docs by @dependabot[bot] in https://github.com/langchain4j/langchain4j/pull/6356
- fix(mcp): restore the interrupt status in DefaultMcpClient by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6362
- fix(mcp): reject a malformed prompts/get response instead of returning null by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6367
- Return an unmodifiable list from
AgenticScope.agentInvocations()by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6364 - feat(a2a): fix multi-artifact responses and add streaming event listener by @Shxuuer in https://github.com/langchain4j/langchain4j/pull/6306
- chore(deps): bump colord from 2.9.3 to 2.10.0 in /docs by @dependabot[bot] in https://github.com/langchain4j/langchain4j/pull/6353
- fix(agentic): render non-class argument types in supervisor agent cards by @Snow7-G in https://github.com/langchain4j/langchain4j/pull/6392
- fix: CompressingQueryTransformer NPE on query without metadata by @Tundesjaiyesmi in https://github.com/langchain4j/langchain4j/pull/6388
- fix: make watsonx and Gemini enum conversions locale-independent by @cyone123 in https://github.com/langchain4j/langchain4j/pull/6383
- fix: make Utils.readBytes accept a plain local filesystem path by @Tundesjaiyesmi in https://github.com/langchain4j/langchain4j/pull/6387
- chore(deps): bump nanoid from 3.3.16 to 3.3.19 in /docs by @dependabot[bot] in https://github.com/langchain4j/langchain4j/pull/6393
- fix(mcp): validate the tools/list page before parsing it by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6369
- feat(elasticsearch): make refresh policy configurable by @liziing in https://github.com/langchain4j/langchain4j/pull/6384
- chore(deps): update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.6.3 by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/5884
- chore(deps): update dependency org.apache.maven.plugins:maven-jar-plugin to v3.5.1 by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/5886
- chore(deps): update dependency org.apache.maven.plugins:maven-failsafe-plugin to v3.6.0 by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/5885
- docs(elasticsearch): document and cover the removeAll(Filter) search-visibility window by @liziing in https://github.com/langchain4j/langchain4j/pull/6381
- fix(deps): update dependency org.mariadb.jdbc:mariadb-java-client to v3.5.10 by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/6397
- chore(deps): update dependency org.testng:testng to v7.12.0 by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/6401
- chore(deps): update dependency org.mariadb.jdbc:mariadb-java-client to v3.5.10 by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/6396
- chore(deps): update actions/setup-java digest to b6effb0 by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/6414
- chore(deps): update dependency java-jdk to v17.0.20+101 by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/6415
- fix: make SQL EXTRACT and tool name case conversions locale-independent by @ShubhJ46 in https://github.com/langchain4j/langchain4j/pull/6424
- feat(voyage-ai): support truncation and encoding format as per-call embedding parameters by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6408
- fix(mcp): restore the interrupt status in DockerMcpTransport by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6411
- fix(mcp): do not restart the transport after the client is closed by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6427
- Fix streaming tool call correlation when tool arguments are reformatted by @mzdora in https://github.com/langchain4j/langchain4j/pull/6421
- fix(deps): update dependency org.apache.httpcomponents.client5:httpclient5 to v5.5.2 by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/6048
- feat(google-genai): update google-genai to 1.71.0 and expose AudioTranscriptionConfig by @glaforge in https://github.com/langchain4j/langchain4j/pull/6430
- Fix @ChatModelSupplier with parameters being silently ignored on @SupervisorAgent interfaces by @kdubois in https://github.com/langchain4j/langchain4j/pull/6459
- Allow methods annotated with @McpClientSupplier to also have supplier parameters by @mariofusco in https://github.com/langchain4j/langchain4j/pull/6461
- Fix reading back a chat message or content stored directly as agent state by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6465
- fix(agentic-patterns): make debate convergence locale-independent by @jiboo2022 in https://github.com/langchain4j/langchain4j/pull/6484
- fix(mcp): send
Mcp-Paramheaders on the non-blocking and multi-round-trip tool call paths by @Shxuuer in https://github.com/langchain4j/langchain4j/pull/6495 - fix(deps): update dependency org.bouncycastle:bcprov-jdk18on to v1.85 [security] by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/6464
- test(mcp-docker): widen pull request await timeout to reduce flakiness by @uhhgxg in https://github.com/langchain4j/langchain4j/pull/6503
- fix(deps): update dependency org.apache.httpcomponents.core5:httpcore5 to v5.4.3 [security] by @renovate[bot] in https://github.com/langchain4j/langchain4j/pull/6433
- A2a fixes by @ehsavoie in https://github.com/langchain4j/langchain4j/pull/6512
- fix(agentic): fail with a descriptive error when the planning reply has no agent name by @xinqi123321 in https://github.com/langchain4j/langchain4j/pull/6528
- fix(mcp): preserve dotted parameter names in MCP headers by @aravelo7 in https://github.com/langchain4j/langchain4j/pull/6497
- fix(mcp): do not register a pending operation for messages that expect no reply by @Shxuuer in https://github.com/langchain4j/langchain4j/pull/6530
- Refine the experimental DecisionModel API: text descriptions, text or map input, more shared tests by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/6543
- fix(a2a): treat blank tenant as absent and expose tenant-aware a2aBuilder overloads by @ehsavoie in https://github.com/langchain4j/langchain4j/pull/6546
- fix(a2a): preserve @A2ATenantId positional arg when tenant is pre-con… by @ehsavoie in https://github.com/langchain4j/langchain4j/pull/6548
- fix(a2a): Stateless a2a agent by @Shxuuer in https://github.com/langchain4j/langchain4j/pull/6418
- fix: Widen float metadata values to double in Infinispan IN and NOT IN filters by @thswlsqls in https://github.com/langchain4j/langchain4j/pull/5953
- fix(google-genai): surface generated images from chat responses by @xinqi123321 in https://github.com/langchain4j/langchain4j/pull/6457
- Allow to programmatically define non-AI agents by @mariofusco in https://github.com/langchain4j/langchain4j/pull/6496
- Preserve earlier guardrail rewrites when a later guardrail returns success by @edeandrea in https://github.com/langchain4j/langchain4j/pull/6452
- fix: trim whitespace when coercing tool enum arguments by @rkudryashov in https://github.com/langchain4j/langchain4j/pull/6551
- Update OpenAI Java SDK to 4.73.0 by @subhashpolisetti in https://github.com/langchain4j/langchain4j/pull/6478
- fix(openai): deserialize image token details with Jackson 3 and expose image token usage by @lltx in https://github.com/langchain4j/langchain4j/pull/6450
- fix(jackson3): restore the remaining Jackson 2 defaults and document the deliberate differences by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/6564
New Contributors
- @stlahxm made their first contribution in https://github.com/langchain4j/langchain4j/pull/6096
- @however-yir made their first contribution in https://github.com/langchain4j/langchain4j/pull/6320
- @ReuDa made their first contribution in https://github.com/langchain4j/langchain4j/pull/6246
- @dc-pbrgr made their first contribution in https://github.com/langchain4j/langchain4j/pull/6254
- @liziing made their first contribution in https://github.com/langchain4j/langchain4j/pull/6318
- @GellertGG made their first contribution in https://github.com/langchain4j/langchain4j/pull/6339
- @obielin made their first contribution in https://github.com/langchain4j/langchain4j/pull/6344
- @helmirifai-t212 made their first contribution in https://github.com/langchain4j/langchain4j/pull/6272
- @Shxuuer made their first contribution in https://github.com/langchain4j/langchain4j/pull/6306
- @cyone123 made their first contribution in https://github.com/langchain4j/langchain4j/pull/6383
- @ShubhJ46 made their first contribution in https://github.com/langchain4j/langchain4j/pull/6424
- @mzdora made their first contribution in https://github.com/langchain4j/langchain4j/pull/6421
- @kdubois made their first contribution in https://github.com/langchain4j/langchain4j/pull/6459
- @jiboo2022 made their first contribution in https://github.com/langchain4j/langchain4j/pull/6484
- @uhhgxg made their first contribution in https://github.com/langchain4j/langchain4j/pull/6503
- @xinqi123321 made their first contribution in https://github.com/langchain4j/langchain4j/pull/6528
- @maeste made their first contribution in https://github.com/langchain4j/langchain4j/pull/6469
- @rkudryashov made their first contribution in https://github.com/langchain4j/langchain4j/pull/6551
Full Changelog: https://github.com/langchain4j/langchain4j/compare/1.20.2...1.21.0