Make AI model configurable per feature, and split news grading/formatting models
Every AI-calling feature (content correction, the @ai modifier, quiz grading, SEO metadata generation, the AI Usage Analyzer, and DeepSearch) can now name its own model via admin-editable configuration, defaulting to the gateway's default model when left blank. The gateway a feature talks to stays fixed to the internal endpoint either way, only the model name is a knob, so the best model can be picked per task. Also splits the news service's shared AI grading/formatting config into two independent endpoint/model/key pairs: reformatting no longer requires repointing (and thereby breaking) the free, scoring-only grading model. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FZ5x6KZTxZjbJqsEkxGbxG
This commit is contained in:
@@ -134,7 +134,7 @@ def test_grade_free_text_uses_a_valid_verdict(monkeypatch):
|
||||
def test_grade_free_text_passes_the_answering_key_through(monkeypatch):
|
||||
seen = {}
|
||||
|
||||
def capture(api_key, system, text, timeout):
|
||||
def capture(api_key, system, text, timeout, model=None):
|
||||
seen["api_key"] = api_key
|
||||
return json.dumps({"score": 1.0}), None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user