You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Ability to set "warming" settings on a per model and per agent basis #53457
I have verified this feature I'm about to request hasn't been suggested before.
What is missing, problem descripton
Currently in opencode v2.0.21 there is no way to set a warming setting on a per model basis. Different models have wildly differnt cache TTLs and cached input costs.
This is problematic when mixing different models for the main agent and subagents in one project.
E.g. the default cache TTL for Model A is 5min, while cached reads only cost 5%
and default cache TTL for Model B is 30min, while cached reads cost 10%
#51109 is related but not the same, since it concerns the cache TTL setting for the few model providers that support setting one. This feature request in contrast is about opencode2's native warming feature.
#41003 was already identified as related in the above feature request. It is about session warming should target sessions currently open in the client, but also explicitly mentions V2 warming is globally configured today and indicates that this feature request would be an improvement.
yes 100% will support this, maybe not this exact shape but the idea of the feature would be supported per model/provider... idk about per agent tho, maybe via plugin but feels weird cramming everything into a config file
On defaults: a ping is a cache read of the whole context and a cold resume is one cache write of it, so warming pays off for only about (write price − read price) ÷ read price pings, whatever the context size. With Anthropic's 5-minute write at 1.25x, that's about 11 pings at a 0.1x read, 24 at 0.05x and 49 at 0.025x, i.e. roughly 56 minutes, 2 hours and 4 hours at one ping every 5 minutes. So a per-model duration could default to that break-even instead of a fixed hour. I wrote this up for my fork's keep-warm here, and this table has each provider's read price and lifetime.
Thanks for the detailed request, @kwinz! To restate it: you'd like warming settings (enabled, interval, duration) to be overridable per agent, per model and per provider, with precedence agent > model > provider > global. That way models with different cache TTLs and cached-read prices can each get a suitable keep-alive schedule.
Right now warming is a single global or project-level setting, applied the same way to every top-level session. Subagent sessions (child sessions) aren't kept warm at all right now, which affects your main-agent/subagent setup.
Activity
github-actions commentedon Oct 6, 2026
This issue might be a duplicate of existing issues. Please check:
kwinz commentedon Oct 6, 2026
#51109 is related but not the same, since it concerns the cache TTL setting for the few model providers that support setting one. This feature request in contrast is about
opencode2's native warming feature.#41003 was already identified as related in the above feature request. It is about session warming should target sessions currently open in the client, but also explicitly mentions V2 warming is globally configured today and indicates that this feature request would be an improvement.
rekram1-node commentedon Oct 9, 2026
yes 100% will support this, maybe not this exact shape but the idea of the feature would be supported per model/provider... idk about per agent tho, maybe via plugin but feels weird cramming everything into a config file
bhagirathsinh-vaghela commentedon Oct 11, 2026
On defaults: a ping is a cache read of the whole context and a cold resume is one cache write of it, so warming pays off for only about (write price − read price) ÷ read price pings, whatever the context size. With Anthropic's 5-minute write at 1.25x, that's about 11 pings at a 0.1x read, 24 at 0.05x and 49 at 0.025x, i.e. roughly 56 minutes, 2 hours and 4 hours at one ping every 5 minutes. So a per-model
durationcould default to that break-even instead of a fixed hour. I wrote this up for my fork's keep-warm here, and this table has each provider's read price and lifetime.opencodejr commentedon Oct 27, 2026
Thanks for the detailed request, @kwinz! To restate it: you'd like
warmingsettings (enabled, interval, duration) to be overridable per agent, per model and per provider, with precedence agent > model > provider > global. That way models with different cache TTLs and cached-read prices can each get a suitable keep-alive schedule.Right now
warmingis a single global or project-level setting, applied the same way to every top-level session. Subagent sessions (child sessions) aren't kept warm at all right now, which affects your main-agent/subagent setup.Maintainers will consider this. Related issues:
rekram1-node commentedon Nov 1, 2026
You can configure it per model/provider in next release, for now leaving off the agent configs, a little more awkward there