{"record":{"id":"3a9221302ade1214","repo":"diegosouzapw/OmniRoute","slug":"invalid-provider-node-missing-prefix-or-baseurl","errorCode":null,"errorMessage":"Invalid provider_node: missing prefix or baseUrl","messagePattern":"Invalid provider_node: missing prefix or baseUrl","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/config/audioRegistry.ts","lineNumber":667,"sourceCode":"      /^172\\.(1[6-9]|2[0-9]|3[0-1])\\.\\d{1,3}\\.\\d{1,3}$/.test(hostname)\n    );\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Build a dynamic AudioProvider from a provider_node DB entry.\n *\n * Loopback nodes keep `authType: \"none\"` — a local Ollama/LM Studio has no key and\n * must not be blocked on a missing credential. A remote node is the opposite: it is\n * only reachable when the operator opted in, and it must present the credential\n * stored on its connection, so it is built as an api-key provider keyed by the node\n * id (`credentialProviderId`) rather than by the caller-facing prefix.\n */\nexport function buildDynamicAudioProvider(node: ProviderNodeRow, audioPath: string): AudioProvider {\n  if (!node.prefix || !node.baseUrl) {\n    throw new Error(`Invalid provider_node: missing prefix or baseUrl`);\n  }\n  const baseUrl = node.baseUrl.replace(/\\/+$/, \"\");\n  const isLocal = isLoopbackNodeHost(node.baseUrl);\n  return {\n    id: node.prefix,\n    ...(node.id ? { credentialProviderId: node.id } : {}),\n    baseUrl: `${baseUrl}${audioPath}`,\n    authType: isLocal ? \"none\" : \"apikey\",\n    authHeader: isLocal ? \"none\" : \"bearer\",\n    models: [],\n  };\n}\n\nfunction parseAudioModel(\n  modelStr: string | null,\n  registry: Record<string, AudioProvider>,\n  dynamicProviders?: AudioProvider[]\n): { provider: string | null; model: string | null } {","sourceCodeStart":649,"sourceCodeEnd":685,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/config/audioRegistry.ts#L649-L685","documentation":"Error \"Invalid provider_node: missing prefix or baseUrl\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/config/audioRegistry.ts:667 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}