Cline v3.75.0: OpenRouter Cache Token Fix

Cline v3.75.0 fixes OpenRouter cache token tracking and replaces fragile model ID matching with prefix-based detection for automatic prompt caching support.

Cline v3.75.0: OpenRouter Cache Token Fix

TL;DR

  • Fixed cache write token tracking from OpenRouter API — was hardcoded to 0
  • Replaced fragile model ID matching with prefix-based detection for prompt caching
  • New models with anthropic/ or minimax/ prefixes now auto-enable cache control

Fixed

  • OpenRouter cache write tokens — Now reads prompt_tokens_details.cache_write_tokens from stream usage chunks instead of hardcoding to 0, and falls back to native_tokens_cache_write from generation endpoint
  • Model ID matching for cache control — Replaced hardcoded model ID switch statement with prefix-based matching (anthropic/, minimax/) so new models automatically get prompt caching enabled without code changes
  • Cache token extraction — Added unit test verifying cache write tokens are correctly extracted

Update: npm install -g @cline/cline@3.75.0 or upgrade via your package manager

Source: Cline