agentic_llm 0.2.0 copy "agentic_llm: ^0.2.0" to clipboard
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.

  • GeminiChatModel defaults to gemini-2.5-flash. The previous default, gemini-2.0-flash, has been retired by Google and returns 404.
  • GeminiEmbeddingModel defaults to gemini-embedding-001. The previous default, text-embedding-004, has been retired and returns 404. Because RagIndexer records 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 as 400 INVALID_ARGUMENT with reason API_KEY_INVALID, which was mapped by status alone to a generic ProviderException, 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 #

  • PortsChatModel and EmbeddingModel, with ChatRequest, ChatResponse, ModelInfo, ModelCapability and ModelPricing. Capability negotiation fails unsupported requests with a message naming the missing feature rather than a provider 400.
  • StreamingChatChunk, ToolCallDelta and ChatResponseBuilder, which reassembles fragmented tool-call JSON, keeps parallel calls apart, orders by provider index and tolerates truncation. A collected stream produces the same ChatResponse a 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-After in both legal formats. A specification-compliant server-sent-event decoder that survives chunk boundaries and multi-byte splits.
  • ProvidersOpenAiCompatibleChatModel (OpenAI, DeepSeek, Grok, Mistral, Together, Groq, Ollama, llama.cpp), AnthropicChatModel, GeminiChatModel, plus OpenAI-compatible and Gemini embedding adapters.
  • MiddlewareRetryingChatModel, FallbackChatModel with per-provider circuit breakers, CachingChatModel with ChatCache and InMemoryChatCache, and ObservableChatModel for logs, traces and events.
  • EventsLlmRequestStarted, LlmFirstTokenReceived, LlmResponseCompleted, LlmRequestFailed and LlmFailoverOccurred.
  • Testingpackage:agentic_llm/testing.dart exports FakeChatModel, FakeTurn and FakeEmbeddingModel.
2
likes
160
points
363
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Provider-independent chat and embedding models with streaming, tool calling and structured output. Adapters for OpenAI-compatible APIs, Anthropic and Gemini.

Repository (GitHub)
View/report issues
Contributing

Topics

#ai #llm #openai #anthropic #agentic

License

MIT (license)

Dependencies

agentic_core, agentic_tools, http, meta

More

Packages that depend on agentic_llm