PackageTrack
Sign in Get early access

ollama_dart

Dart client for the Ollama API to run LLMs locally (OpenAI gpt-oss, DeepSeek-R1, Gemma 3, Llama 4, and more).

2.5.0 12K downloads/mo #2771 most downloaded on pub.dev davidmigloz/ai_clients_dart

What this package is like to depend on

Last release 21 days ago

02 Aug 2026

Release timing varies

gaps range from 9 days to 5 months

Nearly every release is documented

notes for 34 of 34 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

34 releases · first in 2023

17 releases in the last 12 months

see the full history below

Release timeline

34 releases · Nov 2023 to Aug 2026
2024 2025 2026
Release Pre-release

Releases

latest 34
  1. 2.5.0 02 Aug 2026
    Release notes

    Adds renderer and parser to CreateRequest, matching the upstream OpenAPI spec's new tool-calling prompt renderer (e.g. qwen3.5) and output parser (e.g. harmony) fields. Also adds client-ahead fields for full api/types.go parity that the spec still omits — files/adapters (filename → SHA256 digest maps, per the Create a Model docs) for creating models from GGUF/Safetensors and LoRA adapters, plus draftQuantize/draftFiles, remoteHost, requires, and info. Also fixes CreateRequest's ==/hashCode/toString contract, which previously only compared model, to cover all 18 fields with content-based map/list equality.

    • FEAT: CreateRequest renderer/parser and files/adapters (#285). (c8a61de9)
    Open source →
  2. 2.4.0 05 Jul 2026
    Release notes

    Adds the new max thinking level (ThinkLevel.max), matching Ollama's spec update that added "max" to the think enum on ChatRequest and GenerateRequest — use ChatRequest(..., think: ThinkWithLevel(ThinkLevel.max)) to request the highest thinking level on supported reasoning models. Also fixes buildUrl producing a double slash (//api/...) when OllamaConfig.baseUrl (or OLLAMA_HOST) has a trailing slash, and preserves base-URL query params (including repeated keys) that were previously dropped — proxy setups with tokens in the base URL now work correctly.

    • FEAT: Add "max" thinking level (#267). (8061f857)
    • FIX: Avoid double slash and preserve base URL query params in buildUrl (#273). (7686e397)
    Open source →
  3. 2.3.0 06 Jun 2026
    Release notes

    Adds experimental image generation to the /api/generate endpoint: GenerateRequest gains width/height/steps, and GenerateResponse and the streaming GenerateStreamEvent gain image (base64), completed, and total for diffusion progress. These fields are implemented client-side ahead of the upstream spec, which keeps them out of openapi.yaml while they remain experimental. Also adds the draftNumPredict model option to ModelOptions and completes the previously-partial ==/hashCode/toString contracts on GenerateStreamEvent and ChatStreamEvent, which had compared only a subset of fields.

    • FEAT: Add experimental image generation and draft_num_predict option (#254). (04b901a3)
    Open source →
  4. 2.2.0 24 May 2026
    Release notes

    Fixes browser usage (Flutter Web / dart2wasm) by no longer sending the non-CORS-safelisted X-Request-ID header by default — Ollama's Access-Control-Allow-Headers list excludes it, so the preflight previously failed and blocked all browser requests against a real Ollama server. A request ID is still generated internally for logging, error correlation, and retry/abort tracing; the new OllamaConfig(sendRequestIdHeader: true) opt-in restores the wire header for callers behind a proxy configured to accept it, and an X-Request-ID set explicitly via defaultHeaders is always sent.

    • FEAT: Make X-Request-ID header opt-in to fix browser CORS (#228). (f497a722)
    Open source →
  5. 2.1.0 16 Apr 2026
    Release notes

    Annotates llms.txt with per-link token counts and per-package totals so coding agents can budget context before fetching documentation, examples, or changelogs — inspired by Addy Osmani's Agentic Engine Optimization article.

    • FEAT: Annotate llms.txt with token counts and tighten agent-facing docs (#181). (a1e82aca)
    Open source →
  6. 2.0.1 29 Mar 2026
    Release notes

    Adds a strict semver bullet to the package README.

    • DOCS: Overhaul root README and add semver bullet to all packages (#151). (e6af33dd)
    Open source →
  7. 2.0.0 27 Mar 2026
    Release notes

    [!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.

    Replaces untyped Object/Object? fields with sealed union types (KeepAlive, EmbedInput, StopSequence) for improved type safety across request models. Also adds a name field to RunningModel from the upstream Ollama API update and overhauls README documentation with llms.txt ecosystem files.

    • BREAKING REFACTOR: Replace Object fields with sealed union types (#120). (5d7a4f24)
    • FEAT: Add name field to RunningModel and update spec (#142). (4fc2e1bb)
    • DOCS: Overhaul READMEs and add llms.txt ecosystem (#149). (98f11483)
    Open source →
  8. 1.4.1 12 Mar 2026
    Release notes

    Fixed verification warnings in generated model classes.

    Open source →
  9. 1.4.0 10 Mar 2026
    Release notes

    This release adds inline streaming error detection for improved reliability when handling streamed responses.

    • FEAT: Detect inline streaming errors (#91). (9f0eaf37)
    • DOCS: Improve READMEs with badges, sponsor section, and vertex_ai deprecation (#90). (5741f2f3)
    Open source →
  10. 1.3.0 06 Mar 2026
    Release notes

    Added missing fields to chat, completion, and model response models.

    • FEAT: Add missing fields to response models (#80). (73e44241)
    Open source →
  11. 1.2.1 06 Mar 2026
    Release notes

    Internal improvements to build tooling and package publishing configuration.

    • REFACTOR: Migrate API skills to the shared api-toolkit CLI (#74). (923cc83e)
    • CHORE: Add .pubignore to exclude .agents/ and specs/ from publishing (#78). (0ff199bf)
    Open source →
  12. 1.2.0 04 Mar 2026
    Release notes

    Added baseUrl and defaultHeaders parameters to withApiKey constructors, fixed hashCode for list fields, and unified equality helpers.

    • FEAT: Add baseUrl and defaultHeaders to withApiKey constructors (#57). (f0dd0caa)
    • FIX: Use Object.hashAll() for list fields in hashCode (#65). (4b19abd9)
    • REFACTOR: Unify equality_helpers.dart across packages (#67). (ec2897f8)
    Open source →
  13. 1.1.0 04 Mar 2026
    Release notes

    Added withApiKey convenience constructor for simplified client initialization.

    • FEAT: Add withApiKey convenience constructors (#56). (b06e3df3)
    • CHORE: Bump googleapis from 15.0.0 to 16.0.0 and Dart SDK to 3.9.0 (#52). (eae130b7)
    • CI: Add GitHub Actions test workflow (#50). (6c5f079a)
    Open source →
  14. 1.0.0 03 Mar 2026
    Release notes

    [!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.

    TL;DR: Complete reimplementation with a new architecture, minimal dependencies, resource-based API, and improved developer experience. Hand-crafted models (no code generation), interceptor-driven architecture, comprehensive error handling, and full Ollama API coverage.

    What's new

    • Resource-based API organization:
      • client.chat — Chat completions (multi-turn conversations)
      • client.completions — Text generation (single-turn)
      • client.embeddings — Generate text embeddings
      • client.models — Model management (list, show, pull, push, copy, delete, create, ps)
      • client.version — Server version info
    • Architecture:
      • Interceptor chain (Auth → Logging → Error → Transport with Retry wrapper).
      • Authentication: Bearer token or custom via AuthProvider interface.
      • Retry with exponential backoff + jitter (only for idempotent methods on 429, 5xx, timeouts).
      • Abortable requests via abortTrigger parameter.
      • NDJSON streaming parser for real-time responses.
      • Central OllamaConfig (timeouts, retry policy, log level, baseUrl, auth).
    • Hand-crafted models:
      • No code generation dependencies (no freezed, json_serializable).
      • Minimal runtime dependencies (http, logging only).
      • Immutable models with copyWith using sentinel pattern.
      • Full type safety with sealed exception hierarchy.
    • Type-safe enums and sealed classes:
      • DoneReason enum for completion stop reasons (stop, length, load, unload).
      • ThinkValue sealed class for thinking mode (ThinkEnabled, ThinkWithLevel).
      • ResponseFormat sealed class for format options (JsonFormat, SchemaFormat).
      • MessageRole enum for message roles (system, user, assistant, tool).
    • Improved DX:
      • Simplified model names (e.g., ChatRequest instead of GenerateChatCompletionRequest).
      • Named constructors for common patterns (e.g., ChatMessage.user(), ChatMessage.system()).
      • Explicit streaming methods (createStream() vs create()).
      • Rich logging with field redaction for sensitive data.
    • Full API coverage:
      • Chat completions with tool calling support.
      • Text completions with thinking mode.
      • Embeddings generation.
      • Model management (list, show, create, copy, delete, pull, push, ps).
      • Server version info.

    Breaking Changes

    • Resource-based API: Methods reorganized under strongly-typed resources:
      • client.generateChatCompletion()client.chat.create()
      • client.generateChatCompletionStream()client.chat.createStream()
      • client.generateCompletion()client.completions.generate()
      • client.generateCompletionStream()client.completions.generateStream()
      • client.generateEmbedding()client.embeddings.create()
      • client.listModels()client.models.list()
      • client.showModelInfo()client.models.show()
      • client.listRunningModels()client.models.ps()
      • client.getVersion()client.version.get()
    • Model class renames:
      • GenerateChatCompletionRequestChatRequest
      • GenerateChatCompletionResponseChatResponse
      • GenerateCompletionRequestGenerateRequest
      • GenerateCompletionResponseGenerateResponse
      • GenerateEmbeddingRequestEmbedRequest
      • GenerateEmbeddingResponseEmbedResponse
      • MessageChatMessage
      • ToolToolDefinition
      • RequestOptionsModelOptions
    • Configuration: New OllamaConfig with AuthProvider pattern.
    • Exceptions: Replaced OllamaClientException with typed hierarchy:
      • ApiException, ValidationException, RateLimitException, TimeoutException, AbortedException.
    • Dependencies: Removed freezed, json_serializable; now minimal (http, logging).
    • Base URL: No longer needs /api suffix — just use http://localhost:11434.

    See MIGRATION.md for step-by-step examples and mapping tables.

    Commits

    • BREAKING FEAT: Complete v1.0.0 reimplementation (#1). (0ff41032)
    • FEAT: Add type-safe enums and sealed classes (#22). (73372581)
    • FIX: Pre-release documentation and code fixes (#45). (b33ae6d5)
    • REFACTOR: Align client package architecture across SDK packages (#37). (cf741ee1)
    • REFACTOR: Align API surface across all SDK packages (#36). (ed969cc7)
    • REFACTOR: Extract streaming helpers to StreamingResource mixin (#2). (0b6f0ed9)
    • DOCS: Refactors repository URLs to new location. (76835268)
    Open source →
  15. 0.3.0 15 Oct 2025
    Release notes

    [!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.

    Open source →
  16. 0.3.0+1 16 Oct 2025
    Release notes
    Open source →
  17. 0.2.5 31 Aug 2025
    Release notes
    Open source →
  18. 0.2.4 30 Jul 2025
    Release notes
    Open source →
  19. 0.2.3 12 Jun 2025
    Release notes
    • FEAT: Add think/thinking params to ollama_dart (#721). (701d7968)
    • FEAT: Add capabilities, projector_info, tensors and modified_at to Ollama's ModelInfo (#690). (c5e247db)
    • FEAT: Update dependencies (requires Dart 3.6.0) (#709). (9e3467f7)
    • REFACTOR: Remove fetch_client dependency in favor of http v1.3.0 (#659). (0e0a685c)
    • FIX: Fix linter issues (#656). (88a79c65)
    Open source →
  20. 0.2.2 25 Sep 2024
    Release notes
    • FEAT: Update Ollama default model to llama-3.2 (#554). (f42ed0f0)
    Open source →
  21. 0.2.2+1 16 Dec 2024
    Release notes
    • REFACTOR: Add new lint rules and fix issues (#621). (60b10e00)
    • REFACTOR: Upgrade api clients generator version (#610). (0c8750e8)
    Open source →
  22. 0.2.1 22 Aug 2024
    Release notes
    Open source →
  23. 0.2.0 26 Jul 2024
    Release notes

    [!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.

    • FEAT: Add tool calling support (#504). (1ffdb41b)
    • BREAKING FEAT: Update Ollama default model to llama-3.1 (#506). (b1134bf1)
    • FEAT: Add support for Ollama version and model info (#488). (a110ecb7)
    • FEAT: Add suffix support in Ollama completions API (#503). (30d05a69)
    • BREAKING REFACTOR: Change Ollama push model status type from enum to String (#489). (90c9ccd9)
    • DOCS: Update Ollama request options default values in API docs (#479). (e1f93366)
    Open source →
  24. 0.1.2 02 Jul 2024
    Release notes
    • FEAT: Add support for listing running Ollama models (#451). (cfaa31fb)
    • REFACTOR: Migrate conditional imports to js_interop (#453). (a6a78cfe)
    Open source →
  25. 0.1.1 31 May 2024
    Release notes
    • FEAT: Support buffered stream responses (#445). (ce2ef30c)
    • FIX: Fix deserialization of sealed classes (#435). (7b9cf223)
    Open source →
  26. 0.1.0 14 May 2024
    Release notes

    [!CAUTION] This release has breaking changes. See the Migration Guide for upgrade instructions.

    • BREAKING FEAT: Align Ollama client to the Ollama v0.1.36 API (#411). (326212ce)
    • FEAT: Update Ollama default model from llama2 to llama3 (#417). (9d30b1a1)
    • FEAT: Add support for done reason (#413). (cc5b1b02)
    Open source →
  27. 0.1.0+1 20 May 2024
    Release notes
    • FIX: digest path param in Ollama blob endpoints (#430). (2e9e935a)
    Open source →
  28. 0.0.3 15 Feb 2024
    Release notes
    • FEAT: Add Ollama keep_alive param to control how long models stay loaded (#319). (3b86e227)
    • FEAT: Update meta and test dependencies (#331). (912370ee)
    • DOCS: Update pubspecs. (d23ed89a)
    Open source →
  29. 0.0.3+1 10 Apr 2024
    Release notes
    • FIX: Have the == implementation use Object instead of dynamic (#334). (89f7b0b9)
    Open source →
  30. 0.0.2 26 Dec 2023
    Release notes
    • FEAT: Add support for chat API and multi-modal LLMs (#274). (76e1a294)
    Open source →
  31. 0.0.2+1 31 Jan 2024
    Release notes
    Open source →
  32. 0.0.1 21 Nov 2023
    Release notes
    • FEAT: Implement ollama_dart, a Dart client for Ollama API (#238). (d213aa9c)
    Open source →
  33. 0.0.1+1 05 Dec 2023
    Release notes
    Open source →
  34. 0.0.1+2 15 Dec 2023
    Release notes
    • FIX: Fetch web requests with big payloads dropping connection (#273). (425889dc)
    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