fix(codex): bound prompt cache keys - #26468
Conversation
|
Likely duplicate of #24273 — both fix Codex transport |
|
The main difference here is that this PR preserves a readable prefix and appends a short hash, rather than replacing the entire value with a full SHA256 digest. That keeps the key within OpenAI’s 64-char limit while preserving some operator/debug value in logs and traces. For example, a long cron/session ID still shows the job/session family prefix, with the hash suffix preventing collisions. I’m fine closing this in favor of #24273 if maintainers prefer the older PR. |
|
Thanks for the focused cache-key fix. This is an automated hermes-sweeper review: current
The current implementation both stays within the provider limit and avoids cache-cold recurring cron runs. |
Summary
prompt_cache_keyvalues within the provider's 64-character limit.Test Plan
python -m pytest tests/agent/transports/test_codex_transport.py -qpython -m py_compile agent/transports/codex.pygit diff --checkPlatforms Tested
Related / competing PRs
agent/transports/codex.pyor bound the OpenAIprompt_cache_keybody field.prompt_cache_key length,prompt_cache_key Responses, andprompt_cache_key; found no open or merged PR specifically fixing the 64-character limit failure.Notes/Risks