GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(core): time session warming from the model's cache TTL by rekram1-node · Pull Request #60969 · anomalyco/opencode

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Oct 31, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Problem

Warming pings every model on the same fixed interval (4 minutes by default), whatever its prompt cache lifetime. That's too often for long caches and wasted on models that don't cache at all.

Change

warming.interval accepts "auto": ping at 90% of the model's cache.ttl, and skip models without one.

"warming": { "interval": "auto", "duration": "2 hours" },
"providers": { "anthropic": { "settings": { "cache": { "ttl": "1h" } } } }
interval "auto" + cache.ttl "5m"  → ping every 4.5 minutes
interval "auto" + no cache.ttl    → not warmed
interval unset / a duration       → unchanged

Additive: existing configs behave the same. Only cache.ttl you set yourself counts for now; per-model defaults can come from models.dev later. The warming docs explain "auto" and that duration must exceed the interval for long TTLs.


Added by the opencode bot (AI-generated).

Related: #53457, #43628

Public API: warming.interval accepts "auto" in addition to a duration string (backwards compatible)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rekram1-node
feat(core): time session warming from the model's cache TTL
3033e18
@github-actions github-actions Bot added the contributor label Oct 31, 2026
opencodejr[bot]
opencodejr Bot reviewed Oct 31, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend approving: "auto" works as described and existing configs behave the same.

I ran the warming plugin with a stub plugin context and a simulated clock. With a "5m" cache TTL it pings every 4.5 minutes, models without a cache.ttl are never scheduled, and a fixed interval behaves as before. On the base, "auto" fails config decoding. Config tests and the packages/core type check pass.

Public API: the warming.interval config key now accepts "auto" as well as a duration string. That change also shows up in the OpenAPI spec (anyOf the "auto" enum or a string) and in the generated client type ("auto" | (string & {})). It is backwards compatible: existing configs and callers are unaffected.

Concerns (non-blocking):

  • A long cache lifetime under the default duration silently never warms (see the inline comment).
  • The new "auto" path has no test. A small plugin test covering "TTL present" and "no TTL" with a simulated clock would cover the new behaviour.

Related: #53457, #43628

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/core/src/plugin/warming.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node
refactor(core): simplify auto warming interval and warn when it excee…
0f7ba02
…ds duration
opencodejr[bot]
opencodejr Bot reviewed Oct 31, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit addresses the earlier point: when the computed (or configured) interval isn't shorter than duration, warming is now skipped with a warning instead of failing silently. I reran the plugin with a simulated clock: "auto" behaves as before (4.5-minute pings for "5m", none without a TTL), and "1h" with the default duration now logs the warning. The same check covers fixed intervals, which never pinged before in that case either, so the warning is the only change. Config tests and the packages/core type check pass. Public API is unchanged since the last review (warming.interval accepts "auto", backwards compatible). Nothing new to flag.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rekram1-node
rekram1-node merged commit 6f2ecd2 into dev Oct 31, 2026
34 of 35 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node
rekram1-node deleted the warming-auto branch October 31, 2026 22:26
@opencodejr opencodejr Bot mentioned this pull request Oct 31, 2026
feat(core): configure session warming per provider and model #60025
Merged
@kelos-bot kelos-bot Bot mentioned this pull request Nov 1, 2026
[kanon-fake-strategist] Render hooks per agent capability and add OpenCode hook support kelos-dev/kanon#100
Open
@rekram1-node rekram1-node mentioned this pull request Nov 4, 2026
fix(core): keep one warming loop per session and ignore compaction #61724
Open
This was referenced Nov 4, 2026
Session warming misses the cache it is meant to keep, and warms providers that don't need it #61775
Open
[FEATURE]:config: no setting for prompt-cache TTL (1h) - Internals Support it #62125
Closed
@amrkmn amrkmn mentioned this pull request Nov 7, 2026
opencode 2.2.6 amrkmn/homebrew-tap#1217
Closed
1 task
This was referenced Nov 7, 2026
feat: opencode release v2.2.6 sprisa/opencode-server#84
Merged
Tool release: OpenCode 2 v2.2.6 (was v2.2.5) agent-sh/agnix#1808
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@rekram1-node
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.