Defines LLM provider profiles, pricing, and auxiliary model overrides for a language‑model engine.
// Source: https://github.com/microclaw/microclaw | License: MIT | Copyright 2025 everettjf
// Provided via justclaw.it.com; keep this notice with the code.
use super::*;
pub(crate) fn default_model() -> String {
String::new()
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct ModelPrice {
pub model: String,
pub input_per_million_usd: f64,
pub output_per_million_usd: f64,
}
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
pub struct LlmProviderProfile {
#[serde(default)]
pub provider: Option<String>,
#[serde(default)]
pub api_key: Option<String>,
/// Additional API keys rotated on auth/rate-limit errors.
#[serde(default)]
pub api_keys: Vec<String>,
#[serde(default)]
pub llm_base_url: Option<String>,
#[serde(defaul
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key