Problem
core/config.py is one flat class of 2,632 lines, ten authors in ninety days.
Proposal
Nested settings models per domain (tools, budgets and pricing, providers and models, tenancy and auth, telemetry, platform), composed into GatewayConfig. Environment variable names and config.yml keys do not change: use field aliases so OTARI_WEB_SEARCH_URL still lands where it did. One PR per domain group, smallest first.
Acceptance
Measure
config.py no longer appears among the most frequently changed files over 90 days.
Depends on
Nothing. Note the pydantic-settings nested-delimiter behavior; the alias approach must be verified on the installed version before the first PR.
Part of #1171.
Problem
core/config.pyis one flat class of 2,632 lines, ten authors in ninety days.Proposal
Nested settings models per domain (tools, budgets and pricing, providers and models, tenancy and auth, telemetry, platform), composed into
GatewayConfig. Environment variable names andconfig.ymlkeys do not change: use field aliases soOTARI_WEB_SEARCH_URLstill lands where it did. One PR per domain group, smallest first.Acceptance
GET /api/v1/settingssnapshot identical.config.example.ymlunchanged in meaning.Measure
config.pyno longer appears among the most frequently changed files over 90 days.Depends on
Nothing. Note the pydantic-settings nested-delimiter behavior; the alias approach must be verified on the installed version before the first PR.
Part of #1171.