CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

feat(admin): AI model tier selection — internal repairs on Opus 5, admin-switchable #5440

Merged⚡ AI-generatedXSccantynz wants to mergefeat/admin-ai-model-tiersmainopened 24d ago
ccantynzcommented 24d ago

Owner directive: platform-internal AI (self-repair, incident RCA) runs on an admin-selected model — Opus 5 by default — on the owner's Anthropic account; customer-facing AI stays on cost-appropriate tiers metered per user.

  • Three admin-selectable tiers backed by system_flags (ai_model_internal / _standard / _light), read through a 60s cache so modelForTask() stays sync for its 52 call sites. Only catalog models accepted — a typo'd flag can never route calls to a 404 id.
  • internalModel() (default claude-opus-5) now drives deploy-failure RCA in ai-incident.ts (§4.4-locked; changed under this session's owner directive).
  • Cost table refreshed: opus-5/4-8/4-6 at $5/$25, sonnet-5 at $3/$15 list, opus-4-7 corrected (was recorded at 3× its real price).
  • /admin/flags gets an "AI models" card: three dropdowns with pricing labels, separate POST, audit-logged, applies within 60s without a deploy.

Tests green (new ai-model-tiers.test.ts + cost-tracker suite), tsc clean.

🤖 Generated with Claude Code

gluecron[bot]🤖 botAI Reviewcommented 24d ago

AI review unavailable

The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.

ccantynzAI Reviewcommented 24d ago

AI Triage

(no summary)

Priority: medium Risk area: mixed

Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)

Suggestions only — nothing has been applied. The PR author stays in control.

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts