Skip to main content Link Menu Expand (external link) Document Search Copy Copied

News · release

LLM4S 0.7.0: the baseline release before 1.0

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 Completion has a typed FinishReason, 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’s assertModelCallContract checks a provider against it.
  • One error model: LLMError.isRetryable is the single retry rule, every error reports httpStatus, retryAfter and requestId, and a context-length overflow and an unknown model are ContextLengthError and ModelNotFoundError (#2916).
  • Generation controls: thinking, promptCache and serviceTier on CompletionOptions, mapped per provider, with what a provider could not honour reported on Completion.adjustments (cost controls, RFC 0008).
  • Typed names: a model id is a ModelName, a provider id a ProviderId, a base URL a BaseUrl and a tool call’s id a ToolCallId wherever it crosses the public API; provider clients are final with one factory, and LLMClient.validate() checks the provider with one cheap request.
  • Agents: llm4s-agent has a small @Stable core, 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 ends AgentStatus.Truncated, checkpoints can be encrypted at rest, and Agent.abandon closes a run that will not be recovered.
  • RAG: answers stream and take a conversation history, a document registry can live in PostgreSQL, and a RAG with a SearchIndex no longer ingests or queries without permissions.
  • Supply chain: from this release the jars, POMs, SBOMs and the workspace-runner image 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.isRetryable replaces isRecoverable and the RecoverableError markers (migration note).
  • A model id is a ModelName and a provider id a ProviderId (migration note).
  • llm4s.providers.provider is now llm4s.defaultProvider (migration note).
  • client.streamComplete(conversation, options)(onChunk) takes its callback in a second parameter list, and a chunk’s text is contentDelta (migration notes).
  • A content-filter stop, a cut stream and a broken tool call are a Left, where they were a Completion (migration note).
  • A tool handler returns Either[ToolHandlerError, R], and ToolBuilder has one type parameter (migration note).
  • new on a provider client no longer compiles: use its factory, or LLMConnect.getClient (migration note).
  • An agent turn can end AgentStatus.Truncated, which an exhaustive match must 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


All news · Subscribe (Atom)