GeminiRevolver/package.json
tyuXX 4434d308d6 feat(revolver): add model circuit breaker and zero-tolerance 503 fast-failover
- Implement ModelCircuitBreaker to track (provider, model) overload states independently of API keys
- Skip remaining keys in active tier immediately on 503 Service Unavailable / High Demand
- Protect key quotas by preventing 503 errors from marking keys as rate-limited
- Add 15s streaming TTFT timeout and reduce candidate timeout to 20s
- Add Model Circuit Breaker live telemetry and manual reset in Admin Console
- Add comprehensive automated test suite for circuit breaker and failover cascades
2026-11-04 20:44:57 +00:00

29 lines
1.1 KiB
JSON

{
"name": "gemini-revolver",
"version": "1.0.0",
"description": "OpenAI v1 compatible API endpoint for Gemini API key rotation",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"start": "node dist/index.js",
"dev": "ts-node src/index.ts",
"watch": "tsc --watch",
"test": "API_PASSWORD=test_password ts-node test-revolver.ts && API_PASSWORD=test_password ts-node test-integration.ts && API_PASSWORD=test_password ts-node test-timeout-keepalive.ts && API_PASSWORD=test_password ts-node test-live-watcher.ts && API_PASSWORD=test_password ts-node test-telemetry-fallback.ts && API_PASSWORD=test_password ts-node test-circuit-breaker-fallback.ts"
},
"keywords": ["openai", "gemini", "api", "rotation"],
"author": "",
"license": "MIT",
"dependencies": {
"@google/generative-ai": "^0.21.0",
"express": "^4.18.2",
"cors": "^2.8.5",
"dotenv": "^16.3.1"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/cors": "^2.8.17",
"@types/node": "^20.10.0",
"typescript": "^5.3.3",
"ts-node": "^10.9.2"
}
}