Let superadmins assign one OpenRouter model per task group.
Deploy Development / deploy (push) Successful in 53s
Test Suite / pytest-backend (push) Successful in 50s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 17s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Failing after 7m40s
Deploy Development / deploy (push) Successful in 53s
Test Suite / pytest-backend (push) Successful in 50s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 17s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Failing after 7m40s
Reasoning, drafting, and matching prompts inherit that model, so each prompt does not need its own setting. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0431c9e160
commit
b537750671
14 files changed
+720
-65
No files matched your search
@@ -0,0 +1,38 @@
|
||||
"""Aufgabengruppen für OpenRouter-Modelle. Die Zuordnung der Prompts lebt in ai_prompts.model_role."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional, Tuple
|
||||
|
||||
ROLE_KEYS = frozenset({"reasoning", "drafting", "matching"})
|
||||
|
||||
_FALLBACK_MODEL = "anthropic/claude-sonnet-4"
|
||||
|
||||
|
||||
def resolve_prompt_openrouter_model(
|
||||
*,
|
||||
prompt_model: Optional[str],
|
||||
role_model: Optional[str],
|
||||
platform_model: Optional[str],
|
||||
env_model: Optional[str],
|
||||
) -> Tuple[str, str]:
|
||||
"""
|
||||
Auflösung und Quelle.
|
||||
|
||||
Quelle ist `prompt`, `role`, `database` oder `environment`.
|
||||
Ungültige IDs werden übersprungen.
|
||||
"""
|
||||
from openrouter_chat import normalize_openrouter_model_id
|
||||
|
||||
for raw, source in (
|
||||
(prompt_model, "prompt"),
|
||||
(role_model, "role"),
|
||||
(platform_model, "database"),
|
||||
):
|
||||
try:
|
||||
model = normalize_openrouter_model_id(raw)
|
||||
except ValueError:
|
||||
model = None
|
||||
if model:
|
||||
return model, source
|
||||
env = (str(env_model or "").strip() or _FALLBACK_MODEL)
|
||||
return env, "environment"
|
||||
Reference in new issue
Block a user