Skip to content

LevelCode v0.6.0

Choose a tag to compare

@github-actions github-actions released this 16 Jul 19:58
fd81887

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): system was sent as a plain string, so the advertised cache_control never attached and cache_read_input_tokens stayed 0. It's now sent as an ephemeral-cached block (caches tools + system), with a cache_control breakpoint rolled onto the last message (caches the transcript).
  • OpenRouter & LevelCode Cloud gateway (OpenAI-compatible): now reads prompt_tokens_details.cached_tokens so cache hits are visible in the context meter (split out of prompt_tokens so the meter total stays exact), and writes cache_control breakpoints only for Claude-family models via a new isAnthropicFamily() 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-asset accepts 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.js
  • extensions/levelcode-ai/providers/openaiCompat.js
  • extensions/levelcode-ai/providers/translate.js
  • extensions/levelcode-ai/test/translate.test.js
  • docs/RELEASING.md

Full changelog: v0.5.0...v0.6.0