Download Latest Version 1.22.0 and 1.22.0-beta32 source code.zip (18.1 MB) Google Add to Preferred Sources
Home / 1.21.0
Name Modified Size InfoDownloads / 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.

  • DecisionModel API (#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/systemone protocol, 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): RoutingChatModel sends 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 any DecisionModel.
  • Agentic router (#6561): DecisionRouterPlanner uses 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

Other Changes

New Contributors

Full Changelog: https://github.com/langchain4j/langchain4j/compare/1.20.2...1.21.0

Source: README.md, updated 2026-10-02