diff --git a/.env.example b/.env.example index 69e1c1a3b0..92065948e9 100644 --- a/.env.example +++ b/.env.example @@ -1962,6 +1962,12 @@ APP_LOG_TO_FILE=true # Default: 8000 (8 seconds). On timeout, a last-good 200 is served when available. # CATALOG_BUILD_TIMEOUT_MS=8000 +# Age after which a connection's synced model list stops being authoritative for routing (#12849). +# A stale (or never-timestamped) synced catalog fails open to the provider registry. +# Used by: src/lib/db/models/activeSyncedCatalog.ts +# Default: 2592000000 (30 days) +# OMNIROUTE_SYNCED_CATALOG_STALE_AFTER_MS=2592000000 + # ── NanoBanana (Image Generation) ── # Polling config for async image generation jobs. # Used by: open-sse/handlers/imageGeneration.ts diff --git a/changelog.d/maintenance/12732-env-synced-catalog-stale-after.md b/changelog.d/maintenance/12732-env-synced-catalog-stale-after.md new file mode 100644 index 0000000000..9a7b6c1ef8 --- /dev/null +++ b/changelog.d/maintenance/12732-env-synced-catalog-stale-after.md @@ -0,0 +1 @@ +- **docs(env):** document `OMNIROUTE_SYNCED_CATALOG_STALE_AFTER_MS` (#12849, default 30 days) in `.env.example` and `ENVIRONMENT.md`; the stale-synced-catalog fail-open shipped the override without either, which the env/docs contract gate reports as code-only ([#12732](https://github.com/diegosouzapw/OmniRoute/issues/12732)) diff --git a/docs/reference/ENVIRONMENT.md b/docs/reference/ENVIRONMENT.md index 83ceb71568..be26a0282a 100644 --- a/docs/reference/ENVIRONMENT.md +++ b/docs/reference/ENVIRONMENT.md @@ -1053,6 +1053,7 @@ desktop install. | `OPENROUTER_CATALOG_TTL_MS` | `86400000` (24h) | `src/lib/catalog/openrouterCatalog.ts` | OpenRouter model catalog cache TTL. | | `MODEL_CATALOG_INCLUDE_NAMES` | `true` | `src/shared/constants/featureFlagDefinitions.ts` | Include display-friendly `name` fields in `/v1/models` responses. Disable for clients that expect IDs only. | | `CATALOG_BUILD_TIMEOUT_MS` | `8000` (8s) | `src/app/api/v1/models/catalogCache.ts` | Cold-path wait bound for a coalesced `GET /v1/models` catalog rebuild (#12627). On timeout, a last-good 200 is served when one exists. | +| `OMNIROUTE_SYNCED_CATALOG_STALE_AFTER_MS` | `2592000000` (30 days) | `src/lib/db/models/activeSyncedCatalog.ts` | Age after which a connection's synced model list stops being authoritative for routing and fails open to the registry (#12849). Never-timestamped rows count as stale. | | `NANOBANANA_POLL_TIMEOUT_MS` | `120000` | `open-sse/handlers/imageGeneration.ts` | Max wait for NanoBanana image generation jobs. | | `NANOBANANA_POLL_INTERVAL_MS` | `2500` | `open-sse/handlers/imageGeneration.ts` | NanoBanana job polling frequency. | | `ADOBE_FIREFLY_SUBMIT_BASE_DELAY_MS` | `8000` | `open-sse/services/adobeFireflyUpscale.ts` | Base delay for the Adobe Firefly upscale submit-retry exponential backoff. |