Files
zed/crates/openai_subscribed
Smit Barmase 3c4f6d6e90 openai_subscribed: Preserve cached prefix during compaction (#66527)
Follow-up to #64938
Part of #59528

ChatGPT subscription models now use `PreserveRequestPrefix`, so
prompt-based compaction keeps the tool definitions and sends
`tool_choice: none` instead of rebuilding the prompt, which keeps the
cached prefix.

These models already support `tool_choice: none` and go through the same
Responses request conversion as the OpenAI provider, where OpenAI
[recommends this
approach](https://developers.openai.com/api/docs/guides/prompt-caching#manage-tools-with-append-only-updates).

Tested with GPT-6.1-Sol: `/compact` went from 0 cached input tokens to
16,128 of 16,361.

Release Notes:

- Fixed compaction not reusing the prompt cache for ChatGPT subscription
models.
2026-11-04 14:02:53 +00:00
..