mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
* fix: resolve Claude Code token counting inefficiency and enable caching (#5104) - Remove 1.5x fudge factor from Claude Code token counting - Enable prompt caching support for all Claude Code models - Add comprehensive tests for token counting and caching - Update existing tests to reflect accurate token counting This fixes the extreme token inefficiency where simple messages would jump from ~40k to over 60k tokens, causing API hangs when approaching the artificial 120k limit. Claude Code now properly utilizes its full 200k context window with accurate token counting. * fix: address PR review comments - Extract IMAGE_TOKEN_ESTIMATE as a named constant for clarity - Update token counting tests to use exact counts instead of ranges for deterministic testing - Fix test expectations to match actual tokenizer output * Remove token counting changes, keep only cache support - Removed custom countTokens override from claude-code.ts - Deleted claude-code-token-counting.spec.ts test file - Kept cache token collection and reporting functionality - Kept supportsPromptCache: true for all Claude Code models - Kept claude-code-caching.spec.ts tests This focuses the PR on enabling cache support without modifying token counting behavior. * fix: update webview test to expect supportsPromptCache=true for Claude Code models --------- Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com> |
||
|---|---|---|
| .. | ||
| npm | ||
| src | ||
| eslint.config.mjs | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||
@roo-code/types
Publish to NPM
First authenticate with NPM:
npm login
Next, manually bump the NPM package version:
cd packages/types/npm && npm version minor && cd -
Finally, publish to NPM:
pnpm --filter @roo-code/types npm:publish
Note that you'll be asked for an MFA code to complete the publish.