Split out of the AISIX-Cloud#1013 work (failed-request content capture, PR pending).
The three routing endpoints (chat / messages / responses) emit per-attempt + terminal UsageEvents on failure (#655), and now also carry the captured request body. The remaining five handlers are success-only emitters: a failed /v1/embeddings, /v1/completions, /v1/rerank, /v1/images or /v1/audio request produces no usage event at all — no SLS record, no dashboard Logs row, with or without content. E.g. embeddings.rs documents it outright: "guardrail_blocked — a blocked input short-circuits before this emit (success-only path)", and completions.rs only emits inside if let Some(usage) on the Ok arm.
Scope: give these five handlers failure-path events consistent with the chat family (status, error_class, applied_guardrails, and the captured request body under the same content_mode=full gate / 401+403 exclusion), plus e2e coverage per endpoint.
Each handler needs an audit of its own error arms (reservation commit, 501 not-implemented paths, upstream_called=false convention) — the chat pattern does not transplant 1:1.
Split out of the AISIX-Cloud#1013 work (failed-request content capture, PR pending).
The three routing endpoints (chat / messages / responses) emit per-attempt + terminal UsageEvents on failure (#655), and now also carry the captured request body. The remaining five handlers are success-only emitters: a failed /v1/embeddings, /v1/completions, /v1/rerank, /v1/images or /v1/audio request produces no usage event at all — no SLS record, no dashboard Logs row, with or without content. E.g.
embeddings.rsdocuments it outright: "guardrail_blocked — a blocked input short-circuits before this emit (success-only path)", andcompletions.rsonly emits insideif let Some(usage)on the Ok arm.Scope: give these five handlers failure-path events consistent with the chat family (status, error_class, applied_guardrails, and the captured request body under the same content_mode=full gate / 401+403 exclusion), plus e2e coverage per endpoint.
Each handler needs an audit of its own error arms (reservation commit, 501 not-implemented paths, upstream_called=false convention) — the chat pattern does not transplant 1:1.