v0.108.1 — usage accounting fix
Fixed
- Cached-token double counting (upstream prism-php#1017): OpenRouter, Vertex, and Gemini reported
cacheReadInputTokenswhile leaving those tokens insidepromptTokens, overstating input for cost math. All three now follow the Anthropic/OpenAI/DeepSeek convention (promptTokens = non-cached portion, guarded at zero); Gemini also now accounts for implicit caching, not just explicitcachedContentNamecaches. Regression tests for each.
Tests
- Backfilled Mistral structured tool-loop fixture tests (both request-shape paths) and the OpenRouter parameterless-tool streaming payload test (fork issue #3).
Suite: 1874 passing, PHPStan clean.