﻿# Revalidate a model catalog with entity tags

Persist a catalog body and its opaque validator together; revalidation without the body cannot rebuild the catalog.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-http-etag-catalog/
Language: en

A catalog poller downloads the same model list repeatedly even when nothing has changed. Conditional retrieval can reduce unnecessary response transfer, but only if the client retains the representation associated with its validator. A status-only implementation can mistakenly replace a usable catalog with an empty document after a successful revalidation.

## Store the validator with the representation

An entity tag is an opaque validator chosen by the server. Preserve its exact syntax, including quotation marks and any weakness indicator. Do not reconstruct it from a local serialization of parsed JSON. Whitespace or property ordering can change local bytes without changing the server's validation policy. Save the tag beside the fetched body, relevant response metadata and the request's representation-selection fields, so the next conditional request refers to the correct variant.

## Send a conditional retrieval

Use `If-None-Match` on a subsequent catalog retrieval when the endpoint supports validators. A not-modified response instructs the client to reuse its stored representation while applying the applicable metadata updates. It does not carry a replacement catalog body. If the local body was lost or corrupted, an entity tag alone is insufficient; perform an unconditional retrieval to rebuild a valid pair rather than accepting an empty list of models.

## Separate validation from freshness

A fresh cached catalog can sometimes be reused without contacting the origin, according to its cache policy. Revalidation contacts the server to check a stored response. Those are different decisions. A long polling interval chosen by an application does not override server directives or prove that a model remains available. Preserve the time of last successful validation separately from the time when the body was first downloaded, because operational reports may need both.

## Exercise changes and variant boundaries

Test an unchanged catalog and a deliberately changed test catalog. Confirm that the client retains the old body after a not-modified response and replaces it after a full response. Also change an allowed representation preference, such as a documented media type. Reusing the previous variant's validator without its matching request context can produce misleading behavior. Keep conditional requests for authenticated catalogs within their explicit access and storage policy.

Test a restart after the validator is persisted but before the body replacement is committed. A cache implementation that updates these independently can later claim that an old body belongs to a new tag. An atomic body-and-metadata record prevents that local inconsistency without changing server-side validation semantics.

## Define what the check establishes

A valid revalidation establishes consistency with the origin's current representation under its validator rules. It does not prove endpoint readiness, route capacity or successful generation. If model identifiers disappear, retain enough prior metadata to explain the transition rather than silently serving a malformed empty cache. Acceptance includes restart recovery, atomic persistence of body and tag, and clear handling when the server omits validators. In that case ordinary full retrieval remains correct; conditional support is an optimization, not a prerequisite for a trustworthy catalog client.

## Primary references

[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html). Defines entity tags, conditional requests and not-modified responses.

[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html). Explains revalidation and updating metadata of a stored response.

[Digest Fields](https://www.rfc-editor.org/rfc/rfc9530.html). Distinguishes an opaque validator from an explicit content-integrity digest.

Related reading: [Fetching the OpenRouter model catalog before deployment](/journal/openrouter-model-catalog-api/); [Keeping model capabilities and rollout state consistent](/journal/provider-capability-rollout-consistency/).
