Skip to content

internal/clients/claudecode: let Claude Code pick its model when Claude is offered - #60

Merged
guygrigsby merged 3 commits into
mainfrom
guygrigsby/claude_default_model
Nov 23, 2026
Merged

guygrigsby merged 3 commits into
mainfrom
guygrigsby/claude_default_model

Conversation

@guygrigsby

@guygrigsby guygrigsby commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

A first aperture claude with no --model now leaves ANTHROPIC_MODEL unset when the provider offers any Claude model, so Claude Code uses its own default. Providers with no Claude model still get their first model.

Before this, the default was the provider's first model, and the list is alphabetical. Claude Code in auto mode asks the API for server-side classification and the session falls back to billed classifier requests with the "this session isn't eligible" notice. Once Claude Code drops that fallback, every checked action would be prompted or denied.

Picking the first Claude model instead would launch claude-haiku-4.5, an old small model, for the same alphabetical reason. Claude Code's own default is current and Aperture resolves it.

The check is a substring match:

isClaude := func(m string) bool { return strings.Contains(m, "claude") }

An explicit --model and a replayed last model on the same provider still win over this default.

…de is offered

A first headless `aperture claude` took the provider's first model, and on
ai.corp that sorts to alibaba/qwen3.8-max. Claude Code in auto mode asks the
API for server-side classification, Qwen returns none, and the session falls
back to billed classifier requests with the "this session isn't eligible"
notice. Once a release drops that fallback, every checked action would be
prompted or denied.

Taking the first Claude model instead would launch claude-haiku-4.5, an old
small model, because the list is alphabetical. Leaving ANTHROPIC_MODEL unset
lets Claude Code use its own current default, which Aperture resolves.
Providers with no Claude model keep the first-model default.

Revisit if providers advertise a preferred model, or if Claude Code's
default stops resolving on some Aperture.
@guygrigsby
guygrigsby requested a review from a team as a code owner November 20, 2026 21:14
A provider listing "Anthropic/Claude-Opus-5-5" next to "openai/gpt-5" got
gpt-5 as the default, because the Claude check was case-sensitive. Aperture
model ids are usually lowercase, but aliases come from operator config.
@guygrigsby
guygrigsby merged commit 4781912 into main Nov 23, 2026
5 checks passed
@guygrigsby
guygrigsby deleted the guygrigsby/claude_default_model branch November 23, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants