Repository navigation
docs(design): the restart grace is 30 minutes on any OpenAI model - #761
Merged
Merged
Conversation
#759 gives every OpenAI request the 30-minute restart grace, for any model. docs/design.md still said "OpenAI GPT-5.6+". This fixes the wording to match the code (apply.restartGrace). Docs only. No behavior change. Refs #496 Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
amiddavid
commented
Oct 28, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.312 | offload-review skill, @amiddavid's session | fresh | 1 of 2 | 1 of 2 | 69a6ea13dc0d |
approve |
Verdict: approve
Findings
None.
Non-blocking
apply/cachelifetime.go:34— theCacheLifetimedoc comment still opens with "GPT-5.6+
defaults to a 30-minute MINIMUM". That comment is aboutCacheLifetime, not the grace, and
it stays true. No change needed.
What I checked
- The diff: one line in
docs/design.md:319. "30 minutes on OpenAI GPT-5.6+" becomes
"30 minutes on any OpenAI model". - The code the sentence describes.
restartGrace(apply/cachelifetime.go:62-70) returns
OpenAIMinimumCacheTTL— 30 minutes (internal/modelinfo/cachefrac.go:11) — for any
bschemas.OpenAIprovider, whatever the model. The comment above it (lines 51-55) states
the same rule. The old text contradicted this code; the new text matches it. - Both call sites pass the real provider to
restartGrace:apply/apply.go:552and
apply/responses.go:539(the Responses path is OpenAI-only, so its hard-coded
bschemas.OpenAIis correct there). - The other numbers in the same sentence. Non-OpenAI with an exact lifetime gets that
lifetime: 5 minutes default, 1 hour on the extended tier (extendedTTL,
apply/cachelifetime.go:24). Unknown non-OpenAI gets 5 minutes. All match the code. - No other doc repeats the old "GPT-5.6+" claim about the grace. I searched
docs/for
"grace", "restart", and "GPT-5.6". - The behavior itself came from the base commit (#759). This PR changes a doc line only,
so no test is needed and no behavior-change permission applies.
amiddavid
commented
Oct 28, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.312 | offload-review skill, @amiddavid's session | fresh | 2 of 2 | 1 of 2 | 69a6ea13dc0d |
approve |
Verdict: approve
Findings
None.
Non-blocking
docs/design.md:318still says "for that request's own cache lifetime". The grace is not
always the request's own lifetime: for a pre-GPT-5.6 OpenAI model that lifetime reads
Unknown, andrestartGracesubstitutes the 30-minute minimum
(apply/cachelifetime.go:62-65). The new parenthetical states the substituted numbers, so
the sentence is correct as a whole. No change needed.
What I checked
- The full diff: one line in
docs/design.md:319. restartGraceinapply/cachelifetime.go:62-70. For anyprovider == bschemas.OpenAIit
returnsOpenAIMinimumCacheTTL(30 minutes,internal/modelinfo/cachefrac.go:11), whatever
CacheLifetimesays about the model. The old text ("GPT-5.6+") describedCacheLifetime
(modelinfo.OpenAI30MinuteCache,internal/modelinfo/cachefrac.go:28-30), not the grace.
The new text matches the code.- Both callers pass the grace per request:
apply/apply.go:552andapply/responses.go:539. TestAnOlderOpenAIRequestGetsTheThirtyMinuteGrace(apply/tracker_restart_test.go:239)
pins the rule withgpt-5.5: 20 minutes after the start the whole prompt counts as cached
(MaxCachedIdx 924), past 31 minutes it does not. So "any OpenAI model" is the tested
behavior.- The other numbers in the same sentence: 5 minutes (Anthropic default TTL and the shortest
known lifetime for unknown retention) and 1 hour (extended tier) both hold in
apply/cachelifetime.go. - Other docs for conflicts:
docs/data-dependence.md:225states no model-specific lifetime;
the GPT-5.6+ mentions indocs/how-to/cache-keepalive.mdare about keep-alive, a different
rule. - No code changes in this PR, so no fail-open, data-dependence, or test-coverage questions
arise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
One-line docs fix after #759.
docs/design.mdsaid the restart grace is "30 minutes on OpenAI GPT-5.6+". The code gives every OpenAI model 30 minutes (apply.restartGrace). The text now says "30 minutes on any OpenAI model".What changed
docs/design.md, the cached-prefix section: one phrase.How it was tested
Docs only. I checked the sentence against
apply/cachelifetime.goon main (restartGracereturnsOpenAIMinimumCacheTTLwhen the provider is OpenAI).Data dependence
No change.
Refs #496
🤖 Generated with Claude Code