{"record":{"id":"347a4c2af6d4d5f4","repo":"chatboxai/chatbox","slug":"image-model-is-disabled-in-settings-provider","errorCode":null,"errorMessage":"Image model is disabled in settings: ${provider}/${modelId}","messagePattern":"Image model is disabled in settings: (.+?)/(.+?)","errorType":"validation","errorClass":"ChatboxCliUsageError","httpStatus":null,"severity":"warning","filePath":"src/renderer/packages/chatbox-cli/images.ts","lineNumber":243,"sourceCode":"    }\n    return existing.promise\n  }\n\n  if (persistedExecutionValue !== null) {\n    if (persistedExecutionValue.signature !== signature) {\n      throw new Error(`Tool call ${cacheKey} was reused with different image arguments.`)\n    }\n    const persistedRecord = await platform.getImageGenerationStorage().getById(persistedExecutionValue.recordId)\n    if (!persistedRecord) {\n      throw new Error(\n        'The image record linked to this approved tool call no longer exists. Start a new request and ask the user to approve it again.'\n      )\n    }\n    return restoredExecutionResult(persistedRecord)\n  }\n\n  if (settings.providers?.[provider]?.excludedModels?.includes(modelId)) {\n    throw new ChatboxCliUsageError(`Image model is disabled in settings: ${provider}/${modelId}`)\n  }\n  availableModels ??= await getAvailableImageModels(settings)\n  if (!availableModels.some((model) => model.provider === provider && model.modelId === modelId)) {\n    throw new ChatboxCliUsageError(\n      `Image model is not available: ${provider}/${modelId}. Use \"chatbox image models\" to list available models.`\n    )\n  }\n\n  if (!approvedRequest) {\n    const licenseDetail = settings.licenseDetail\n    await requestAppActionApproval(\n      toolCallId,\n      'image.generate',\n      'Generate image',\n      [\n        `Provider: ${JSON.stringify(provider)}`,\n        `Model: ${JSON.stringify(modelId)}`,\n        `Images: ${count}`,","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/chatboxai/chatbox/blob/81571269addb6bafb589a920b2883f1e1e084fd1/src/renderer/packages/chatbox-cli/images.ts#L225-L261","documentation":"ChatboxCliUsageError thrown when the resolved provider/modelId appears in settings.providers[provider].excludedModels. The user (or an admin policy) explicitly disabled that model, so the command refuses to invoke it even if it would otherwise be available.","triggerScenarios":"Requesting a model the user disabled in Chatbox settings, or a stale approved/bound request referencing a model that was later excluded.","commonSituations":"User hid a model from their picker (which adds it to excludedModels) but an agent reused an old request, or a provider's model was deprecated and excluded by policy.","solutions":["Pick a different, non-excluded model via --model (check 'chatbox image models').","Re-enable the model in Chatbox settings if it should be usable.","For stale approved requests, start a new request with an enabled model and re-approve."],"exampleFix":"// before\nawait executeChatboxCliCommand({ argv: ['image','generate','--prompt',p,'--provider','openai','--model','dall-e-2'] }, ctx)\n\n// after: use an enabled model\nawait executeChatboxCliCommand({ argv: ['image','generate','--prompt',p,'--provider','openai','--model','dall-e-3'] }, ctx)","handlingStrategy":"validation","validationCode":"// Avoid requesting a model the user has excluded.\nconst excluded = new Set(settings.providers?.[provider]?.excludedModels ?? [])\nif (excluded.has(modelId)) {\n  return { error: `Model ${provider}/${modelId} is disabled in settings`, kind: 'usage' }\n}\nawait executeChatboxCliCommand({ argv: ['image','generate','--prompt', p, '--provider', provider, '--model', modelId] }, ctx)","typeGuard":"function isModelEnabled(settings: Settings, provider: string, modelId: string): boolean {\n  const excluded = settings.providers?.[provider]?.excludedModels ?? []\n  return !excluded.includes(modelId)\n}","tryCatchPattern":"const res = await executeChatboxCliCommand({ argv }, ctx)\nif (!res.ok && res.kind === 'usage' && res.error.includes('disabled in settings')) {\n  // pick a different model or re-enable it in settings\n}","preventionTips":["Do not reuse stale requests that reference a model the user later disabled.","Filter the model picker by excludedModels so users cannot select disabled models.","When a model is deprecated/excluded, start a fresh approved request."],"tags":["chatbox-cli","usage","image-generation","configuration","settings"],"backgroundTag":null,"analyzedSha":"81571269addb6bafb589a920b2883f1e1e084fd1","analyzedAt":"2026-08-12T21:51:44.981Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}