Provider Catalog Sync
Model catalogs move constantly — new models ship, old ones get deprecated. A
router that plans against a stale list will steer to a model that no longer
exists. Catalog Sync polls each subscription’s provider /models endpoint on
a schedule, diffs the result against the last snapshot, and keeps the
subscription’s model list current automatically.
How it works
Section titled “How it works”- Each provider that exposes a model-listing endpoint has a small config file in
providers/catalog/*.yaml(list URL, auth header, and where the model array lives in the response). - A background loop checks every subscription whose provider has a config. When
one is due per its
models_sync_schedule(cron, default every 6 hours), it fetches the list, normalizes it to{id, name, context_window?}, and diffs it against the stored snapshot. - On a change it updates the snapshot, records the diff in the subscription’s catalog history, and writes an audit entry. Nothing changes if the list is identical.
Provider API keys are resolved through your Vault Connector just like dispatch — the catalog loop never holds a raw key.
All routes require your admin API key and are tenant-scoped.
# Which providers have a catalog configcurl https://app.modelreins.com/catalog/providers \ -H "Authorization: Bearer $MODELREINS_API_KEY"
# Sync status for every subscriptioncurl https://app.modelreins.com/catalog/subscriptions \ -H "Authorization: Bearer $MODELREINS_API_KEY"
# The current model list for one subscriptioncurl https://app.modelreins.com/catalog/subscriptions/<id>/models \ -H "Authorization: Bearer $MODELREINS_API_KEY"
# Recent catalog changes (added / removed / changed) for one subscriptioncurl https://app.modelreins.com/catalog/subscriptions/<id>/history \ -H "Authorization: Bearer $MODELREINS_API_KEY"
# Force a sync right nowcurl -X POST https://app.modelreins.com/catalog/subscriptions/<id>/sync \ -H "Authorization: Bearer $MODELREINS_API_KEY"Per-subscription overrides
Section titled “Per-subscription overrides”| Column | Meaning |
|---|---|
models_sync_schedule | cron expression; how often to poll (default 0 */6 * * *) |
models_sync_url | override the provider’s list URL for this subscription only |
provided_models | the current snapshot (JSON array); read via /catalog/subscriptions/<id>/models |
models_synced_at | timestamp of the last successful sync |
Adding a provider
Section titled “Adding a provider”Drop a file in providers/catalog/:
provider: myprovider # must match subscriptions.providerlist_url: https://api.example.com/v1/modelsmethod: GETauth: header: bearer # "bearer" | a header name | "query:<param>" ref: provider:myprovider # Vault Connector reference to resolve extra_headers: x-api-version: "2024-01"response_path: data[] # dotted path; [] marks the list to iteratefields: id: id name: display_name context_window: context_lengthShips with configs for Claude, OpenAI, OpenRouter, 1minAI, Groq, Gemini, and Ollama.
Turning it off
Section titled “Turning it off”Set MODELREINS_CATALOG_SYNC=0 to disable the loop. See
Environment Variables.