agentic_llm 0.2.0
agentic_llm: ^0.2.0 copied to clipboard
Provider-independent chat and embedding models with streaming, tool calling and structured output. Adapters for OpenAI-compatible APIs, Anthropic and Gemini.
Changelog #
0.2.0 #
- Released with the rest of the framework at 0.2.0, which it now depends on. No changes to this package's API or behaviour.
0.1.2 #
Fixes for Gemini. No API changes; upgrade with dart pub upgrade.
GeminiChatModeldefaults togemini-2.5-flash. The previous default,gemini-2.0-flash, has been retired by Google and returns 404.GeminiEmbeddingModeldefaults togemini-embedding-001. The previous default,text-embedding-004, has been retired and returns 404. BecauseRagIndexerrecords a failed document in its report rather than throwing, this showed up as documents indexed into zero passages, not as an error. The default of 768 dimensions is unchanged.- An API key Google rejects is now an
AuthenticationException. Google reports a bad key as400 INVALID_ARGUMENTwith reasonAPI_KEY_INVALID, which was mapped by status alone to a genericProviderException, so apps never showed their "check your key" message to Gemini users.
0.1.1 #
- Shortened the package description to the 60-180 character window pana scores against. Search engines truncate anything longer, so the ten points it withheld were pointing at a real defect: the useful half of the sentence was never being shown.
0.1.0 #
Initial release of the model layer.
Added #
- Ports —
ChatModelandEmbeddingModel, withChatRequest,ChatResponse,ModelInfo,ModelCapabilityandModelPricing. Capability negotiation fails unsupported requests with a message naming the missing feature rather than a provider 400. - Streaming —
ChatChunk,ToolCallDeltaandChatResponseBuilder, which reassembles fragmented tool-call JSON, keeps parallel calls apart, orders by provider index and tolerates truncation. A collected stream produces the sameChatResponsea non-streaming call would. - Transport — a shared HTTP client with cancellation, timeouts, and error
mapping onto the core hierarchy, including the 429-versus-quota distinction
and
Retry-Afterin both legal formats. A specification-compliant server-sent-event decoder that survives chunk boundaries and multi-byte splits. - Providers —
OpenAiCompatibleChatModel(OpenAI, DeepSeek, Grok, Mistral, Together, Groq, Ollama, llama.cpp),AnthropicChatModel,GeminiChatModel, plus OpenAI-compatible and Gemini embedding adapters. - Middleware —
RetryingChatModel,FallbackChatModelwith per-provider circuit breakers,CachingChatModelwithChatCacheandInMemoryChatCache, andObservableChatModelfor logs, traces and events. - Events —
LlmRequestStarted,LlmFirstTokenReceived,LlmResponseCompleted,LlmRequestFailedandLlmFailoverOccurred. - Testing —
package:agentic_llm/testing.dartexportsFakeChatModel,FakeTurnandFakeEmbeddingModel.