Endpoint
When to use
Use this endpoint when a cached response is known to be stale or incorrect. Common scenarios:- The upstream model’s knowledge has been updated and the cached answer is outdated.
- A cached response contained an error and you need to force a fresh generation on the next identical query.
- You are testing the gateway’s routing behavior and want to clear a specific cache hit.
Path parameters
The unique identifier of the cache entry to evict. This is the UUID assigned when the entry was inserted — the same value used as the Qdrant point ID and as the suffix of the Redis key (
cache:<id>).Cache entry IDs are UUIDs in the format
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx. You can obtain an entry’s ID by inspecting the Qdrant collection directly, or by adding tracing to your application to capture IDs at insert time.Responses
Success
Returns204 No Content with an empty body when the entry is successfully evicted from both Qdrant and Redis.
Error responses
All errors follow the standard error format:| Status | type | Cause |
|---|---|---|
400 Bad Request | invalid_request_error | No ID was provided in the path (e.g. DELETE /v1/cache/), or the request used a method other than DELETE. |
500 Internal Server Error | server_error | The eviction failed — for example, Qdrant or Redis returned an error during deletion. |
Example
Implementation details
WhenEvict is called with an ID, the gateway performs two operations in sequence:
- Deletes the Qdrant point with the given ID from the configured vector collection.
- Deletes the Redis key
cache:<id>.
500 error is returned. There is no partial-eviction state exposed to the caller.