pub struct RemoteProviderConfig {
pub base_url: String,
pub model: String,
pub api_key: Option<SecretString>,
pub dimension: u32,
pub request_dimensions: bool,
pub normalize: bool,
pub batch_size: usize,
pub timeout: Duration,
pub max_retries: u32,
}Expand description
What a deployment declares about its endpoint.
Fields§
§base_url: StringAPI root the /embeddings path is appended to, e.g.
https://api.openai.com/v1 or http://ollama:11434/v1.
model: StringModel name as the endpoint knows it, e.g. text-embedding-3-small.
api_key: Option<SecretString>Bearer credential. None for an endpoint that takes no credential
(a self-hosted server on a private network).
dimension: u32Vector width the deployment’s column was migrated with. Every vector the endpoint returns is checked against it.
request_dimensions: boolSend the dimensions request field. Models that support Matryoshka
truncation (text-embedding-3-*) then return exactly dimension
lanes; a model of a fixed width ignores or rejects the field, and a
deployment on such a model turns this off and sets dimension to the
model’s native width.
normalize: boolL2-normalize every vector before it is stored.
batch_size: usizeInputs per request. The endpoint’s own limit is the ceiling; 64 is well under every known one.
timeout: DurationPer-request timeout. The caller’s budget shortens it, never lengthens.
max_retries: u32How many times a chunk is re-sent after a transient refusal — a rate limit or a gateway that is briefly unwell.
One 503 otherwise drops a whole ingest batch’s vectors, and the nodes stay unembedded until something touches them again. Zero turns retries off. The caller’s remaining budget is the real ceiling: a retry that would start after the deadline is not attempted, so this can never make a request outlive the request that asked for it.