* fix(history): preserve routed limits and provider checkpoint continuity Honor admitted account and peer policy, retain complete bounded provider checkpoints across short history windows, and recover unsupported replay from durable conversation history. Co-authored-by: ayaangazali <ayaangazali.work@gmail.com> * test(history): preserve the JSON recovery serialization assertion * test(history): assert context-engine admission and snapshot behavior * fix(ai): preserve SDK compaction response lifetime Bound compaction response bytes before SDK parsing so request deadlines, body retries, and typed cancellation retain their canonical owner. Co-authored-by: ayaangazali <ayaangazali.work@gmail.com> * refactor(ai): simplify compaction test lifecycle and Azure URL normalization Co-authored-by: ayaangazali <ayaangazali.work@gmail.com> * test(ai): use the shared deferred helper for compact HTTP checks Co-authored-by: ayaangazali <ayaangazali.work@gmail.com> --------- Co-authored-by: Peter Steinberger <steipete@gmail.com> Co-authored-by: ayaangazali <ayaangazali.work@gmail.com>
@openclaw/ai
Reusable model API contracts, provider adapters, and streaming primitives from OpenClaw. The package supports isolated runtime instances; importing it does not register providers globally.
import { createLlmRuntime } from "@openclaw/ai";
import { registerBuiltInApiProviders } from "@openclaw/ai/providers";
const runtime = createLlmRuntime();
registerBuiltInApiProviders(runtime.registry);
Provider-neutral contracts, validation, diagnostics, and event streams are
available from the package root and focused subpaths such as
@openclaw/ai/event-stream, @openclaw/ai/transports, and
@openclaw/ai/validation. No second OpenClaw runtime package is required.
Provider ids, credentials, model catalogs, retries, and failover remain
application concerns. OpenClaw supplies those policies around this package.
Host policy (request fetch guarding, secret redaction, strict-tool defaults,
provider plugin hooks, and diagnostics logging) can be injected with
configureAiTransportHost; the defaults are inert.
The explicit @openclaw/ai/internal/anthropic, openai, retry-after,
runtime, and shared subpaths exist for the OpenClaw application itself.
They carry no semver guarantee and can change or disappear in any release; do
not depend on them outside OpenClaw.