Replace gpt-tokenizer with model-specific official tokenizers: - Claude models: @anthropic-ai/tokenizer (official Anthropic tokenizer) - Gemini models: @lenml/tokenizer-gemini (GemmaTokenizer) Changes: - Add @anthropic-ai/tokenizer and @lenml/tokenizer-gemini dependencies - Remove gpt-tokenizer dependency - Update count-tokens.js with model-aware tokenization - Use getModelFamily() to select appropriate tokenizer - Lazy-load Gemini tokenizer (138MB) on first use - Default to local estimation for all content types (no API calls) Tested with all supported models: - claude-sonnet-4-5, claude-opus-4-5-thinking, claude-sonnet-4-5-thinking - gemini-3-flash, gemini-3-pro-low, gemini-3-pro-high
76 lines
2.6 KiB
JSON
76 lines
2.6 KiB
JSON
{
|
|
"name": "antigravity-claude-proxy",
|
|
"version": "1.2.6",
|
|
"description": "Proxy server to use Antigravity's Claude models with Claude Code CLI",
|
|
"main": "src/index.js",
|
|
"type": "module",
|
|
"bin": {
|
|
"antigravity-claude-proxy": "bin/cli.js"
|
|
},
|
|
"files": [
|
|
"src",
|
|
"bin",
|
|
"public"
|
|
],
|
|
"scripts": {
|
|
"build:css": "tailwindcss -i ./public/css/src/input.css -o ./public/css/style.css --minify",
|
|
"watch:css": "tailwindcss -i ./public/css/src/input.css -o ./public/css/style.css --watch",
|
|
"prepare": "npm run build:css",
|
|
"start": "node src/index.js",
|
|
"dev": "node --watch src/index.js",
|
|
"dev:full": "concurrently \"npm run watch:css\" \"npm run dev\"",
|
|
"accounts": "node src/cli/accounts.js",
|
|
"accounts:add": "node src/cli/accounts.js add",
|
|
"accounts:list": "node src/cli/accounts.js list",
|
|
"accounts:remove": "node src/cli/accounts.js remove",
|
|
"accounts:verify": "node src/cli/accounts.js verify",
|
|
"test": "node tests/run-all.cjs",
|
|
"test:signatures": "node tests/test-thinking-signatures.cjs",
|
|
"test:multiturn": "node tests/test-multiturn-thinking-tools.cjs",
|
|
"test:streaming": "node tests/test-multiturn-thinking-tools-streaming.cjs",
|
|
"test:interleaved": "node tests/test-interleaved-thinking.cjs",
|
|
"test:images": "node tests/test-images.cjs",
|
|
"test:caching": "node tests/test-caching-streaming.cjs",
|
|
"test:crossmodel": "node tests/test-cross-model-thinking.cjs",
|
|
"test:oauth": "node tests/test-oauth-no-browser.cjs",
|
|
"test:emptyretry": "node tests/test-empty-response-retry.cjs",
|
|
"test:sanitizer": "node tests/test-schema-sanitizer.cjs",
|
|
"test:counttokens": "node tests/test-count-tokens.cjs"
|
|
},
|
|
"keywords": [
|
|
"claude",
|
|
"anthropic",
|
|
"antigravity",
|
|
"proxy",
|
|
"vertex-ai"
|
|
],
|
|
"author": "Badri Narayanan",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/badri-s2001/antigravity-claude-proxy.git"
|
|
},
|
|
"homepage": "https://github.com/badri-s2001/antigravity-claude-proxy#readme",
|
|
"bugs": {
|
|
"url": "https://github.com/badri-s2001/antigravity-claude-proxy/issues"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
},
|
|
"dependencies": {
|
|
"@anthropic-ai/tokenizer": "^0.0.4",
|
|
"@lenml/tokenizer-gemini": "^3.7.2",
|
|
"async-mutex": "^0.5.0",
|
|
"better-sqlite3": "^12.5.0",
|
|
"cors": "^2.8.5",
|
|
"express": "^4.18.2"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/forms": "^0.5.7",
|
|
"autoprefixer": "^10.4.16",
|
|
"concurrently": "^8.2.2",
|
|
"daisyui": "^4.12.14",
|
|
"postcss": "^8.4.32",
|
|
"tailwindcss": "^3.4.0"
|
|
}
|
|
} |