Skip to content

feat(sync): RunInfra provider sync module - #5103

Open
jaberjaber23 wants to merge 1 commit into
anomalyco:devfrom
jaberjaber23:runinfra-sync-module
Open

feat(sync): RunInfra provider sync module#5103
jaberjaber23 wants to merge 1 commit into
anomalyco:devfrom
jaberjaber23:runinfra-sync-module

Conversation

@jaberjaber23

Copy link
Copy Markdown
Contributor

Adds hourly sync for the RunInfra provider (merged in #4793, #4884, #4971) so prices and limits stay current from our own API instead of manual PRs.

What it does

  • Fetches the authenticated GET https://api.runinfra.ai/v1/models and updates ONLY cost.input, cost.output, cost.cache_read, limit.context, and limit.output on the five existing providers/runinfra TOMLs.
  • Joins remote product slugs to local files through each TOML's leading # Source: https://runinfra.ai/inference-api/<slug> comment (all five carry unique headers on dev).
  • Hand-authored facts are never touched: reasoning_options, capability overrides, descriptions, base_model pointers, and the probe-evidence comments stay as authored (they were verified by live probes and the list endpoint is not authoritative for them).
  • skipCreates: a new remote model is reported rather than auto-created, so a human authors probe evidence first, matching how our entries were reviewed in feat(provider): add RunInfra #4793 and feat(runinfra): add DeepSeek V4 Pro #4971.
  • A local model missing from the response is retained: a temporary capacity pause delists a model from /v1/models while its page states the pause, and the sync must not delete a real entry over that.
  • Fails closed on missing auth, HTTP errors, parse failures, or duplicate slug ownership.

Validation

  • Live dry run against the current API and the five dev TOMLs: 0 created, 0 updated, 0 removed, 5 unchanged, with the one currently paused model correctly reported and retained.
  • bun validate exits 0.
  • Registered in sync/index.ts (import, type, value, direct group), the hourly workflow env, a runinfra:sync alias, and RunInfra notes in sync.md.

Secret

The workflow line reads secrets.RUNINFRA_API_KEY. The module fails closed without it, so please add the secret before merging this to keep the hourly job green. We will hand the key to a maintainer through a secure channel whenever you are ready (it is a dedicated key, and we rotate it on request).

Keeps the five RunInfra entries current from the provider's own
authenticated GET /v1/models: authoritative for standing input, output,
and cache_read pricing (USD per 1M), served context, and the enforced
output ceiling. Hand-authored facts (reasoning_options, capabilities,
descriptions, base_model pointers, probe-evidence comments) are never
touched. Joins remote slugs to local TOMLs through each file's leading
Source comment; skipCreates so a new remote model is reported for human
probe-evidence authoring instead of auto-created; local models missing
from the response are retained because a capacity pause can temporarily
delist a real hosted model; fails closed on auth, parse, or duplicate
slug ownership.

Validated against the live API: dry run reports 0 created, 0 updated,
0 removed, 5 unchanged (with one currently paused model correctly
retained while missing), and bun validate exits 0.

Requires the RUNINFRA_API_KEY repository secret before merge; the
module fails closed without it. We will hand the key to a maintainer
through a secure channel on request.
@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant