ai_sdk_openai_compatible
Shared OpenAI Chat Completions base for AI SDK Dart providers. Implements tool calling, multimodal content, structured output, and SSE streaming once, behind a small per-provider config.
What this package is like to depend on
Last release 12 days ago
11 Aug 2026
Too new to tell
only 2 dated releases
Nearly every release is documented
notes for 2 of 2 stable releases
Nothing withdrawn
no release was ever pulled
1 months old
2 releases · first in 2026
2 releases in the last 12 months
see the full history below
Release timeline
2 releases · Jul 2026 to Aug 2026Releases
latest 2-
2.0.011 Aug 2026Release notes
Open source →AI SDK Dart 2.0 is a coordinated major release across all 13 packages.
Highlights
- V4 is now the only language-model provider contract.
- Generation and streaming gain scoped timeouts, provider-backed cancellation, stable runtime context and telemetry APIs, structured output improvements, and safer streamed tool execution.
- Provider usage reports nested input/output token details, including cache reads and writes where available.
- Flutter UI gains polished tool approval, source citation, reasoning, streaming, error, and long-history experiences.
- MCP transports and lifecycle handling are substantially hardened.
Breaking changes
Upgrade every ai_sdk package together. The obsolete V3 language-model contract, experimental API names, video surface, and old provider call fields were removed without compatibility shims.
Read the 2.0 migration guide before upgrading.
Packages
All 13 packages are published on pub.dev.
What's Changed
- fix(openai): surface reasoning/thinking deltas on streaming + non-streaming paths (fixes #3) by @codenameakshay in #7
- chore: add SessionStart hook to provision Flutter via FVM on the web by @codenameakshay in #5
- feat(usage): map provider cache tokens into inputTokenDetails by @codenameakshay in #9
- Prepare the next release with V4 providers and hardened UX by @codenameakshay in #10
- Prepare the coordinated 2.0.0 release by @codenameakshay in #11
Full Changelog: 1.2.0...2.0.0
Release notes
Open source →- Breaking: migrated the shared language model to the V4 provider contract with unified tools, typed response formats, nested usage, and full stream lifecycle events.
- Mapped cached prompt tokens into the nested input-token usage breakdown for OpenAI-compatible providers.
- Abort signals now cancel live Dio requests and surface a typed cancellation error; streamed warnings are normalized into structured warning types.
- Provider-managed authentication headers now take precedence over per-call headers; custom non-conflicting headers are still forwarded.
- Fixed: the streaming (
doStream) and non-streaming (doGenerate) paths now surface model reasoning/thinking. Streamingdeltareasoning is emitted asStreamPartReasoningDelta, and non-streamingmessagereasoning as aLanguageModelV4ReasoningPart, sostreamText(...).fullStream/result.reasoningandgenerateText(...).reasoningare populated when the provider returns it. Previously reasoning was silently dropped. - New:
OpenAICompatibleConfig.reasoningKeys— the response field names checked (in order) for reasoning text. Defaults to['reasoning_content', 'reasoning', 'thinking'], covering DeepSeek (reasoning_content), OpenRouter (reasoning), andthinking-style hosts; set toconst []to disable extraction. Benefits every provider built on this base (OpenAI, Azure, Groq, Mistral, …).
-
1.2.001 Jul 2026Release notes
Open source →Coordinated 1.2.0 release across all 13 packages — now live on pub.dev. A v6 hardening pass that makes the AI SDK Dart port more complete, honest, and tested.
Highlights
🚨 Typed provider API errors (new)
Non-2xx provider responses now throw a typed
AiApiCallErrorcarrying the provider'smessage,type,code,statusCode, raw body, and anisRetryableflag — consistently across every provider. TheAiSdkErrorhierarchy moved intoai_sdk_provider(re-exported byai_sdk_dart, so the public surface is unchanged).🧩 Shared
ai_sdk_openai_compatiblebase (new package)A shared OpenAI Chat Completions implementation now powers OpenAI / Azure / Groq / Mistral. All 8 providers support tool use + multimodal image input; Cohere & Ollama gained them natively.
🔌 MCP
Real Server-Sent-Events streaming transport (
SseClientTransport) plus a plain request/responseHttpClientTransport; web-safe —dart:iois isolated behind conditional imports, so the client runs on Flutter web.📱 Flutter UI hub
19 prebuilt, themeable Material widgets plus hardened controllers (
ObjectStreamController.submit,ChatController.isStreaming, streaming-error surfacing). A restrained Material 3 redesign — bubbleless assistant transcript, anAiMotionmotion/haptics vocabulary, and a first-class reduced-motion path. Fixed aPressableScalecrash-on-dispose under reduced motion.✅ Correctness
onAbortnow interrupts an in-flightstreamText;stopWhencan extend the tool loop pastmaxSteps. Removed the unusablegenerateVideo/VideoModelV1(no backing provider). OpenAI image generation no longer sendsresponse_formattogpt-image-1.🧪 Quality
1,057 tests (924 Dart + 133 Flutter), 99.9% line coverage (11 of 12 packages at 100%), enforced by a CI coverage gate.
Packages (all published at 1.2.0)
ai_sdk_provider·ai_sdk_dart·ai_sdk_openai_compatible·ai_sdk_openai·ai_sdk_anthropic·ai_sdk_google·ai_sdk_azure·ai_sdk_cohere·ai_sdk_groq·ai_sdk_mistral·ai_sdk_ollama·ai_sdk_mcp·ai_sdk_flutter_uiSee each package's
CHANGELOG.mdfor full details.Full Changelog: 1.1.0...1.2.0
Release notes
Open source →First release (versioned 1.2.0 to align with the AI SDK Dart monorepo).
OpenAICompatibleChatLanguageModel— a fullLanguageModelV3implementation of the OpenAI Chat Completions wire format: multimodal content parts (text + image + audio + file),tools/tool_choice(withstrict),response_formatJSON-schema, SSE streaming (text deltas + index-based tool-call delta state machine + finish + usage), non-streaming tool-call parsing, and finish-reason mapping.apiErrorFromDioException(...)— a shared Dio→AiApiCallErrorbridge (delegating toAiApiCallError.fromResponse) so non-2xx responses surface as a typedAiApiCallErroron both the non-streaming and stream-setup paths. Imported by the OpenAI / Azure / Groq / Mistral providers.OpenAICompatibleConfig— a small config object parameterizing the per-provider quirks: auth header scheme, base URL, query parameters (e.g. Azureapi-version), body field name overrides (seedvsrandom_seed,max_tokensvsmax_completion_tokens), feature flags (supportsTools,supportsMultimodal,supportsResponseFormatJsonSchema), anextraBodyhook for provider-specific fields, and aDiofactory.