diegosouzapw/OmniRoute · error · Error
Invalid provider_node: missing prefix or baseUrl
Error message
Invalid provider_node: missing prefix or baseUrl
What it means
Guard inside buildDynamicAudioProvider: a provider_node row from the database is missing its prefix or baseUrl, so no routable AudioProvider can be constructed. The input at fault is the operator-managed provider_node record (local loopback or opted-in remote node) — one of the two required routing fields is empty/undefined, indicating a malformed DB row rather than a bad request.
Solutions
- Open the dashboard provider-node settings and fill in both prefix and baseUrl for the offending node
- Delete and re-create the provider_node entry so all required fields are populated
- Audit provider_node rows for NULL/empty prefix or baseUrl before they reach the audio registry
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at open-sse/config/audioRegistry.ts:667 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/3a9221302ade1214.
Report an issue: GitHub.
Appendix: source
Thrown at open-sse/config/audioRegistry.ts:667
/^172\.(1[6-9]|2[0-9]|3[0-1])\.\d{1,3}\.\d{1,3}$/.test(hostname)
);
} catch {
return false;
}
}
/**
* Build a dynamic AudioProvider from a provider_node DB entry.
*
* Loopback nodes keep `authType: "none"` — a local Ollama/LM Studio has no key and
* must not be blocked on a missing credential. A remote node is the opposite: it is
* only reachable when the operator opted in, and it must present the credential
* stored on its connection, so it is built as an api-key provider keyed by the node
* id (`credentialProviderId`) rather than by the caller-facing prefix.
*/
export function buildDynamicAudioProvider(node: ProviderNodeRow, audioPath: string): AudioProvider {
if (!node.prefix || !node.baseUrl) {
throw new Error(`Invalid provider_node: missing prefix or baseUrl`);
}
const baseUrl = node.baseUrl.replace(/\/+$/, "");
const isLocal = isLoopbackNodeHost(node.baseUrl);
return {
id: node.prefix,
...(node.id ? { credentialProviderId: node.id } : {}),
baseUrl: `${baseUrl}${audioPath}`,
authType: isLocal ? "none" : "apikey",
authHeader: isLocal ? "none" : "bearer",
models: [],
};
}
function parseAudioModel(
modelStr: string | null,
registry: Record<string, AudioProvider>,
dynamicProviders?: AudioProvider[]
): { provider: string | null; model: string | null } {View on GitHub (pinned to a179ffed5b)