feat: prompt caching for grammar API + fix stale voxlen.com URLs #4758
ccantynzcommented Jun 4, 2026
Originally written by @vercel[bot] on GitHub.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| voxlen | Preview, Comment | Jun 4, 2026 6:20am |
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/voxlen/pull/43
Summary
landing/api/grammar.ts: splits system prompt into a stable core (cached withcache_control: {type: "ephemeral"}) and a dynamic suffix (context/vocab/style/tone). Addsanthropic-beta: prompt-caching-2024-07-31header. Reduces latency and cost on repeated grammar correction calls.api.voxlen.comreferences in comments, SDK defaults, and constants updated tovoxlen.ai/api.Test plan
cache_read_input_tokensto confirm caching is activehttps://claude.ai/code/session_011MFNHeFKrhfuSrEYVgrdyr
Generated by Claude Code