Skip to main content

ProviderConfig

Trait ProviderConfig 

Source
pub trait ProviderConfig {
    type PromptCacheSettings: Clone + Default + Send + Sync + 'static;

    const PROVIDER_KEY: &'static str;
    const DISPLAY_NAME: &'static str;
    const DEFAULT_MODEL: &'static str;
    const API_BASE_URL: &'static str;
    const BASE_URL_ENV_VAR: Option<&'static str>;

    // Provided method
    fn create_provider(
        api_key: String,
        model: String,
        base_url: String,
        prompt_cache_enabled: bool,
        prompt_cache_settings: Self::PromptCacheSettings,
        timeouts: TimeoutsConfig,
    ) -> Box<dyn LLMProvider>
       where Self::PromptCacheSettings: Send + Sync + 'static { ... }
}
Expand description

Trait for provider-specific configuration and creation

Required Associated Constants§

Source

const PROVIDER_KEY: &'static str

Source

const DISPLAY_NAME: &'static str

Source

const DEFAULT_MODEL: &'static str

Source

const API_BASE_URL: &'static str

Source

const BASE_URL_ENV_VAR: Option<&'static str>

Required Associated Types§

Provided Methods§

Source

fn create_provider( api_key: String, model: String, base_url: String, prompt_cache_enabled: bool, prompt_cache_settings: Self::PromptCacheSettings, timeouts: TimeoutsConfig, ) -> Box<dyn LLMProvider>
where Self::PromptCacheSettings: Send + Sync + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ProviderConfig for AnthropicProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for CopilotProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for DeepSeekProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for EvolinkProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for GeminiProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = GeminiPromptCacheSettings

Source§

impl ProviderConfig for HuggingFaceProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for LlamaCppProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for LmStudioProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for MiMoProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for MinimaxProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for MistralProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for MoonshotProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for OllamaProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for OpenAIProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for OpenCodeGoProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for OpenCodeZenProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for OpenResponsesProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for OpenRouterProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for PoolsideProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for QwenProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for StepFunProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()

Source§

impl ProviderConfig for ZAIProviderConfig

Source§

const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY

Source§

const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME

Source§

const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL

Source§

const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL

Source§

const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR

Source§

type PromptCacheSettings = ()