gateway: refresh EUR->USD prices at boot from the ECB feed (fail-open)

eur_prices.json is the EUR source of truth; fx_sync.py converts at the ECB daily
rate before config validation and rewrites only the model_info cost fields. If the
feed is unreachable the config is left untouched and the boot continues.
This commit is contained in:
inference-admin committed 2026-11-18 17:57:09 +00:00
1 parent fe48ca8e38
commit 140b443980
4 files changed
+110

No files matched your search

+7
View File
@@ -190,6 +190,13 @@ fi
# cannot happen through this path, and the shipped /app/code/config.yaml is
# the live catalog.
# --- Daily FX sync (fail-open): convert EUR-priced providers at the ECB rate ---
# Prices are refreshed at boot; a nightly timer restarts the gateway at 04:30 UTC.
if [ -f /app/code/fx_sync.py ]; then
echo "Refreshing EUR->USD prices from the ECB feed (fail-open)..."
python3 /app/code/fx_sync.py || echo "fx_sync exited non-zero; continuing with existing prices"
fi
# --- Fail-closed config validation (2026-11-11) ---
# Validate the config that will actually be SERVED, before starting anything.
# A bad key must fail LOUD at the top of the boot log (the chat outage of