v1.9.0 — getRoutingInfo, onIteration abort, deprecation warnings
What's new
getRoutingInfo() — pre-flight routing snapshot
Call once at ingress to get { useCase, provider, model, estimatedInputTokens, modelLifecycle, deprecationWarning, ... } without dispatching. Pair with request.metadata.useCase to pre-classify at the gateway layer and let the catalog engine drive dispatch.
metadata.useCase passthrough
resolveUseCase() in the factory now reads request.metadata.useCase directly. Gateways classify once, set the field, and the catalog honours it.
onIteration abort — ToolLoopAbortSignal
Return { abort: true, reason? } from the onIteration callback in generateResponseWithTools to stop a tool loop immediately. ToolLoopAbortedError is thrown. Void-returning callbacks are unaffected.
Response deprecation annotations
generateResponse() attaches metadata.llmProvidersDeprecationWarning to any response using a compatibility or retired lifecycle model. The two Cerebras models deprecating 2026-05-27 surface warnings starting today.
VERSION constant fix
Was hardcoded '0.1.0' since v1.0.0; now tracks the real package version.
Full changelog
See CHANGELOG.md.