Files
codex/codex-rs
tongzhou wang 3b8bd2ee7e Add request IDs and attempt numbers to model request hooks (#61587)
## Why

Model request hooks need to correlate attempts belonging to the same generation across retries and model fallback.

## What changed

Add `request_id` and one-based `attempt_number` fields to `PreModelRequest` and `PostModelRequest` inputs and their generated schema. Keep the request ID stable across retries and increment the attempt number for each call to open a response stream.

## Testing

Extend hook tests to verify matching request IDs and increasing attempt numbers across retries. Extend the background compaction scenario to verify that its pre/post hooks share an ID distinct from the ordinary sampling request.

GitOrigin-RevId: 2d85ad6fd630505a89a712cebab6ca0f731610c9
2026-11-15 00:39:00 +00:00
..
…
…
…
…