CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

feat: prompt caching for grammar API + fix stale voxlen.com URLs #4758

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/improvements-20260604bmainopened Jun 4, 20260/3 tasks
ccantynzcommented Jun 4, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/voxlen/pull/43


Summary

  • Prompt caching added to landing/api/grammar.ts: splits system prompt into a stable core (cached with cache_control: {type: "ephemeral"}) and a dynamic suffix (context/vocab/style/tone). Adds anthropic-beta: prompt-caching-2024-07-31 header. Reduces latency and cost on repeated grammar correction calls.
  • Stale URL cleanup: all remaining api.voxlen.com references in comments, SDK defaults, and constants updated to voxlen.ai/api.

Test plan

  • Deploy to Vercel and confirm grammar correction still works
  • Check Anthropic usage dashboard for cache_read_input_tokens to confirm caching is active
  • Confirm SDK default base URL resolves correctly

https://claude.ai/code/session_011MFNHeFKrhfuSrEYVgrdyr


Generated by Claude Code

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 Ready Ready Preview, Comment Jun 4, 2026 6:20am

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts