A dot on the loaded model, and a new chat that matches its model

The model menu asks each connection's /v1/models for the load state
llama-swap reports there and marks the loaded model; endpoints that state
nothing (a hosted API) get no dot. The new-chat screen offered the generic
three efforts whatever the model took, so Bonsai's xhigh default showed as
off. The composer was as wide as its widest hint. And the Doors of Durin are
a riddle: Speak friend and enter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-28 08:48:58 +00:00
co-authored by Claude Opus 5.5
parent dfd8418d95
commit cb8a223fa4
18 changed files with 493 additions and 8 deletions
+22
View File
@@ -582,3 +582,25 @@ def test_an_endpoint_with_no_props_leaves_the_list_alone(client, db, registered,
db.expire_all()
assert db.get(Model, model.id).reasoning_efforts == ["low", "high"]
def test_a_new_chat_offers_the_models_own_efforts(client: TestClient, db, registered):
"""`/chat?model=` offered the generic three whatever the model took.
On Bonsai (low, medium, xhigh, default xhigh) that drew `high`, which it
rejects, and no `xhigh`, so the configured default was not an option and
the picker fell through to "off". The chat created from that screen got
`xhigh` anyway, so the control said one thing and the first reply did
another. Reported from the live instance.
"""
model = _model(db)
model.model_id = "bonsai"
model.reasoning_efforts = ["low", "medium", "xhigh"]
model.params_json = {"reasoning_effort": "xhigh"}
db.commit()
html = client.get("/chat?model=bonsai").text.replace("\n", "").replace(" ", "")
assert '<option value="xhigh" selected>' in html
assert '<option value="high"' not in html
assert '<option value="off" selected' not in html