Sonnet 5.5 as the default AI model, and a model list with prices (1.6.1)

Settings -> AI picks the model from a list (utils/aiModels.js: Sonnet,
Haiku, Opus 5.5 with list prices) or takes another model ID; choosing
one fills in its prices. Blank prices use the built-in ones, and cache
reads are metered at each model's own price.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 17:21:30 +02:00
co-authored by Claude Opus 5.5
parent 160ff3b927
commit ae7e10844d
12 changed files with 131 additions and 26 deletions
+6 -3
View File
@@ -1,5 +1,6 @@
const prisma = require('../config/db');
const { encrypt, decrypt } = require('./crypto');
const { DEFAULT_AI_MODEL } = require('./aiModels');
// Hub settings Joshua edits on the Settings page, with their defaults.
const DEFAULTS = {
@@ -26,10 +27,12 @@ const DEFAULTS = {
release_sync_error: '',
// AI for Cross Events 2.0 (utils/ai.js). Off until a key and the exchange rate are set.
ai_api_key: '',
ai_model: 'claude-haiku-5-5',
// One of utils/aiModels.js, or another model ID typed in.
ai_model: DEFAULT_AI_MODEL.id,
// US dollars per million tokens, for prompts under 100K tokens (the Hub refuses bigger ones).
ai_input_usd_per_mtok: '0.10',
ai_output_usd_per_mtok: '0.50',
// Filled in from utils/aiModels.js when a model is chosen; blank means the built-in price.
ai_input_usd_per_mtok: String(DEFAULT_AI_MODEL.inputUsd),
ai_output_usd_per_mtok: String(DEFAULT_AI_MODEL.outputUsd),
// Rand per US dollar.
ai_usd_zar: '',
// Default markup on the real cost, in %; a licence can override it.