router-for-me/CLIProxyAPI · error

invalid disable-image-generation value %q (allowed: true, fa

Error message

invalid disable-image-generation value %q (allowed: true, false, chat, passthrough)

What it means

Error "invalid disable-image-generation value %q (allowed: true, false, chat, passthrough)" thrown in router-for-me/CLIProxyAPI.

Source

Thrown at internal/config/disable_image_generation_mode.go:145

	if err := json.Unmarshal(trimmed, &s); err != nil {
		return DisableImageGenerationOff, fmt.Errorf("invalid disable-image-generation value")
	}
	return parseDisableImageGenerationString(s)
}

func parseDisableImageGenerationString(s string) (DisableImageGenerationMode, error) {
	s = strings.TrimSpace(strings.ToLower(s))
	switch s {
	case "", "false", "0", "off", "no":
		return DisableImageGenerationOff, nil
	case "true", "1", "on", "yes":
		return DisableImageGenerationAll, nil
	case "chat":
		return DisableImageGenerationChat, nil
	case "passthrough":
		return DisableImageGenerationPassthrough, nil
	default:
		return DisableImageGenerationOff, fmt.Errorf("invalid disable-image-generation value %q (allowed: true, false, chat, passthrough)", s)
	}
}

View on GitHub (pinned to 78f0c4079e)

Solutions

  1. Replace the quoted invalid value with one of the allowed values: true, false, chat, passthrough.
  2. Fix the disable-image-generation entry in config.yaml and reload.

When it happens

Trigger: Thrown at internal/config/disable_image_generation_mode.go:145 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15). Data as JSON: /api/errors/64c9dfafef04e072. Report an issue: GitHub.