diegosouzapw/OmniRoute · error · Error
Invalid provider_node prefix
Error message
Invalid provider_node prefix "${node.prefix}": must not contain / or spaces What it means
Guard inside buildDynamicEmbeddingProvider: the node's prefix contains '/' or a space, characters that would break URL/path construction and provider matching downstream. The prefix must be a single clean token (e.g. 'ollama'); the offending input is the prefix column of the provider_node row.
Solutions
- Edit the node prefix to a single token with no slashes or spaces (e.g. 'lmstudio' instead of 'lm studio/local')
- Apply the same character constraint in the provider_node editor UI so invalid prefixes are rejected at input time
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at open-sse/config/embeddingRegistry.ts:56 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/28e112ea8178c6b9.
Report an issue: GitHub.
Appendix: source
Thrown at open-sse/config/embeddingRegistry.ts:56
export interface EmbeddingProviderNodeRow {
id?: string;
prefix: string;
name: string;
baseUrl: string;
apiType?: string;
}
/**
* Build a dynamic EmbeddingProvider from a local provider_node.
* Only used for local providers (localhost) — caller must filter by hostname.
*/
export function buildDynamicEmbeddingProvider(node: EmbeddingProviderNodeRow): EmbeddingProvider {
if (!node.prefix || !node.baseUrl) {
throw new Error(`Invalid provider_node: missing prefix or baseUrl`);
}
if (node.prefix.includes("/") || node.prefix.includes(" ")) {
throw new Error(`Invalid provider_node prefix "${node.prefix}": must not contain / or spaces`);
}
const baseUrl = node.baseUrl.replace(/\/+$/, "");
return {
id: node.prefix,
baseUrl: `${baseUrl}/embeddings`,
authType: "none",
authHeader: "none",
models: [],
};
}
export const EMBEDDING_PROVIDERS: Record<string, EmbeddingProvider> = {
cohere: {
id: "cohere",
baseUrl: "https://api.cohere.com/v2/embed",
authType: "apikey",
authHeader: "bearer",
models: [View on GitHub (pinned to a179ffed5b)