[Feature Request] Add 'claude model list' CLI command for non-interactive model queries

Open 💬 16 comments Opened Nov 28, 2025 by ThePlenkov

Problem

Currently, there is no way to programmatically query available Claude models from the CLI without starting an interactive session and using /model.

Current Workarounds

  1. Interactive only: Start claude session → type /model → consumes tokens for LLM processing
  2. No CLI command: claude model list doesn't exist
  3. API directly: Must use curl with API keys manually

Requested Feature

Add a claude model subcommand for non-interactive model queries:

# List all available models
claude model list

# Output:
# ID                              NAME            TYPE      CONTEXT
# claude-sonnet-4-5-20250929     Sonnet 4.5      Latest    200K
# claude-3-5-sonnet-20241022     Sonnet 3.5      Standard  200K  
# claude-3-opus-20240229         Opus 3          Premium   200K
# claude-3-5-haiku-20241022      Haiku 3.5       Fast      200K

# Show current model for session
claude model current

# Show model info
claude model info claude-sonnet-4-5-20250929

Use Cases

  1. Scripting/Automation - Check available models before running tasks
  2. Cost Optimization - Programmatically select cheapest model for task
  3. CI/CD Pipelines - Validate model availability before running agents
  4. Documentation - Generate up-to-date model lists
  5. Debugging - Verify which models are accessible with current API key

Comparison with Similar Tools

GitHub CLI:

gh api /repos/:owner/:repo  # Direct API access
gh repo view                # Formatted output

Docker CLI:

docker images               # List available images
docker inspect <image>      # Show image details

Claude Code (requested):

claude model list           # List available models (no LLM inference)
claude model current        # Show current session model

Benefits

  • Zero token cost (no LLM inference needed)
  • Scriptable (parseable output for automation)
  • Fast (no interactive session startup)
  • Consistent with modern CLI patterns
  • Better DX for power users

Implementation Notes

  • Should work without starting interactive session
  • Output should be parseable (consider --json flag)
  • Cache model list locally (refresh periodically)
  • Respect API provider (Anthropic, Bedrock, Vertex)

Related Issues

  • #10169 - Custom Bedrock models not discoverable in /model command list
  • #10717 - /model returns old version of models

---

Environment:

  • Platform: Linux (WSL2)
  • Version: Claude Code v2.0.x
  • Use case: Automation scripts, CI/CD integration

View original on GitHub ↗

16 Comments

github-actions[bot] · 6 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

alanspires · 6 months ago

bump

amitmahbubani · 6 months ago

+1, this would be nice to have. We have custom models setup on Bedrock and choosing models when switching between a claude subscription and Bedrock use is a pain.

ctmeiva · 3 months ago

I'd definitely also like this feature

mhd64real · 3 months ago

That woud be usefull please give it some attention.

junelin66 · 3 months ago

I think this feature will make Claude Code more user-friendly.

kessenma · 3 months ago

bump

theasanofi · 2 months ago

+1 anything that has versions should be listable

MartinGonzalez · 2 months ago

+10000000000 This would be super useful to be able to configure some inhouse tools to use the correct models programatically

gitcnd · 2 months ago

Please add this in - there's exactly no possible way to find this out right now - not even what claude.ai tells us to do even...

$ curl https://api.anthropic.com/v1/models \

-H "Authorization: Bearer $CLAUDE_CODE_OAUTH_TOKEN" \ -H "anthropic-version: 2023-06-01"

{"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."},"request_id":"req_011Cad8bMLnLV5K51nXzeLJ8"}

kessenma · 2 months ago

you can see the existing models via running
claude, then /model

ke@Kyles-MacBook-Pro-2 ws % claude
           Claude Code v2.1.114                                                                          
▗ ▗   ▖ ▖  Sonnet 4.6 with high effort · Claude Max                                                      
           ~/ws                                                                                          
  ▘▘ ▝▝    Welcome to Opus 4.7 xhigh! · /effort to tune speed vs. intelligence                           
                                                                                                         
❯ /model                                                                                                                                                                  
                                                                                                         
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Select model                                                                                                                                                          
  Switch between Claude models. Applies to this session and future Claude Code sessions. For other/previous model names, specify with --model.                            
                                                                                                                                                                          
    1. Default (recommended)  Opus 4.7 with 1M context · Most capable for complex work                                                                                    
  ❯ 2. Sonnet ✔               Sonnet 4.6 · Best for everyday tasks                                                                                                        
    3. Sonnet (1M context)    Sonnet 4.6 with 1M context · Billed as extra usage · $3/$15 per Mtok                                                                        
    4. Haiku                  Haiku 4.5 · Fastest for quick answers
                                                                                                                                                                          
  ● High effort ← → to adjust

  Use /fast to turn on Fast mode (Opus 4.6 only).

  Enter to confirm · Esc to exit
MartinGonzalez · 2 months ago
you can see the existing models via running claude, then /model `` ke@Kyles-MacBook-Pro-2 ws % claude Claude Code v2.1.114 ▗ ▗ ▖ ▖ Sonnet 4.6 with high effort · Claude Max ~/ws ▘▘ ▝▝ Welcome to Opus 4.7 xhigh! · /effort to tune speed vs. intelligence ❯ /model ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Select model Switch between Claude models. Applies to this session and future Claude Code sessions. For other/previous model names, specify with --model. 1. Default (recommended) Opus 4.7 with 1M context · Most capable for complex work ❯ 2. Sonnet ✔ Sonnet 4.6 · Best for everyday tasks 3. Sonnet (1M context) Sonnet 4.6 with 1M context · Billed as extra usage · $3/$15 per Mtok 4. Haiku Haiku 4.5 · Fastest for quick answers ● High effort ← → to adjust Use /fast to turn on Fast mode (Opus 4.6 only). Enter to confirm · Esc to exit ``

The idea of the ticket is to not use then interactive one and have a programmatic way of doing it.

Llorx · 1 month ago

Still not a thing. Codex already have this.

mujaffarhusain-gl · 29 days ago

yaa, that woud be usefull please give it some attention

papanouel · 3 days ago

Would definitely need this. It could even return a simple list. Similarly as what opencode does when calling "opencode models":

❯ opencode models
opencode/big-pickle
opencode/deepseek-v4-flash-free
opencode/hy3-free
opencode/mimo-v2.5-free
opencode/nemotron-3-ultra-free
opencode/north-mini-code-free
omlx/gemma-4-12B-it-8bit

papanouel · 3 days ago

You can still install ant with 'brew install anthropics/tap/ant' if you are on macos. For me being doing it through the installed claude CLI, and returning a simple model list name/id would be the best though...

<img width="2110" height="287" alt="Image" src="https://github.com/user-attachments/assets/9f292f25-3a4c-4928-ba7e-37a5f1c165ac" />