Skip to content

fix(settings): accept full Claude model IDs in schema validation#1015

Merged
acreeger merged 1 commit into
mainfrom
fix/loosen-model-schema-validation
May 14, 2026
Merged

fix(settings): accept full Claude model IDs in schema validation#1015
acreeger merged 1 commit into
mainfrom
fix/loosen-model-schema-validation

Conversation

@acreeger
Copy link
Copy Markdown
Collaborator

Summary

  • Model schema validation now accepts full Claude model IDs (e.g. claude-opus-4-6[1m], claude-sonnet-4-20250514) in addition to shorthands (sonnet, opus, haiku, etc.)
  • Added claudeModelSchema Zod union: enum of shorthands OR any string matching ^claude-
  • Updated AgentManager model validation to use the same schema
  • Updated CLI help text for --model flag

Test plan

  • All 5203 existing tests pass
  • New test verifies full model IDs are accepted
  • Invalid model names (not a shorthand and not starting with claude-) still rejected
  • Verified claude-opus-4-6[1m] and claude-opus-4-7[1m] work with claude --model via execa

Models like claude-opus-4-6[1m] were rejected by the Zod enum validation
which only accepted shorthands (sonnet, opus, haiku, etc). Now accepts
any string starting with "claude-" as a valid full model ID.
@acreeger acreeger merged commit 010e69f into main May 14, 2026
4 checks passed
@acreeger acreeger deleted the fix/loosen-model-schema-validation branch May 14, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant