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

model-meta.ts

24 lines914 Bytes

1/**
2 * Models known to work with OpenCode. OpenCode is provider-agnostic — it
3 * resolves any `provider/model` id its configured providers support (via the
4 * Vercel AI SDK + Models.dev), so this list exists for autocomplete. Any
5 * string is accepted via the `(string & {})` escape hatch in
6 * {@link OpencodeModel}.
7 *
8 * Models are addressed as `provider_id/model_id` (e.g.
9 * `anthropic/claude-sonnet-4-5`); the adapter splits on the first `/`.
10 */
11export const OPENCODE_MODELS = [
12 'anthropic/claude-opus-4-5',
13 'anthropic/claude-sonnet-4-5',
14 'openai/gpt-5.2',
15 'openai/gpt-5.1-codex',
16 'google/gemini-3-pro-preview',
17 'opencode/claude-sonnet-4-5',
18 'opencode/gpt-5.1-codex',
19] as const
20​
21export type KnownOpencodeModel = (typeof OPENCODE_MODELS)[number]
22​
23/** Any `provider/model` id accepted by OpenCode; known ids get autocomplete. */
24export type OpencodeModel = KnownOpencodeModel | (string & {})