mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-08-27 11:20:42 +02:00
* refactor(model-routing): centralize explicit foreground fallback policy Make foreground fallback an explicit per-user, availability-only policy shared by streaming Chat, non-stream Chat, and Agent runs. Preserve strict defaults, owner/model and credential boundaries, pinned Agent routes, and truthful per-round provenance/accounting. Carry provider-reported model identifiers through native streaming adapters, non-stream responses, and caches, and keep legacy default_model_fallbacks as tombstoned raw storage that generic settings APIs and agent tools cannot expose or mutate. * fix(agent-loop): restore rebase-dropped qwen routing, workspace prompt, and temperature clamp * fix(model-routing): thread selected endpoint identity, fix cost classification and fallback eligibility * fix(chat): restore stream helpers and harden run stop lifecycle * fix(model-routing): let numeric provider codes win over symbolic rate-limit statuses * fix(agent-loop): apply qwen temperature and notes-tool clamps per fallback candidate * fix(chat): honor queued stop across resend and reload canonical terminal on EOF * fix(chat): track stop queue and cleanup ownership by per-send generation * fix(agent-loop): preserve requested temperature for non-qwen fallback candidates * fix(chat): reserve send ownership before any await and scope stop to the current send * fix(chat): clear the previous run identity at send reservation --------- Co-authored-by: RaresKeY <158580472+RaresKeY@users.noreply.github.com> Co-authored-by: StressTestor <212606152+StressTestor@users.noreply.github.com>
31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
"""The retired default fallback editor must not imply active routing."""
|
|
|
|
from pathlib import Path
|
|
|
|
from bs4 import BeautifulSoup
|
|
|
|
|
|
_REPO = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_legacy_default_fallback_editor_is_absent():
|
|
soup = BeautifulSoup(
|
|
(_REPO / "static" / "index.html").read_text(encoding="utf-8"),
|
|
"html.parser",
|
|
)
|
|
editor = soup.find(id="set-defaultFallbacks")
|
|
|
|
assert editor is None
|
|
assert soup.find(id="set-defaultAddFallback") is None
|
|
|
|
|
|
def test_default_model_save_does_not_rewrite_legacy_fallbacks():
|
|
source = (_REPO / "static" / "js" / "settings.js").read_text(encoding="utf-8")
|
|
start = source.index("async function initDefaultChat()")
|
|
end = source.index("/* ── Utility Model ── */", start)
|
|
default_chat_source = source[start:end]
|
|
|
|
assert "settings.default_model_fallbacks" not in default_chat_source
|
|
assert "default_model_fallbacks:" not in default_chat_source
|
|
assert "set-defaultFallbacks" not in default_chat_source
|
|
assert "set-defaultAddFallback" not in default_chat_source
|