@ai-sdk/openai-compatible
An adapter package in the Vercel AI SDK ecosystem for third-party services compatible with the OpenAI API specification. It allows any service that follows the OpenAI Chat Completions protocol to be integrated into the AI SDK.
Core Facts
xAI provides an OpenAI-compatible API interface, which was the basis for early @ai-sdk/xai being able to adapt via the Chat Completions endpoint.
@ai-sdk/[email protected] synchronously updated upstream dependencies: @ai-sdk/[email protected], @ai-sdk/[email protected], and @ai-sdk/[email protected].
@ai-sdk/togetherai is the official Vercel AI SDK adapter for the TogetherAI platform, built on top of the openai-compatible base package.
Timeline (last 90 days)
@ai-sdk/openai-compatible assumes that the target service implements OpenAI's REST API contract—the same /chat/completions path, the same Authorization: Bearer authentication, and the same SSE streaming chunk format.
Developers who want to understand the specific details of this update should consult the changelogs for the corresponding versions of @ai-sdk/provider-utils and @ai-sdk/openai-compatible.
Infrastructure-layer updates such as provider-utils and openai-compatible often involve optimizations in areas such as request retries, error handling, and streaming response parsing.
Each Provider adapter package only needs to configure a Base URL and authentication method to reuse the full inference capabilities of openai-compatible, reducing the cost of onboarding new models.
The openai-compatible package encapsulates common logic such as request construction, streaming SSE parsing, and function/tool calling, allowing providers to connect simply by configuring the endpoint and authentication method.
@ai-sdk/zai is built on the @ai-sdk/openai-compatible compatibility layer and only requires configuring Zhipu-specific endpoint addresses and parameters.
Together AI's adapter is built on top of the OpenAI-compatible protocol, and @ai-sdk/togetherai is built on top of the @ai-sdk/openai-compatible adapter layer.
xAI provides an OpenAI-compatible API interface, which was the basis for early @ai-sdk/xai being able to adapt via the Chat Completions endpoint.
@ai-sdk/[email protected] is a patch version update, the core of which is updating the underlying dependency package versions
@ai-sdk/openai-compatible handles common logic such as streaming output, tool calling, and error format normalization.
6 more timeline events
All Facts (14)
xAI provides an OpenAI-compatible API interface, which was the basis for early @ai-sdk/xai being able to adapt via the Chat Completions endpoint.
90%Verified@ai-sdk/[email protected] synchronously updated upstream dependencies: @ai-sdk/[email protected], @ai-sdk/[email protected], and @ai-sdk/[email protected].
90%Verified@ai-sdk/togetherai is the official Vercel AI SDK adapter for the TogetherAI platform, built on top of the openai-compatible base package.
90%VerifiedThe zai provider depends on @ai-sdk/openai-compatible, indicating it is most likely built on top of an OpenAI-compatible interface.
85%Verified@ai-sdk/zai is built on the @ai-sdk/openai-compatible compatibility layer and only requires configuring Zhipu-specific endpoint addresses and parameters.
75%Verified@ai-sdk/openai-compatible handles common logic such as streaming output, tool calling, and error format normalization.
75%Unverified@ai-sdk/openai-compatible assumes that the target service implements OpenAI's REST API contract—the same /chat/completions path, the same Authorization: Bearer authentication, and the same SSE streaming chunk format.
50%UnverifiedDevelopers who want to understand the specific details of this update should consult the changelogs for the corresponding versions of @ai-sdk/provider-utils and @ai-sdk/openai-compatible.
50%UnverifiedInfrastructure-layer updates such as provider-utils and openai-compatible often involve optimizations in areas such as request retries, error handling, and streaming response parsing.
50%UnverifiedEach Provider adapter package only needs to configure a Base URL and authentication method to reuse the full inference capabilities of openai-compatible, reducing the cost of onboarding new models.
50%UnverifiedThe openai-compatible package encapsulates common logic such as request construction, streaming SSE parsing, and function/tool calling, allowing providers to connect simply by configuring the endpoint and authentication method.
50%UnverifiedTogether AI's adapter is built on top of the OpenAI-compatible protocol, and @ai-sdk/togetherai is built on top of the @ai-sdk/openai-compatible adapter layer.
50%UnverifiedThe decision of @ai-sdk/zai to wrap @ai-sdk/openai-compatible rather than implement from scratch involves the trade-off of reducing duplicate code and automatically syncing upstream fixes, but also means tight coupling to the upstream versioning cadence.
50%UnverifiedZAI provider version 1.0.3 upgrades @ai-sdk/openai-compatible to version 1.0.54.
50%