Skip to main content

Module providers

Module providers 

Source
Expand description

§Module: Providers

§Responsibility

Provides built-in LLM inference integrations behind the LlmProvider trait. Optional feature flags gate each provider:

  • anthropic — Anthropic Messages API
  • openai — OpenAI Chat Completions API (and compatible endpoints)

§Guarantees

  • LlmProvider is an async, object-safe trait
  • Both providers are Send + Sync and usable behind Arc<dyn LlmProvider>
  • Non-panicking: all operations return Result

§Feature Gate

This module is only compiled when the providers feature (or a sub-feature) is enabled.

Structs§

AnthropicProvider
Built-in provider for the Anthropic Messages API.
CompletionOptions
Options for a completion request, passed to LlmProvider::complete_with_options.
OpenAiProvider
Built-in provider for the OpenAI Chat Completions API.

Traits§

LlmProvider
Abstraction over an LLM inference endpoint.