Remove the admin panel's Environment tab and env-apply
Test and deploy / test (push) Successful in 2m2s
Test and deploy / deploy (push) Successful in 1m35s

.env is edited by hand again. Drops the /admin/env endpoints, EnvManager
and its registry, the host-side apply.py watcher and its install script,
the backend's env-apply bind mount, and the Environment tab.

The deploy and maintenance workflows still serialise docker compose, now
on .compose.lock in the checkout instead of env-apply/run/lock.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-15 15:29:55 +01:00
co-authored by Claude Opus 5.5
parent c9d599a371
commit 604ac32028
27 changed files with 54 additions and 2270 deletions
+3 -3
View File
@@ -94,9 +94,9 @@ Their plumbing is in two places, shared by any route added later:
outside is a 404 before its body is validated.
Every route uses one model, `MODEL` in `claude.py`: the `CLAUDE_MODEL` variable,
or `claude-sonnet-5-5` when it is blank. It is chosen on the admin panel's
Environment tab from `claude-haiku-4-5`, `claude-sonnet-5-5` and
`claude-opus-5-5`, and saving it there restarts this service. The request is
or `claude-sonnet-5-5` when it is blank. It is set in `.env` to one of
`claude-haiku-4-5`, `claude-sonnet-5-5` and `claude-opus-5-5`; recreate this
service after changing it. The request is
shaped per model by `_model_options`: a model that thinks gets
`output_config.effort: "low"` and 4,000 tokens of headroom on top of the
caller's `max_tokens`, because thinking is billed against it; Haiku 4.5 gets
+4 -5
View File
@@ -22,12 +22,11 @@ log = logging.getLogger(__name__)
T = TypeVar("T", bound=BaseModel)
# Which model every call uses. CLAUDE_MODEL is set from the admin panel's
# Environment tab (it is in backend/services/env_registry.json, whose `options`
# list is what the panel offers); changing it there recreates this container,
# which is why reading it once at import is enough. Blank means the default.
# Which model every call uses. CLAUDE_MODEL comes from .env; changing it means
# recreating this container, which is why reading it once at import is enough.
# Blank means the default.
#
# The registry's options are the ids this module has been written for. Another
# The ids listed in .env.example are the ones this module has been written for. Another
# id is passed through as it is, treated as a model that thinks (see below);
# if the API does not know it, every call fails with its `failed` message and
# the reason is in this service's log.
-11
View File
@@ -76,17 +76,6 @@ def test_haiku_gets_the_plain_request(monkeypatch):
assert call == {"model": "claude-haiku-4-5", "max_tokens": 64, "messages": MESSAGES}
def test_the_default_model_is_one_the_admin_panel_offers():
"""CLAUDE_MODEL's options in the env registry are what the Environment tab lets an admin pick."""
import json
from pathlib import Path
registry = json.loads((Path(__file__).parents[2] / "backend/services/env_registry.json").read_text())
(entry,) = [v for v in registry if v["name"] == "CLAUDE_MODEL"]
assert claude.DEFAULT_MODEL in entry["options"]
assert "python" in entry["services"]
def test_the_answer_is_found_after_a_thinking_block():
reply = SimpleNamespace(
stop_reason="end_turn",