pub struct CompatConfig {
pub id: &'static str,
pub default_base_url: String,
pub models: Vec<ModelInfo>,
pub pricing_table: HashMap<String, ModelPricing>,
pub fee_multiplier: f64,
pub allow_local: bool,
}Expand description
Per-provider configuration for OpenAICompatibleProvider.
Construct this once at startup (or in a lazy static) and pass it to
OpenAICompatibleProvider::new.
Fields§
§id: &'static strStable, lower-case identifier used by the routing and telemetry layers.
Examples: "mistral", "groq", "together", "openrouter".
default_base_url: StringDefault base URL, used when the caller’s RequestContext does not
supply a base_url override in its credentials.
models: Vec<ModelInfo>All models exposed by this provider configuration.
pricing_table: HashMap<String, ModelPricing>Pricing keyed by model ID string, mirroring the per-provider tables in
the OpenAI adapter’s pricing.rs.
fee_multiplier: f64Optional fee multiplier stored for the billing layer (e.g. 1.05 for a
5% BYOK fee on OpenRouter).
This value is NOT applied to usage at request time. The adapter
faithfully reports raw token counts; the dashboard billing pass applies
the multiplier when computing the final USD charge. Default: 1.0.
allow_local: boolWhen true, skip SSRF URL validation for private/loopback addresses.
Set to true only for local providers (Ollama, vLLM, LM Studio) that
legitimately target http://localhost or http://127.0.0.1. All hosted
providers must use false.