0.1.83: request 1-hour prompt cache (token fix), context chip above prompt box - #99
Merged
Merged
Conversation
Token cost: the app set no cache TTL, so on API-key auth Claude defaulted to the 5-minute cache. In a long conversation with minutes between turns the cache dies between turns and every turn re-bills the whole history at full input price instead of the 0.1x cache read. Set ENABLE_PROMPT_CACHING_1H=1 on Claude runs (the CLI exposes no per-request TTL flag; this env var is the only lever). Cache reads refresh the window for free, so an active session rarely pays the higher 1h write more than once. A no-op on subscription auth, where the CLI already requests 1h. UI: the context readout moves to its own row above the prompt box, right-aligned, so a long sentence being typed never runs under it. It was an in-box corner chip that overlapped the text. Bump to 0.1.83.
pathscale
force-pushed
the
fix/chip-above-and-red-dot
branch
from
August 5, 2026 01:51
1c97bf0 to
8bee371
Compare
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.
Token cost: request the 1-hour prompt cache
The app set no cache TTL, so on API-key auth Claude defaults to the 5-minute cache. In a long conversation with minutes between turns, the cache dies between turns and every turn re-bills the entire history at full input price instead of the 0.1× cache read.
Set
ENABLE_PROMPT_CACHING_1H=1on Claude runs. The CLI exposes no per-request TTL flag — this env var is the only lever (same mechanism the abstraction uses forMAX_THINKING_TOKENS). Cache reads refresh the window for free, so an active session rarely pays the higher 1h write more than once. No-op on subscription auth (the CLI already requests 1h there).Stacks on #98 (static system prompt → cacheable). Together: the history is written to cache once and read at 0.1× for up to an hour, instead of re-billed in full every turn.
UI: context chip above the prompt box
Moved from an in-box top-right corner chip (which overlapped text while typing a long line) to its own right-aligned row above the prompt box.
Verify
cargo test -p az-gui— 130 pass, fmt/clippy cleanbun run typecheck+biome checkclean,bun run test:run— 318 pass