zeroclaw-labs/zeroclaw · warning
embedding route "{}" uses invalid model_provider "{}": {}
Error message
embedding route "{}" uses invalid model_provider "{}": {} What it means
Doctor validates each `embedding_routes.model_provider` against a closed set: `none`, `openai`, or `custom:<url>` where the URL must parse as http/https and be non-empty (embedding_provider_validation_error). Anything else produces this warning with the concrete reason string.
Source
Thrown at crates/zeroclaw-runtime/src/doctor/mod.rs:1270
route.hint, route.model_provider, reason
),
));
}
if route.model.is_empty() {
items.push(DiagItem::warn(
cat,
format!("model route \"{}\" has empty model", route.hint),
));
}
}
// Embedding routes validation
for route in &config.embedding_routes {
if route.hint.trim().is_empty() {
items.push(DiagItem::warn(cat, "embedding route with empty hint"));
}
if let Some(reason) = embedding_provider_validation_error(&route.model_provider) {
items.push(DiagItem::warn(
cat,
format!(
"embedding route \"{}\" uses invalid model_provider \"{}\": {}",
route.hint, route.model_provider, reason
),
));
}
if route.model.trim().is_empty() {
items.push(DiagItem::warn(
cat,
format!("embedding route \"{}\" has empty model", route.hint),
));
}
if route.dimensions.is_some_and(|value| value == 0) {
items.push(DiagItem::warn(
cat,
format!(
"embedding route \"{}\" has invalid dimensions=0",View on GitHub (pinned to 88bb9c8533)
Solutions
- Use one of the accepted forms: `none`, `openai`, or `custom:https://your-endpoint/v1`
- For self-hosted embeddings, keep the full http/https URL after `custom:` with no spaces
- Re-run `zeroclaw doctor` to confirm the embedding route validates
Example fix
# before [[embedding_routes]] hint = "docs" model_provider = "custom:" # empty URL # after [[embedding_routes]] hint = "docs" model_provider = "custom:https://embed.example.com/v1"
Defensive patterns
Strategy: validation
Validate before calling
fn embedding_provider_is_valid(name: &str) -> bool {
let n = name.trim();
n.eq_ignore_ascii_case("none")
|| n.eq_ignore_ascii_case("openai")
|| n.strip_prefix("custom:")
.map(|u| {
matches!(reqwest::Url::parse(u.trim()), Ok(url)
if matches!(url.scheme(), "http" | "https"))
})
.unwrap_or(false)
} Prevention
- Remember embedding providers use a closed vocabulary (none, openai, custom:<url>) — not provider-table keys
- Validate embedding route forms in config linting before deploy
When it happens
Trigger: Setting an embedding route's model_provider to a bare name like `openai-large`, an empty `custom:`, `custom:ftp://host`, a custom URL that fails Url::parse, or a provider-table key — none of these are valid embedding provider forms.
Common situations: Copy-pasting model-route style provider refs into embedding routes; truncated URLs during templating; scheme typos in custom embedding endpoints.
Related errors
- model route "{}" uses invalid model_provider "{}": {}
- agent "{name}" uses invalid model_provider "{provider_ref}":
- embedding route with empty hint
- config section `{$path}` is malformed and was reset to defau
- {label}: no api_key set (may rely on env vars or model_provi
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/eede2a5c49034c46.
Report an issue: GitHub.