mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-22 04:19:40 +00:00
docs(api): scope no-log header to every chat-family route
The header is read from clientRawRequest.headers in chatCore, which every route built on handleChat reaches: Chat Completions, Responses, Messages, Completions and the Gemini-compatible path. The previous wording limited it to chat and Responses. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -69,26 +69,26 @@ Content-Type: application/json
|
||||
|
||||
### Custom Headers
|
||||
|
||||
| Header | Direction | Description |
|
||||
| ------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `X-OmniRoute-No-Cache` | Request | Set to `true` to bypass cache |
|
||||
| `x-omniroute-no-memory` | Request | Set to `true` to skip memory + skills injection for this request (mirrors no-cache; avoids the per-call token/cost overhead) |
|
||||
| `x-omniroute-no-log` | Request | Set to `true` to omit request/response payloads from call logs for this chat/Responses request. Timestamp, model, status, duration and token counts are still recorded. Combine with `x-omniroute-no-memory` and `x-omniroute-no-cache` for a full content opt-out |
|
||||
| `X-OmniRoute-Progress` | Request | Set to `true` for progress events |
|
||||
| `X-Session-Id` | Request | Sticky session key for external session affinity |
|
||||
| `x_session_id` | Request | Underscore variant also accepted (direct HTTP) |
|
||||
| `X-OmniRoute-Session-Id` | Request | Caller-supplied session/conversation tag (also feeds memory). When present, persisted verbatim to `call_logs.session_tag` for per-session cost attribution (#8249) — never synthesized when absent |
|
||||
| `Idempotency-Key` | Request | Dedup key (5s window) |
|
||||
| `X-Request-Id` | Request | Alternative dedup key |
|
||||
| `x-omniroute-connection` | Request | Pin a single-model request to one provider connection (account) by its id — see [Account pinning per request](#account-pinning-per-request) |
|
||||
| `X-OmniRoute-Cache` | Response | `HIT` or `MISS` (non-streaming) |
|
||||
| `X-OmniRoute-Idempotent` | Response | `true` if deduplicated |
|
||||
| `X-OmniRoute-Progress` | Response | `enabled` if progress tracking on |
|
||||
| `X-OmniRoute-Session-Id` | Response | Effective session ID used by OmniRoute |
|
||||
| `X-OmniRoute-Request-Id` | Response | Request correlation id (when known) |
|
||||
| `X-OmniRoute-Version` | Response | OmniRoute build version (always present) |
|
||||
| `X-OmniRoute-Cost-Saved` | Response | USD the cache avoided on a HIT (cache hits only) |
|
||||
| `X-OmniRoute-Decision` | Response | Routing trace: `strategy=<name>; provider=<alias>; latency_ms=<n>` (`<name>` is the combo strategy, or `single` for a non-combo request) — always present on completion responses |
|
||||
| Header | Direction | Description |
|
||||
| ------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `X-OmniRoute-No-Cache` | Request | Set to `true` to bypass cache |
|
||||
| `x-omniroute-no-memory` | Request | Set to `true` to skip memory + skills injection for this request (mirrors no-cache; avoids the per-call token/cost overhead) |
|
||||
| `x-omniroute-no-log` | Request | Set to `true` to omit request/response payloads from call logs for this inference request (all chat-family routes: Chat Completions, Responses, Messages, Completions, Gemini). Timestamp, model, status, duration and token counts are still recorded. Combine with `x-omniroute-no-memory` and `x-omniroute-no-cache` for a full content opt-out |
|
||||
| `X-OmniRoute-Progress` | Request | Set to `true` for progress events |
|
||||
| `X-Session-Id` | Request | Sticky session key for external session affinity |
|
||||
| `x_session_id` | Request | Underscore variant also accepted (direct HTTP) |
|
||||
| `X-OmniRoute-Session-Id` | Request | Caller-supplied session/conversation tag (also feeds memory). When present, persisted verbatim to `call_logs.session_tag` for per-session cost attribution (#8249) — never synthesized when absent |
|
||||
| `Idempotency-Key` | Request | Dedup key (5s window) |
|
||||
| `X-Request-Id` | Request | Alternative dedup key |
|
||||
| `x-omniroute-connection` | Request | Pin a single-model request to one provider connection (account) by its id — see [Account pinning per request](#account-pinning-per-request) |
|
||||
| `X-OmniRoute-Cache` | Response | `HIT` or `MISS` (non-streaming) |
|
||||
| `X-OmniRoute-Idempotent` | Response | `true` if deduplicated |
|
||||
| `X-OmniRoute-Progress` | Response | `enabled` if progress tracking on |
|
||||
| `X-OmniRoute-Session-Id` | Response | Effective session ID used by OmniRoute |
|
||||
| `X-OmniRoute-Request-Id` | Response | Request correlation id (when known) |
|
||||
| `X-OmniRoute-Version` | Response | OmniRoute build version (always present) |
|
||||
| `X-OmniRoute-Cost-Saved` | Response | USD the cache avoided on a HIT (cache hits only) |
|
||||
| `X-OmniRoute-Decision` | Response | Routing trace: `strategy=<name>; provider=<alias>; latency_ms=<n>` (`<name>` is the combo strategy, or `single` for a non-combo request) — always present on completion responses |
|
||||
|
||||
> Nginx note: if you rely on underscore headers (for example `x_session_id`), enable `underscores_in_headers on;`.
|
||||
|
||||
|
||||
@@ -162,12 +162,14 @@ out.
|
||||
|
||||
### Per-request opt-out (`x-omniroute-no-log`)
|
||||
|
||||
A client can opt a single chat or Responses request out of payload persistence
|
||||
A client can opt a single inference request out of payload persistence
|
||||
without creating a dedicated key. Send `x-omniroute-no-log: true` on the request
|
||||
(`1` and `yes` are also accepted, case-insensitive). The call-log row is still written with its
|
||||
timestamp, model, provider, status, duration and token counts, but
|
||||
`request_body`, `response_body`, request summaries and pipeline artifacts are
|
||||
omitted.
|
||||
(`1` and `yes` are also accepted, case-insensitive). It applies to every
|
||||
chat-family route that runs through the chat handler: Chat Completions,
|
||||
Responses, Messages, Completions and the Gemini-compatible path. The call-log
|
||||
row is still written with its timestamp, model, provider, status, duration and
|
||||
token counts, but `request_body`, `response_body`, request summaries and
|
||||
pipeline artifacts are omitted.
|
||||
|
||||
The header is ORed with the key flag: a no-log key stays no-log regardless of
|
||||
the header, and the header cannot re-enable logging for a no-log key. The header
|
||||
|
||||
Reference in New Issue
Block a user