Skip to content

Image generation is not enabled for this group error - cc-switch

Quick fix

Filter image-generation requests manually or use a local bridge to read response headers. Official support is pending to resolve the 403 block.

Error output
status_code=403, Image generation is not enabled for this group

This issue is caused by two types of relay limitations. First, tools such as the new Codex send image-generation parameters by default, but many relays do not support direct image-generation calls. The upstream then returns 403 and reports that image generation is not enabled.

Second, some relays, such as LiteLLM Proxy, issue restricted virtual keys that only allow inference routes. Management or billing endpoints such as /key/info are blocked with 403. For these keys, quota information exists only in HTTP response headers from normal inference requests. cc-switch currently checks the status code before calling the usage-query extractor; when it receives a non-2xx response, it aborts and discards the response headers, so scripts cannot obtain quota data. There is no unified community fix yet. #4938 proposes an image-generation filter switch, while #5227 proposes letting the extractor read response headers. These approaches differ and neither has been merged.

  1. If your relay supports image-generation filtering, enable the image-generation parameter filter option in cc-switch configuration to avoid sending image-generation instructions to unsupported models.

  2. For quota-query 403 errors caused by restricted keys, deploy a local bridge process. Let the process send probe requests, read quota fields from HTTP response headers, and convert them into a JSON body for cc-switch to query, bypassing the native extractor limitation.

ToolCodex / Claude Code
VersionUnknown
PlatformsUnknown

This page is distilled from 1 real issues

Why does the 403 error still occur after enabling the local proxy?
Because some relay 403 errors occur at the inference endpoint itself, for example when image-generation parameters are unsupported, or when management endpoints are restricted by key permissions. A local proxy only forwards traffic and cannot change upstream gateway authentication logic or parameter validation rules.
How can I check the remaining quota of a restricted key without running a background process?
The current cc-switch version aborts on non-2xx responses and discards response headers, so it cannot read them directly. Wait for the official response-header passthrough feature, see #5227, or temporarily use a local bridge script to persist response-header data as JSON for the extractor.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.