Adapters

Every supercompat() call takes three adapters:
const client = supercompat({ clientAdapter, storageAdapter, runAdapter, })
Each handles a single concern. You pick one of each, and together they decide how a call to the OpenAI SDK is routed.

The three types

How they combine

The client adapter owns the wire — it talks to the provider. The run adapter owns the run loop — it decides what kind of call to make and how to turn the response into streaming events. The storage adapter owns the stateful surface — assistants, threads, messages, runs, and conversations.
A request flowing through a Supercompat client is handled in three stages:
StageResponsibilityExample
StoragePersist and read stateful entitiesCreate a thread, append a message, open a run
RunExecute the run loop against the providerCall /chat/completions, stream deltas back
ClientTalk the underlying provider protocolPOST to /v1/chat/completions on Anthropic

Compatible combinations

Not every adapter combination is meaningful.
completionsRunAdapter works with every client adapter. It's the recommended choice for Anthropic, Mistral, Groq, Together, OpenRouter, Perplexity, and Ollama.
openaiResponsesRunAdapter requires openaiClientAdapter. The Responses API is OpenAI-native.
geminiRunAdapter requires googleClientAdapter. Calls Gemini's generateContent directly for native Google tools.
azureAgentsRunAdapter requires azureAiProjectClientAdapter. Azure Agents is an Azure-native surface.
memoryStorageAdapter and prismaStorageAdapter work with every run adapter.
openaiResponsesStorageAdapter pairs with openaiResponsesRunAdapter.
azureResponsesStorageAdapter pairs with azureResponsesRunAdapter.
When in doubt, start with completionsRunAdapter and prismaStorageAdapter — that pair works against every provider.