mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 18:35:07 +03:00
<!-- ccr-slack-attribution --> _Requested by **Saxon Fletcher** · [Slack thread](https://supabase.slack.com/archives/C051L8U2EJF/p1790104861710199?thread_ts=1790104861.710199&cid=C051L8U2EJF)_ ## Problem **Before:** The Assistant's base model is `gpt-5.6-luna` at medium reasoning effort. **After:** The base model is `gpt-6-luna`, its direct successor, still at medium effort. It costs half as much: $0.10/$0.50 per MTok against $0.20/$1.20. Resolves [AI-1245](https://linear.app/supabase/issue/AI-1245/move-the-assistants-base-model-to-gpt-6-luna). ## Solution This swaps `gpt-5.6-luna` for `gpt-6-luna` in `apps/studio/lib/ai/model.utils.ts`: the model ID union, the reasoning-support map, `ASSISTANT_MODELS`, `DEFAULT_ASSISTANT_BASE_MODEL_ID`, and the OpenAI provider registry. The old ID is removed, not kept next to the new one. A stored selection of `gpt-5.6-luna` is no longer a known ID, so the client and `generate-v4` both fall back to the new default. The eval cost table (AI-1242) and eval experiments (AI-1243) are out of scope. Source for the model ID and supported efforts (none/low/medium default/high/xhigh/max): [OpenAI model docs: GPT-6 Luna](https://developers.openai.com/api/docs/models/gpt-6-luna). `@ai-sdk/openai@4.0.41` types model IDs as a union plus `string & {}`, so no SDK bump is needed. ## Review instructions 1. Check the diff in `model.utils.ts`. Say so if you'd rather keep `gpt-5.6-luna` selectable as a fallback. 2. AI-1245 asks for the Assistant evals before shipping. Add the `run-evals` label to run `braintrust-evals.yml` on this PR, or run `pnpm --filter studio evals:run` locally. They have not been run yet because they need OpenAI/Braintrust credentials. 3. Already run: studio `typecheck`, eslint + prettier on the changed files, vitest for `lib/ai`, `pages/api/ai` and `state/ai-assistant` (264 passed), and `evals:preflight`. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] No docs topics changed **AI disclosure:** Claude Code wrote this PR from start to finish. Saxon Fletcher (@SaxonF) is the accountable human and must review it before merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01W21zLTfzde6FFPyYGbGC6K --- _Generated by [Claude Code](https://claude.ai/code/session_01W21zLTfzde6FFPyYGbGC6K)_ Co-authored-by: Claude <noreply@anthropic.com>