PackageTrack
Sign in Get early access

ai_sdk_openai

OpenAI provider for the AI SDK Dart port.

2.0.0 codenameakshay/ai_sdk_dart

What this package is like to depend on

Last release 12 days ago

11 Aug 2026

Ships fairly regularly

a new release about every 6 weeks

Nearly every release is documented

notes for 5 of 5 stable releases

Nothing withdrawn

no release was ever pulled

5 months old

5 releases · first in 2026

5 releases in the last 12 months

see the full history below

Release timeline

5 releases · Mar 2026 to Aug 2026
Release Pre-release

Releases

latest 5
  1. 2.0.0 11 Aug 2026
    Release notes

    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

    Open source →
    Release notes
    • Migrated chat language models to the V4 provider contract and added provider-neutral reasoning controls, structured response formats, nested usage, and in-flight request cancellation through the shared base.
    • Fixed: streaming and non-streaming reasoning/thinking is now surfaced (via the shared ai_sdk_openai_compatible base). When an OpenAI-compatible endpoint returns reasoning deltas (reasoning_content / reasoning / thinking), they are emitted as reasoning parts, so streamText's fullStream reasoning events, result.reasoning, and generateText(...).reasoning are populated. Fixes #3.
    Open source →
  2. 1.2.0 01 Jul 2026
    Release notes

    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 AiApiCallError carrying the provider's message, type, code, statusCode, raw body, and an isRetryable flag — consistently across every provider. The AiSdkError hierarchy moved into ai_sdk_provider (re-exported by ai_sdk_dart, so the public surface is unchanged).

    🧩 Shared ai_sdk_openai_compatible base (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/response HttpClientTransport; web-safe — dart:io is 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, an AiMotion motion/haptics vocabulary, and a first-class reduced-motion path. Fixed a PressableScale crash-on-dispose under reduced motion.

    ✅ Correctness

    onAbort now interrupts an in-flight streamText; stopWhen can extend the tool loop past maxSteps. Removed the unusable generateVideo / VideoModelV1 (no backing provider). OpenAI image generation no longer sends response_format to gpt-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_ui

    See each package's CHANGELOG.md for full details.

    Full Changelog: 1.1.0...1.2.0

    Open source →
    Release notes
    • Refactored onto the shared ai_sdk_openai_compatible base. The OpenAI Chat Completions wire format (multimodal content parts, tools / tool_choice, response_format JSON schema, SSE streaming + usage, non-streaming tool-call parsing) now lives in one place that the OpenAI provider configures. No public API or behavior change.
    • Errors: non-2xx responses on the embeddings / image / speech / transcription endpoints (and chat, via the shared base) now throw a typed AiApiCallError instead of a raw DioException.
    • Fixed: no longer sends response_format when generating images with gpt-image-1 (the model rejects the parameter with a 400).
    • Now requires ai_sdk_openai_compatible ^1.2.0.
    • 100% line coverage.

    Open source →
  3. 1.1.0 15 Apr 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 1.0.0+1...1.1.0

    Open source →
    Release notes

    New Features

    • OpenAILanguageModelOptions — typed options class for OpenAI-specific call settings.
      • reasoningEffort'low' | 'medium' | 'high' passed as reasoning_effort in the request body (for o1, o3, o4-mini reasoning models).
      • reasoningSummary'auto' | 'concise' | 'detailed' passed as reasoning_summary.
      • Pass via providerOptions: {'openai': options.toMap()} or directly as snake_case keys.
    • Native structured output (response_format: json_schema) — when LanguageModelV3CallOptions.outputSchema is set (automatically set by generateObject / streamObject), the provider sends response_format: {type: 'json_schema', json_schema: {name: 'response', schema: ..., strict: true}} instead of relying solely on system-prompt instructions.

    Open source →
  4. 1.0.0 17 Mar 2026
    Release notes

    First stable release. Depends on ai_sdk_dart 1.0.0.

    • openai('gpt-4.1-mini') factory — create language model instances for any OpenAI-compatible endpoint.
    • openaiEmbedding(modelId) — text embedding models (text-embedding-3-small / large).
    • openaiImage(modelId) — image generation (DALL-E 3).
    • Full SSE streaming with tool call delta accumulation.
    • stream_options: {include_usage: true} for streaming usage reporting.
    • Tool choice mapping: auto / required / none / specific.
    • Strict tool schema forwarding (strict: true).
    • Extended thinking passthrough via provider metadata.
    • Source, file content, and raw finish reason forwarding.
    • Configurable baseUrl for Azure OpenAI and compatible endpoints.

    Open source →
  5. 1.0.0+1 17 Mar 2026
    Release notes Open source →
    Release notes
    • Improved pubspec descriptions for better pub.dev discoverability.
    • Added example/example.md with usage examples and links to runnable apps.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive