Use stable Guardian prompt cache keys#24803
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b05ffb5ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…/guardian-cache-key
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf06538e4c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Why
Guardian review sessions are reusable across forks when their
GuardianReviewSessionReuseKeyis unchanged, but the underlying Responses request was still using the child thread ID asprompt_cache_key. That meant forked Guardian reviews that should share cache context produced different cache keys, reducing prompt cache reuse and weakening the reuse invariant.What Changed
ModelClientprompt cache key override and uses it forResponsesApiRequest.prompt_cache_key.guardian:<sha1(parent_thread_id:reuse_key)>, scoped to the parent thread plus the reuse-sensitive Guardian config.Testing
prompt_cache_key.