Feature hasn't been suggested before.
Describe the enhancement you want to request
OpenAI introduced new prompt caching behavior for GPT-5.6 and later models.
We should make opencode automatically use the right GPT-5.6 cache defaults while keeping GPT-5.5 and older models on the existing behavior.
Docs: https://developers.openai.com/api/docs/guides/prompt-caching
Why
GPT-5.6 uses prompt_cache_key for more reliable cache matching and supports request-wide cache options through prompt_cache_options.
The GPT-5.6 family includes multiple model ids, such as:
gpt-5.6
gpt-5.6-sol
gpt-5.6-terra
gpt-5.6-luna
There may also be provider or suffix variants like gpt-5.6-fast, so detection should match the whole gpt-5.6* family rather than only the exact gpt-5.6 id.
Desired behavior
For GPT-5.6 family OpenAI models, opencode should send:
promptCacheOptions: {
mode: "implicit",
ttl: "30m"
}
Feature hasn't been suggested before.
Describe the enhancement you want to request
OpenAI introduced new prompt caching behavior for GPT-5.6 and later models.
We should make opencode automatically use the right GPT-5.6 cache defaults while keeping GPT-5.5 and older models on the existing behavior.
Docs: https://developers.openai.com/api/docs/guides/prompt-caching
Why
GPT-5.6 uses
prompt_cache_keyfor more reliable cache matching and supports request-wide cache options throughprompt_cache_options.The GPT-5.6 family includes multiple model ids, such as:
gpt-5.6gpt-5.6-solgpt-5.6-terragpt-5.6-lunaThere may also be provider or suffix variants like
gpt-5.6-fast, so detection should match the wholegpt-5.6*family rather than only the exactgpt-5.6id.Desired behavior
For GPT-5.6 family OpenAI models, opencode should send: