0.7.0 finishes the API review of the seven modules 1.0 freezes, and is the release their binary-compatibility baseline is set at: what it publishes is what 1.0 keeps, and 1.0 is the next release. It is the last release that breaks freely, so upgrading takes more than usual.
What is new
- One model call contract: every
Completionhas a typedFinishReason, and a content-filter stop, a stream that did not finish and a broken tool call are errors on every provider, not partial answers (RFC 0009).llm4s-provider-testkit’sassertModelCallContractchecks a provider against it. - One error model:
LLMError.isRetryableis the single retry rule, every error reportshttpStatus,retryAfterandrequestId, and a context-length overflow and an unknown model areContextLengthErrorandModelNotFoundError(#2916). - Generation controls:
thinking,promptCacheandserviceTieronCompletionOptions, mapped per provider, with what a provider could not honour reported onCompletion.adjustments(cost controls, RFC 0008). - Typed names: a model id is a
ModelName, a provider id aProviderId, a base URL aBaseUrland a tool call’s id aToolCallIdwherever it crosses the public API; provider clients are final with one factory, andLLMClient.validate()checks the provider with one cheap request. - Agents:
llm4s-agenthas a small@Stablecore, with the rest marked@Experimental(API stability). Input guardrails run before anything of a turn is stored (guardrails), an answer cut off at the output limit endsAgentStatus.Truncated, checkpoints can be encrypted at rest, andAgent.abandoncloses a run that will not be recovered. - RAG: answers stream and take a conversation history, a document registry can live in PostgreSQL, and a
RAGwith aSearchIndexno longer ingests or queries without permissions. - Supply chain: from this release the jars, POMs, SBOMs and the
workspace-runnerimage carry SLSA build provenance (verifying releases).
Upgrading
0.7.0 has about a hundred breaking changes, most of them renames and tightened types from the API review. Start from From 0.6.0 to 0.7.0, which groups the migration notes by area. The ones most code meets:
error.isRetryablereplacesisRecoverableand theRecoverableErrormarkers (migration note).- A model id is a
ModelNameand a provider id aProviderId(migration note). llm4s.providers.provideris nowllm4s.defaultProvider(migration note).client.streamComplete(conversation, options)(onChunk)takes its callback in a second parameter list, and a chunk’s text iscontentDelta(migration notes).- A content-filter stop, a cut stream and a broken tool call are a
Left, where they were aCompletion(migration note). - A tool handler returns
Either[ToolHandlerError, R], andToolBuilderhas one type parameter (migration note). newon a provider client no longer compiles: use its factory, orLLMConnect.getClient(migration note).- An agent turn can end
AgentStatus.Truncated, which an exhaustivematchmust handle (migration note).
The Scalafix rule Llm4sMigrateFrom_0_6 rewrites the mechanical part; it is not published yet
(#2330, Scalafix). From here to
1.0 a patch release does not break, and from 1.0 the frozen modules keep binary compatibility across 1.x
(compatibility policy). 0.6.x is superseded and gets no fixes: which
releases do, and for how long, is in the support policy.
Install
libraryDependencies ++= Seq(
"org.llm4s" %% "llm4s-core" % "0.7.0",
"org.llm4s" %% "llm4s-openai" % "0.7.0" // or the provider module you use
)
Every artifact, with its tier: installation guide.
Full list of changes: CHANGELOG · GitHub release