pub enum ProviderConfig {
Bedrock {
model_id: String,
region: Option<String>,
},
Paddock {
base_url: String,
model: String,
api_key: Option<String>,
},
Native {
base_dir: Option<PathBuf>,
lora_dir: Option<PathBuf>,
},
Needle {
base_url: String,
},
}Variants§
Bedrock
Claude on AWS Bedrock via the Converse API. region: None uses the environment/default chain.
Paddock
Local Paddock (OpenAI-compatible /chat/completions). base_url includes the /v1 path.
Native
Native in-process inference (pure-Rust candle): tuned Qwen3-1.7B + shipped LoRA, fully offline,
no server. base_dir/lora_dir = None resolves to the HF cache / bundled defaults at build.
Needle
Cactus Needle: the 26M tool-use-native model via its /generate server (needle-code torch port).
Implementations§
Source§impl ProviderConfig
impl ProviderConfig
pub fn bedrock_default() -> Self
pub fn paddock_default() -> Self
Sourcepub fn resolve(default_base_url: &str, default_model: &str) -> ProviderConfig
pub fn resolve(default_base_url: &str, default_model: &str) -> ProviderConfig
Resolve the provider in layers: built-in defaults → config file → environment. This is the product path: a user points SteelDB at ANY OpenAI-compatible endpoint (OpenRouter, OpenAI, Together, Groq, vLLM, a local server) with one small config file — no code, no rebuild.
Config file (./steeldb.json or $STEELDB_CONFIG or ~/.steeldb/config.json):
{ "llm": { "provider": "openai", "base_url": "https://openrouter.ai/api/v1",
"model": "anthropic/claude-3.5-sonnet", "api_key": "sk-or-..." } }provider: "openai" (or “paddock”/“local”) → the OpenAI-compatible client; "bedrock" → Claude
on AWS. Env vars (STEELDB_LLM, STEELDB_PADDOCK_URL, STEELDB_PADDOCK_MODEL, STEELDB_API_KEY,
STEELDB_BEDROCK_MODEL, AWS_REGION) override the file.
Sourcepub fn from_env() -> ProviderConfig
pub fn from_env() -> ProviderConfig
Read a config from env: STEELDB_LLM=bedrock|paddock plus backend-specific vars
(STEELDB_BEDROCK_MODEL, AWS_REGION; STEELDB_PADDOCK_URL, STEELDB_PADDOCK_MODEL).
Trait Implementations§
Source§impl Clone for ProviderConfig
impl Clone for ProviderConfig
Auto Trait Implementations§
impl Freeze for ProviderConfig
impl RefUnwindSafe for ProviderConfig
impl Send for ProviderConfig
impl Sync for ProviderConfig
impl Unpin for ProviderConfig
impl UnsafeUnpin for ProviderConfig
impl UnwindSafe for ProviderConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more