Repository navigation
Conversation
Contributor
Author
|
Closed by: #117 |
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.
What was changed
Opt-in. When a user message opens a turn after the session was idle longer than the prompt cache lifetime, thinking blocks of earlier turns are no longer replayed. The cache has expired by then, so no cached prefix is lost, and the rewrite and later reads are smaller by those blocks. Off by default. Only drivers that replay
thinking_blocks(Claude, Bedrock) are affected.Usage
Agent or trait:
Model card, first route:
A boolean on the agent wins over the card, so
drop_expired_thinking: falseswitches it off for one agent.Behaviour
prompt_cache.ttl, else the card route'soptions.cache_ttl, else5m, plus 60 s. Known values:5m,1h. If the provider reportstokens.cache_write_by_ttl, the longer lifetime applies; an unknown reported lifetime expires nothing.metadata.expires_thinkingbefore the first request of the turn. The prompt builder omitsthinking_blocksof assistant rows before the newest effective mark, so later requests extend the first one.metagainsmodel_step_atandmodel_cache_ttl.message_handlersnow importswippy.llm:llm(card lookup throughllm.resolve_model).