chatboxai/chatbox · warning · ChatboxCliUsageError

Image model is disabled in settings: ${provider}/${modelId}

Error message

Image model is disabled in settings: ${provider}/${modelId}

What it means

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.

Source

Thrown at src/renderer/packages/chatbox-cli/images.ts:243

    }
    return existing.promise
  }

  if (persistedExecutionValue !== null) {
    if (persistedExecutionValue.signature !== signature) {
      throw new Error(`Tool call ${cacheKey} was reused with different image arguments.`)
    }
    const persistedRecord = await platform.getImageGenerationStorage().getById(persistedExecutionValue.recordId)
    if (!persistedRecord) {
      throw new Error(
        'The image record linked to this approved tool call no longer exists. Start a new request and ask the user to approve it again.'
      )
    }
    return restoredExecutionResult(persistedRecord)
  }

  if (settings.providers?.[provider]?.excludedModels?.includes(modelId)) {
    throw new ChatboxCliUsageError(`Image model is disabled in settings: ${provider}/${modelId}`)
  }
  availableModels ??= await getAvailableImageModels(settings)
  if (!availableModels.some((model) => model.provider === provider && model.modelId === modelId)) {
    throw new ChatboxCliUsageError(
      `Image model is not available: ${provider}/${modelId}. Use "chatbox image models" to list available models.`
    )
  }

  if (!approvedRequest) {
    const licenseDetail = settings.licenseDetail
    await requestAppActionApproval(
      toolCallId,
      'image.generate',
      'Generate image',
      [
        `Provider: ${JSON.stringify(provider)}`,
        `Model: ${JSON.stringify(modelId)}`,
        `Images: ${count}`,

View on GitHub (pinned to 81571269ad)

Solutions

  1. Pick a different, non-excluded model via --model (check 'chatbox image models').
  2. Re-enable the model in Chatbox settings if it should be usable.
  3. For stale approved requests, start a new request with an enabled model and re-approve.

Example fix

// before
await executeChatboxCliCommand({ argv: ['image','generate','--prompt',p,'--provider','openai','--model','dall-e-2'] }, ctx)

// after: use an enabled model
await executeChatboxCliCommand({ argv: ['image','generate','--prompt',p,'--provider','openai','--model','dall-e-3'] }, ctx)
Defensive patterns

Strategy: validation

Validate before calling

// Avoid requesting a model the user has excluded.
const excluded = new Set(settings.providers?.[provider]?.excludedModels ?? [])
if (excluded.has(modelId)) {
  return { error: `Model ${provider}/${modelId} is disabled in settings`, kind: 'usage' }
}
await executeChatboxCliCommand({ argv: ['image','generate','--prompt', p, '--provider', provider, '--model', modelId] }, ctx)

Type guard

function isModelEnabled(settings: Settings, provider: string, modelId: string): boolean {
  const excluded = settings.providers?.[provider]?.excludedModels ?? []
  return !excluded.includes(modelId)
}

Try / catch

const res = await executeChatboxCliCommand({ argv }, ctx)
if (!res.ok && res.kind === 'usage' && res.error.includes('disabled in settings')) {
  // pick a different model or re-enable it in settings
}

Prevention

When it happens

Trigger: Requesting a model the user disabled in Chatbox settings, or a stale approved/bound request referencing a model that was later excluded.

Common situations: 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.

Related errors


AI-assisted analysis of chatboxai/chatbox@81571269ad (2026-08-12). Data as JSON: /api/errors/347a4c2af6d4d5f4. Report an issue: GitHub.