[Bug]: Claude Code provider cannot refresh model list — requires API key despite CLI authentication

Author: rahuldr07Created Sep 29, 2026Updated Sep 29, 2026

Platform

Linux

Version

v2.1.3

Bug Description

The Claude Code provider uses the Claude CLI for authentication and chat, but the model list refresh button fails with "No API key configured." Since the provider is designed to work with the CLI's auth, it should also be able to use that same authentication to fetch and refresh the available model list — rather than requiring a separate standalone API key.

Health check output:

bash
Provider: claude-code
Status: error
Error: "No API key configured"
Host: https://api.anthropic.com

Steps To Reproduce

  1. Install and authenticate the Claude CLI (claude command works)
  2. Open Cherry Studio → Settings → Providers → Claude Code
  3. Ensure no standalone API key is entered (relying on CLI auth)
  4. Click the refresh button () on the model list
  5. Model list does not update; remains stale/incorrect

Expected Behavior

The Claude Code provider should use the CLI's existing authentication to query available models from Anthropic's API and refresh the model list, without requiring a separate API key.

Relevant Log Output

No response

Additional Context

No response