flutter_ai_sdk 1.2.0
flutter_ai_sdk: ^1.2.0 copied to clipboard
A unified wrapper for AI APIs (OpenAI, Anthropic, Google AI, Ollama) with streaming, tool calling, context management, and multimodal support.
Changelog #
All notable changes to Flutter AI SDK are documented here.
1.2.0 - 2026-07-07 #
Architecture overhaul & new features #
- Architecture: full restructuring into one-class-per-file modules —
config/,models/content/(sealed hierarchy as part files),models/tools/; one folder per provider with a dedicated wire-format mapper; shared streaming loop inBaseProvider(template method); newProviderRegistryfactory supporting custom provider registration. The public API is unchanged. - Tool Runner: automatic agentic tool-calling loop (
ToolRunner,ExecutableTool) — parallel tool execution, error feedback to the model, iteration budget, observability callbacks. - Ollama provider: run local models (Llama, Qwen, Gemma...) with streaming (NDJSON), tools, JSON mode and vision; no API key required.
- Anthropic: consecutive same-role messages are merged, as required by the API's role alternation (fixes parallel tool results).
- Dependencies upgraded for Flutter 3.44.
1.1.0 - 2026-07-06 #
Model refresh #
- Default models updated to current generations:
gpt-5.5,claude-opus-4-8,gemini-3.5-flash. - Model context limits updated (GPT-5.x, Claude 4/5, Gemini 3.x).
- Anthropic provider: never sends
temperatureandtop_ptogether (rejected by Claude 4+); maps therefusalandmodel_context_window_exceededstop reasons. - Providers can receive an injected HTTP client;
FlutterAIaccepts a custom provider. Unit tests for all providers and a CI workflow added. - Dependencies upgraded (
mime2.x,rxdart0.28,flutter_lints6).