Skip to content

Adapters

SDK vNext keeps framework adapters outside the base @nimiplatform/sdk package. Adapters are migration bridges and framework projections; they do not own Runtime routing, Realm truth, or SDK core API semantics.

The old @nimiplatform/sdk/ai-provider subpath is removed. It must fail closed instead of forwarding to a vNext adapter.

Current Adapter Posture

AdapterPackage / boundaryRole
Vercel AI@nimiplatform/sdk-adapter-vercel-aiMaps Vercel Language Model calls onto Nimi AI/runtime semantics
OpenAI-compatibleSDK adapter source root under sdks/typescript/adapters/openai-compatibleMigration bridge for OpenAI-compatible chat completion shapes
MCP / Next / React / LangGraph / LlamaIndex / MastraAdapter source roots under sdks/typescript/adapters/*Integration projections, not base SDK subpaths

An adapter may depend on @nimiplatform/sdk/ai, @nimiplatform/sdk/agent, @nimiplatform/sdk/runtime, or feature modules. It may not reintroduce removed base SDK subpaths.

Boundary

ConcernOwner
Runtime routing, provider readiness, auditRuntime
SDK core AI request/response semantics@nimiplatform/sdk/ai
Agent runner and identity semantics@nimiplatform/sdk/agent
Framework call-shape mappingAdapter package
OpenAI-compatible request/response bridgeOpenAI-compatible adapter boundary

Adapters fail closed on unsupported framework features. They must not fabricate success, invent provider capability, or bypass Runtime readiness.

Reader Scenario: Vercel AI Migration

An app using Vercel AI should install the independent adapter package and keep the base SDK dependency explicit:

ts
import { createNimiVercelAiModel } from '@nimiplatform/sdk-adapter-vercel-ai';
import { createNimiClient } from '@nimiplatform/sdk';

The adapter maps Vercel call shapes onto Nimi's AI/runtime surface. Runtime still owns routing and execution. The adapter owns only framework projection.

Reader Scenario: OpenAI-Compatible Bridge

An app with OpenAI-compatible chat-completion call sites can migrate through the OpenAI-compatible adapter boundary. That bridge preserves the compatibility shape only where it is explicitly supported. Unsupported OpenAI-compatible features return typed failures instead of falling through to raw Runtime or provider-native bypasses.

Source Basis

Nimi AI open world platform documentation.