Endpoint Versioning
Every time you save an endpoint, PromptGate writes a snapshot of its configuration to endpoint_versions. That gives you three things you didn’t have before:
- History — what did this endpoint look like a week ago?
- Diff — exactly which fields changed between two versions?
- Restore — apply any old version as the current config without typing it back in.
How it works
Section titled “How it works”Snapshots cover the user-editable config columns: name, slug, prompt, user_prompt_template, input_schema, output_schema, provider_model, credential_id, provider_template_id, failover, temperature, top_p, max_output_tokens, rate limits, cache settings, budget, streaming, sessions, MCP exposure, routing rules. Identity / timestamps stay out — they’re not configuration.
The version number is monotonic per endpoint, starts at 1, and increments by 1 on every save. There is no “delete a version” — history is append-only.
Restore
Section titled “Restore”Click Restore this version on any non-latest version. PromptGate:
- Applies that snapshot to the endpoint (overwrites the live config).
- Records the result as a new version with
note = "restored from v<n>"andauthor_user_id = you. - Writes an
endpoint.version.restoreaudit entry referencing the source version number.
So a restore looks like this in history:
v3 (current) restored from v1 ← what you just didv2 updatedv1 createdIf the restore was wrong, restore again — v3 is now in history; you can roll forward back to v2.
The version detail page shows a side-by-side diff against the previous version (v3 vs v2). Use the Compare form on the index page to diff any two arbitrary versions (e.g. v1 vs v5).
The diff is field-level: only fields whose values differ are listed. JSON fields (input_schema, output_schema, failover) are pretty-printed; scalars are dumped via var_export.
Pairs well with
Section titled “Pairs well with”- Evals — restore an old version, run the eval set, restore the new version, run again. Did the regression we suspected actually exist?
- Replay from Logs — replays always run against current config; combined with versioning you can replay a request, restore an older version, replay again, and compare both responses in Live Logs.
Limitations
Section titled “Limitations”- Versions persist forever; they’re not pruned by retention policy. A loud endpoint with daily edits will accumulate rows. We’ll add a “snapshot only when changed” optimization if this becomes a real footprint problem.
- API Gateway endpoints (HTTP proxy) aren’t versioned yet — AI Gateway only.
© Akyros Labs LLC. All rights reserved.