GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — feat(core): configure session warming per provider and model by rekram1-node · Pull Request #60025 · anomalyco/opencode Conversation
|
| const decoded = configured === undefined ? undefined : Option.getOrUndefined(decodeWarming(configured)) | ||
| if (configured !== undefined && decoded === undefined) | ||
| yield* Effect.logWarning("invalid cache.warming setting; using the top-level warming setting", { model: ref }) | ||
| const warming = decoded ?? Config.latest(yield* config.entries(), "warming") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
When a provider or model sets an object, it replaces the top-level warming completely and the missing fields come from the built-in defaults, not from the top-level object. For example, top-level { prompt: "…", interval: "2 minutes" } plus provider { duration: "1 hour" } gives the default prompt and a 4-minute interval for that provider. If you mean the override to work field by field, merge the decoded value over the top-level object when both are objects. Otherwise it may be worth stating in the schema description that an object replaces the top-level setting.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new commit reuses the per-event resolveModel lookup that the prompt plugins already use, so the warming and prompt plugins share one catalog lookup per request. Failures and models missing from the catalog still fall back to the top-level warming. packages/core type-checks with tsc -b, and the warming config and optimize plugin tests pass (14 tests). I still haven't run warming end to end.
The public API is unchanged since my last review: this commit adds nothing beyond cache.warming and Provider.CacheWarming, which are backwards compatible.
The earlier point about partial overrides falling back to the built-in defaults instead of the top-level object isn't addressed by this commit. Nothing new to raise.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new commit addresses the partial-override point: a provider or model cache.warming object now layers over the top-level warming object, not straight over the built-in defaults. A quick check of the merge (top-level { prompt, interval: "2 minutes" } plus provider { duration: "1 hour" }) kept the custom prompt and the 2-minute interval and applied the 1-hour duration. packages/core type-checks with tsc -b, and the warming config tests pass. I haven't run warming end to end.
Public API compared with dev: adds cache.warming (boolean | { interval?, duration? }) to provider and model settings (config and Model.Info.settings), plus the Provider.CacheWarming OpenAPI component and its generated client type. Backwards compatible. Since my last review, prompt was dropped from that new type before release, so it breaks nothing.
Nothing new to raise.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
c6e234e to
39c00f9
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The rebase onto dev fits cleanly with the new "auto" interval from #60969. cache.warming is decoded with the same ConfigWarming.Warming schema as the top-level setting, so a provider or model can set interval: "auto" and it resolves from that model's cache.ttl. The partial-override merge from the previous round is still in place. packages/core type-checks with tsc -b, and the warming and normalization config tests pass. I haven't run warming end to end.
Public API compared with dev: adds cache.warming (boolean | { interval?, duration? }) to provider and model settings, plus the Provider.CacheWarming OpenAPI component and its generated client type. Backwards compatible.
One small gap worth closing: the Provider.CacheWarming interval description only mentions durations, though "auto" is accepted, and services/www/src/docs/content/warming.mdx doesn't cover per-provider or per-model cache.warming yet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The Provider.CacheWarming interval description now says that "auto" is accepted, which addresses that part of my last note. The lookup refactor doesn't change behaviour. packages/core type-checks with tsc -b, and the warming and normalization config tests pass. I haven't run warming end to end.
Public API compared with dev: adds cache.warming (boolean | { interval?: "auto" | string, duration?: string }) to provider and model settings, plus the Provider.CacheWarming OpenAPI component and its generated client type. Backwards compatible.
Nothing new to raise.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.