{"record":{"id":"3b24decb680d6b8f","repo":"usebruno/bruno","slug":"unknown-model-modelid","errorCode":null,"errorMessage":"Unknown model: ${modelId}","messagePattern":"Unknown model: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-electron/src/ipc/ai/providers.js","lineNumber":208,"sourceCode":"const isBuiltInModelId = (modelId) => Boolean(MODEL_DEFINITIONS[modelId]);\n\nconst providerLabel = (providerId, aiPreferences) => {\n  if (PROVIDERS[providerId]) return PROVIDERS[providerId].label;\n  const endpointId = endpointIdFromProviderId(providerId);\n  if (endpointId) {\n    const endpoint = getCompatEndpoint(aiPreferences, endpointId);\n    if (endpoint) return endpoint.name || 'OpenAI-compatible';\n  }\n  return providerId;\n};\n\n/**\n * Resolve a Bruno model id to a vercel-ai SDK model instance.\n * Throws if the provider isn't configured (no key) or the model is unknown.\n */\nconst getModel = (modelId, { aiPreferences, getApiKey }) => {\n  const def = resolveModelDefinition(modelId, aiPreferences);\n  if (!def) throw new Error(`Unknown model: ${modelId}`);\n\n  const providerConfig = aiPreferences?.providers?.[def.providerId];\n  if (!providerConfig?.enabled) {\n    throw new Error(`${providerLabel(def.providerId, aiPreferences)} is not enabled. Enable it in Preferences > AI.`);\n  }\n\n  const isCompat = isOpenAiCompatibleProviderId(def.providerId);\n  const apiKey = getApiKey(def.providerId);\n  if (!apiKey && !isCompat) {\n    throw new Error(`${providerLabel(def.providerId, aiPreferences)} API key is not configured. Add it in Preferences > AI.`);\n  }\n\n  if (isCompat && !def.baseURL) {\n    throw new Error(`${providerLabel(def.providerId, aiPreferences)} is missing a Base URL. Set one in Preferences > AI.`);\n  }\n\n  const sdk = getSdk({ providerId: def.providerId, apiKey, baseURL: def.baseURL });\n  if (isOpenAiCompatibleProviderId(def.providerId)) return sdk.chat(def.sdkModelId);","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-electron/src/ipc/ai/providers.js#L190-L226","documentation":"Error \"Unknown model: ${modelId}\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-electron/src/ipc/ai/providers.js:208 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a model from the provider's supported model list.","Refresh the model list or enter a valid model id manually."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}