refactor(settings): validate cross-field rules in the model

The "AUTH_TYPE=oidc requires OIDC_ISSUER, OIDC_CLIENT_ID and
OIDC_FRONTEND_URL" check lived in app.py, so it only ran when the Flask
app was imported; a worker or script with the same misconfiguration
started fine. It is now a model validator on the auth group and runs
wherever Settings is loaded, with the same message.

DEPLOYMENT_TYPE, which app.py read straight from the environment to
decide whether a missing JWT_SECRET_KEY is fatal, is a documented
setting on the server group now, so it shows up in the reference like
every other variable the app reads.
This commit is contained in:
arc53-machine committed 2026-09-17 11:09:09 +01:00
1 parent 95d0799494
commit a8dab8864d
5 files changed
+43 -12

No files matched your search

@@ -1111,6 +1111,12 @@ Public callback URL for MCP OAuth; unset derives it from CONNECTOR_REDIRECT_BASE
Serving the UI, public URLs, and process-level knobs of the API server.
### `DEPLOYMENT_TYPE`
Type `str`, default unset.
Deployment class, e.g. cloud or production. A production class refuses to run without a configured JWT_SECRET_KEY instead of generating a local one on disk.
### `SERVE_UI`
Type `bool`, default `true`.