Stable prompt caching - Performance and cost improvements - #355
Open
TimeJunkie wants to merge 2 commits into
Open
Stable prompt caching - Performance and cost improvements#355TimeJunkie wants to merge 2 commits into
TimeJunkie wants to merge 2 commits into
Conversation
TimeJunkie
commented
Jun 25, 2026
- Moves the current date/time out of the system prompt's ## Context section (which busted the prompt cache on every request) and prepends it to the latest user message instead. ## Context now only carries the stable IANA timezone.
- Adds Anthropic ephemeral cache_control on the system prompt block and a cache breakpoint on the penultimate user turn, so accumulated conversation history is reused across requests.
- Bumps the default request timeout for OpenAI-compatible services (local llama.cpp/Ollama/LM Studio backends) from 60s to 120s — long local-context generations without token streaming were frequently timing out and retriggering a duplicate request.
- Updates schedule_task's tool description/error copy and the two affected feature docs (system-prompts.md, tasks.md) to match. They previously pointed the AI at a "Local time" context line that this change removes.
Author
|
This is directly related to same issues some others recently reported: #349 |
…er message turns so the main system prompt becomes stable. Added ephemeral caching support for anthropic. increased the default timeout only for openai compatible servive to 120s instead of default 60s. For users running a local llm server, 60s is right on cusp of quite often being insufficient causing the request to be sent again and thus causing a request and reprocess loop potentially that fails to ever process. Between the more stable prompt and this slight timeout bump should make for a much more speedier and cheaper experience for cloud api usage as well.
… user message location and documentation updated to reflect the change as well.
TimeJunkie
force-pushed
the
stable_prompt_caching
branch
from
July 9, 2026 02:10
9cbbd4e to
09720ab
Compare
|
You need to make context APPEND ONLY this is a good idea. |
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.