Support multiple ANTHROPIC_CUSTOM_MODEL_OPTION entries in /model picker

Resolved 💬 3 comments Opened May 13, 2026 by Quentin-M Closed May 16, 2026

Summary

ANTHROPIC_CUSTOM_MODEL_OPTION only supports a single custom model entry in the /model picker. When deploying Claude Code with a LiteLLM gateway that routes to multiple non-Anthropic models (e.g., DeepSeek, GLM), there's no way to expose more than one in the picker.

Motivation

This is especially needed because gateway model discovery (CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1) does not work when authentication is provided via apiKeyHelper — see #58581. The ANTHROPIC_CUSTOM_MODEL_OPTION env var is the only remaining mechanism to surface non-Anthropic models, but it's limited to one.

Proposal

Support numbered suffixes for multiple entries:

{
  "env": {
    "ANTHROPIC_CUSTOM_MODEL_OPTION_1": "deepseek",
    "ANTHROPIC_CUSTOM_MODEL_OPTION_NAME_1": "DeepSeek",
    "ANTHROPIC_CUSTOM_MODEL_OPTION_2": "glm",
    "ANTHROPIC_CUSTOM_MODEL_OPTION_NAME_2": "GLM"
  }
}

Or alternatively, a JSON settings key:

{
  "customModels": [
    { "id": "deepseek", "name": "DeepSeek" },
    { "id": "glm", "name": "GLM" }
  ]
}

Prior art

  • #2480 — same request, closed due to inactivity with no resolution
  • #58581 — gateway discovery broken with apiKeyHelper, making ANTHROPIC_CUSTOM_MODEL_OPTION the only viable path for non-Anthropic models

Environment

  • Claude Code version: 2.1.140
  • Gateway: LiteLLM with multiple non-Anthropic model backends

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗