Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

model-meta.ts

21 lines706 Bytes

1/**
2 * Models known to work with Claude Code. The harness accepts any Anthropic
3 * model id (and the `opus` / `sonnet` / `haiku` aliases resolved by the CLI),
4 * so this list exists for autocomplete — any string is accepted via the
5 * `(string & {})` escape hatch in {@link ClaudeCodeModel}.
6 */
7export const CLAUDE_CODE_MODELS = [
8 'claude-opus-4-8',
9 'claude-opus-4-7',
10 'claude-opus-4-6',
11 'claude-sonnet-4-6',
12 'claude-haiku-4-5',
13 'opus',
14 'sonnet',
15 'haiku',
16] as const
17​
18export type KnownClaudeCodeModel = (typeof CLAUDE_CODE_MODELS)[number]
19​
20/** Any Claude model id accepted by Claude Code; known ids get autocomplete. */
21export type ClaudeCodeModel = KnownClaudeCodeModel | (string & {})