fix: align config.yaml structure with Pydantic AppConfig schema

config.yaml nested cheshire_cat and face_detector under the 'services' key,
and llama URLs under 'services.llama'. But AppConfig expects:
- services -> {url, amd_url} (llama endpoints directly)
- cheshire_cat -> top-level key
- face_detector -> top-level key

Because Pydantic silently ignores extra fields, ServicesConfig received
{llama: {...}, cheshire_cat: {...}, face_detector: {...}} and none matched
its 'url'/'amd_url' fields, so ALL service config from YAML was silently
ignored and Pydantic defaults were always used instead.

Flattened services to contain url/amd_url directly, and moved cheshire_cat
and face_detector to top-level keys matching the AppConfig model. Verified
both AppConfig(**yaml_data) and config_manager dot-path traversal work.
This commit is contained in:
2026-04-08 14:14:56 +03:00
parent 742b7b6b64
commit 4b5be3bf97

View File

@@ -6,16 +6,15 @@
# Service Endpoints # Service Endpoints
services: services:
llama:
url: http://llama-swap:8080 url: http://llama-swap:8080
amd_url: http://llama-swap-amd:8080 amd_url: http://llama-swap-amd:8080
cheshire_cat: cheshire_cat:
url: http://cheshire-cat:80 url: http://cheshire-cat:80
timeout_seconds: 120 timeout_seconds: 120
enabled: true # Set to false to disable Cheshire Cat integration enabled: true # Set to false to disable Cheshire Cat integration
face_detector: face_detector:
startup_timeout_seconds: 60 startup_timeout_seconds: 60
# AI Models # AI Models