LevelCode v0.6.0
LevelCode v0.6.0
Maintenance release focused on AI cost efficiency: prompt caching now works across every provider path, cutting redundant input-token spend on long agent runs.
Highlights
Prompt caching now actually works (all providers)
The agent loop re-sends tools + system + the entire growing transcript every turn. Previously no cache breakpoints were attached, so each turn re-paid the full input price for the whole prefix — producing input-token usage an order of magnitude above output (e.g. 21M input vs 175k output on a single run).
Two latent gaps are fixed:
- Direct Anthropic (BYOK):
systemwas sent as a plain string, so the advertisedcache_controlnever attached andcache_read_input_tokensstayed0. It's now sent as an ephemeral-cached block (caches tools + system), with acache_controlbreakpoint rolled onto the last message (caches the transcript). - OpenRouter & LevelCode Cloud gateway (OpenAI-compatible): now reads
prompt_tokens_details.cached_tokensso cache hits are visible in the context meter (split out ofprompt_tokensso the meter total stays exact), and writescache_controlbreakpoints only for Claude-family models via a newisAnthropicFamily()guard. GPT / Gemini / DeepSeek auto-cache and would ignore or reject the field.
Impact: Direct-Anthropic (BYOK) and OpenRouter benefit immediately. For the metered LevelCode Cloud gateway, the client now sends the caching hint, but the gateway proxy must forward cache_control upstream for the cache to land server-side.
Adds 4 test cases (translate.test.js) covering the breakpoints and the Claude-family gate.
Fixes
- Release tooling:
gh release delete-assetaccepts a single<tag> <asset-name>per call; the publish flow now splits it into one call per asset (each with-y) so releases aren't silently mis-dropped or blocked on an interactive prompt.
Changed files
extensions/levelcode-ai/providers/anthropic.jsextensions/levelcode-ai/providers/openaiCompat.jsextensions/levelcode-ai/providers/translate.jsextensions/levelcode-ai/test/translate.test.jsdocs/RELEASING.md
Full changelog: v0.5.0...v0.6.0