Let superadmins choose the OpenRouter model from the live catalog.
Deploy Development / deploy (push) Successful in 1m0s
Test Suite / pytest-backend (push) Successful in 50s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 20s
Test Suite / k6 /health Baseline (push) Successful in 36s
Test Suite / playwright-tests (push) Failing after 7m52s

The platform default can be replaced in the admin UI when a model is no longer available, without editing OPENROUTER_MODEL.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-23 09:38:56 +01:00
1 parent 1bdb039a91
commit f49de9c971
21 files changed
+1246 -35

No files matched your search

@@ -0,0 +1,18 @@
-- Migration 097: Plattform-Standard für das OpenRouter-Modell (Superadmin).
-- NULL = Umgebungsvariable OPENROUTER_MODEL.
-- Ein Prompt-Override in ai_prompts.openrouter_model hat weiter Vorrang.
CREATE TABLE IF NOT EXISTS platform_ai_settings (
id SMALLINT PRIMARY KEY DEFAULT 1,
CONSTRAINT platform_ai_settings_singleton CHECK (id = 1),
openrouter_model VARCHAR(200),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_by_profile_id INT REFERENCES profiles(id) ON DELETE SET NULL
);
INSERT INTO platform_ai_settings (id, openrouter_model)
VALUES (1, NULL)
ON CONFLICT (id) DO NOTHING;
COMMENT ON COLUMN platform_ai_settings.openrouter_model IS
'Plattform-Standard OpenRouter model id; NULL = OPENROUTER_MODEL aus der Umgebung';