Spaces:
Running
Running
Commit History
-
Resolve merge conflicts by accepting remote/local versions
5d2834c
-
Initial Commit
d613519
-
chore: update claude-sonnet-4-5 model references to claude-sonnet-4-6 (#305)
Unverified signatureUpdate all model name references from claude-sonnet-4-5 to claude-sonnet-4-6 across configuration, documentation, tests, and UI code. Files updated: - CLAUDE.md - README.md - docs/models.md - docs/openclaw.md - public/js/data-store.js - src/constants.js - tests/test-streaming-whitespace.cjsc1ef906
-
feat: Implement intelligent Antigravity version detection and dynamic User-Agent generation with platform-specific logic and tests.
f7b1814
-
Revert "feat(fingerprint): add persistent device fingerprinting system"
This reverts commit 3915c947bf8840def34fb50e3e5a403a0d00b776.b785611 -
Revert "fix(fingerprint): refine history management and prevent data leakage"
This reverts commit 66805bed57666dcb58840d4e1aa5e3bc837f90c2.7ffc3e3 -
fix: add process.exit(0) to 403 test suites to prevent hang
ESM dynamic imports keep event loop handles alive, preventing clean exit from CJS test runners. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>774380c -
fix: 403 VALIDATION_REQUIRED triggers account rotation (#248)
Badri Narayanan SUnverified signature- Detect VALIDATION_REQUIRED/ACCOUNT_DISABLED/USER_DISABLED in 403 errors - Mark account invalid with verifyUrl and rotate to next account - Parse structured JSON details[].metadata.validation_url - Persist verifyUrl to disk across server restarts - WebUI FIX button opens verification URL directly - Prevent infinite loop when all accounts are invalid (isAllAccountsInvalid guard) - 68 tests (45 unit + 23 integration)65d1e22 -
fix(fingerprint): refine history management and prevent data leakage
- Prevent `fingerprint` object leakage in `getStatus` and `/account-limits` (expose `hasFingerprint` boolean instead) - Fix `restoreFingerprint` to correctly remove restored entries from history - Improve `updateFingerprintVersion` regex to support non-numeric/beta versions - Initialize new accounts with a generated fingerprint in storage - Add comprehensive tests for history restoration and version parsing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>373d0b8 -
feat(fingerprint): add persistent device fingerprinting system
- Implement robust device fingerprint generation (Device ID, User Agent, API Client) - Add fingerprint persistence to AccountManager (stored in accounts.json) - Integrate fingerprint headers into all API requests for stable identity - Add WebUI support: - New Fingerprint Modal with advanced details (Session Token, Quota User) - Manual regeneration with history support (undo/restore) - Polished UI with collapsible metadata details - Fix CLI account management bug that stripped fingerprint data - Add comprehensive test suite covering generation, persistence, and CLI compatibility - Add documentation in docs/fingerprinting.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>15c4643
-
fix: handle thinking-only responses in stress test
Count responses with thinking content (but no text) as successful, and validate actual response status instead of hardcoding 200. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>6e15d33
-
fix: strip cache_control fields from content blocks (#189)
Claude Code CLI sends cache_control on text, thinking, tool_use, and tool_result blocks for prompt caching. Cloud Code API rejects these with "Extra inputs are not permitted". - Add cleanCacheControl() to proactively strip cache_control at pipeline entry - Add sanitizeTextBlock() and sanitizeToolUseBlock() for defense-in-depth - Update reorderAssistantContent() to use block sanitizers - Add test-cache-control.cjs with multi-model test coverage - Update frontend dashboard tests to match current UI design - Update strategy tests to match v2.4.0 fallback behavior - Update CLAUDE.md and README.md with recent features Inspired by Antigravity-Manager's clean_cache_control_from_messages() pattern. Co-Authored-By: Claude <noreply@anthropic.com>26ecbc1 -
test: split stress test into streaming and non-streaming variants
- Rename stress-test.cjs to stress-test-normal.cjs (non-streaming) - Add stress-test-streaming.cjs for SSE streaming tests - Both tests verify rate limit handling under concurrent load Co-Authored-By: Claude <noreply@anthropic.com>a41daf4 -
feat: comprehensive rate limit handling overhaul (inspired by opencode-antigravity-auth)
This commit addresses "Max retries exceeded" errors during stress testing where all accounts would become exhausted simultaneously due to short per-second rate limits triggering cascading failures. ## Rate Limit Parser (`rate-limit-parser.js`) - Remove 2s buffer enforcement that caused cascading failures when API returned short reset times (200-600ms). Now adds 200ms buffer for sub-500ms resets - Add `parseRateLimitReason()` for smart backoff based on error type: QUOTA_EXHAUSTED, RATE_LIMIT_EXCEEDED, MODEL_CAPACITY_EXHAUSTED, SERVER_ERROR ## Message/Streaming Handlers - Add per-account+model rate limit state tracking with exponential backoff - For short rate limits (< 1 second), wait and retry on same account instead of switching - prevents thundering herd when all accounts hit per-second limits - Add throttle wait support for fallback modes (emergency/lastResort) - Add `calculateSmartBackoff()` with progressive tiers by error type ## HybridStrategy (`hybrid-strategy.js`) - Re…cc10136
-
fix(tests): update frontend account tests to match current HTML structure
- Update column names from identity/projectId to accountEmail/source/tier - Change deleteAccount to confirmDeleteAccount (uses confirmation modal) - Fix modal tests to check index.html instead of accounts.html partial Co-Authored-By: Claude <noreply@anthropic.com>c028783 -
feat: Add manual OAuth authorization mode for WebUI (#131)
Unverified signature* feat: add manual OAuth flow support in WebUI * fix: reset add account modal state on close * feat: display custom API key in startup banner * fix: move translations to separate files and optimize import API * fix: remove orphaned model-manager.js and cleanup callback server on manual auth --------- Co-authored-by: Badri Narayanan S <59133612+badrisnarayanan@users.noreply.github.com>d4ffbc6
-
feat(strategy): add quota-awareness to hybrid account selection
jgor20The hybrid strategy now considers account quota levels when selecting accounts, preventing any single account from being drained to 0%. - Add QuotaTracker class to track per-account quota levels - Exclude accounts with critical quota (<5%) from selection - Add quota component to scoring formula (weight: 3) - Fall back to critical accounts when no alternatives exist - Add 18 new tests for quota-aware selection Scoring formula: Health×2 + Tokens×5 + Quota×3 + LRU×0.1 An attempt at resolving badrisnarayanan/antigravity-claude-proxy#17195f52b5
-
feat: add configurable account selection strategies
Refactor account selection into a strategy pattern with three options: - Sticky: cache-optimized, stays on same account until rate-limited - Round-robin: load-balanced, rotates every request - Hybrid (default): smart distribution using health scores, token buckets, and LRU The hybrid strategy uses multiple signals for optimal account selection: health tracking for reliability, client-side token buckets for rate limiting, and LRU freshness to prefer rested accounts. Includes WebUI settings for strategy selection and unit tests. Co-Authored-By: Claude <noreply@anthropic.com>861853f -
fix: preserve whitespace-only chunks in SSE stream (#139)
Unverified signature* fix: preserve whitespace-only chunks in SSE stream Fixes issue #138 where Claude models would swallow spaces between words because whitespace-only chunks (e.g., " ") were being filtered out as empty. Changes: - Modified sse-streamer.js to only skip truly empty strings (""), preserving strings that contain only whitespace. - Added regression test case in tests/test-streaming-whitespace.cjs to verify whitespace preservation. * test: add streaming whitespace regression test to main suite --------- Co-authored-by: walczak <walczak@ial.ruhr>2d48c88
-
revert: remove count_tokens endpoint (caused regression)
Co-Authored-By: Claude <noreply@anthropic.com>6cd929a -
refactor: use test-models helper for count tokens test
Replace hardcoded model IDs with centralized TEST_MODELS from constants. Co-Authored-By: Claude <noreply@anthropic.com>cbe911f -
fix: handle unsigned thinking blocks in tool loops (#120)
When Claude Code strips thinking signatures it doesn't recognize, the proxy would drop unsigned thinking blocks, causing the error "Expected thinking but found text". This fix detects unsigned thinking blocks and triggers recovery to close the tool loop. Co-Authored-By: Claude <noreply@anthropic.com>d5e7968 -
docs: fix misleading tokenizer comments
behemoth-phucnm3b8ea23 -
test: add count tokens endpoint test suite
Add comprehensive test suite for /v1/messages/count_tokens endpoint: - Simple text messages - Multi-turn conversations - System prompts (string and array format) - Tool definitions and tool use/result blocks - Thinking blocks - Content arrays with text blocks - Error handling for invalid requests - Long text tokenization Also adds npm script test:counttokens for running tests individually.4c53809
-
refactor: centralize TEST_MODELS and DEFAULT_PRESETS in constants.js
- Move TEST_MODELS and DEFAULT_PRESETS to src/constants.js as single source of truth - Update test-models.cjs helper to use dynamic import from constants - Make getTestModels() and getModels() async functions - Update all test files to await async model config loading - Remove duplicate THINKING_MODELS and getThinkingModels() from test helper - Make thinking tests more lenient for Gemini (doesn't always produce thinking blocks) Co-Authored-By: Claude <noreply@anthropic.com>93c82be
-
feat(webui): add configuration presets for Claude CLI
- Add backend storage logic in `src/utils/claude-config.js` to save/load/delete presets - Add API endpoints (`GET`, `POST`, `DELETE`) for presets in `src/webui/index.js` - Update `public/views/settings.html` with new Presets UI card and modals - Update `public/js/components/claude-config.js` with auto-load logic and unsaved changes protection - Add translations (EN/ZH) for new UI elements in `public/js/store.js` - Add integration tests in `tests/frontend/test-frontend-settings.cjs` - Update compiled CSS Co-Authored-By: Claude <noreply@anthropic.com>3db77c4
-
Merge branch 'main' into feature/webui
Wha1eChaiUnverified signatureda590b3 -
add schema sanitizer to test suite, fix interleaved thinking test
- Add test-schema-sanitizer.cjs to run-all.cjs test runner - Add test:sanitizer npm script for running it individually - Update test to use renamed cleanSchema function - Fix interleaved thinking test to not require thinking blocks after tool result (model decides when to use visible thinking) Co-Authored-By: Claude <noreply@anthropic.com>41c033f -
fix: convert schema types to Google uppercase format (fixes #82)
The /compact command was failing with 'Proto field is not repeating, cannot start list' error for Claude models because tool schemas were sent with lowercase JSON Schema types (array, object, string) but Google's Cloud Code API expects uppercase protobuf types (ARRAY, OBJECT, STRING). Changes: - Add toGoogleType() function to convert JSON Schema types to Google format - Add Phase 5 to cleanSchemaForGemini() for type conversion - Apply cleanSchemaForGemini() for ALL models (not just Gemini) since all requests go through Cloud Code API which validates schema format - Add comprehensive test suite with 10 tests covering nested arrays, complex schemas, and real-world Claude Code tool scenarios Fixes #827b5d49f -
feat(dashboard): comprehensive filter enhancement and UI layout fixes
- Add time range selector (1H/6H/24H/7D/All) with preference persistence - Implement smart X-axis label formatting for multi-day usage data - Standardize global component spacing and fix CSS @apply limitations - Add elegant empty state UI for charts when filtered data is absent - Update i18n translations for all new dashboard featuresb738b89 -
merge: integrate upstream/main (v1.2.15) into feature/webui
- Resolved conflict in src/constants.js: kept config-driven approach - Adopted upstream 10-second cooldown default - Added MAX_EMPTY_RESPONSE_RETRIES constant from upstream - Incorporated new test files and GitHub issue templates629246c
-
chore: add empty response retry test and fix flaky tests
- Add test:emptyretry script and include in test suite - Fix test-interleaved-thinking: use complex prompt to force thinking - Fix test-multiturn-thinking-tools: make Turn 2 lenient (thinking optional) - Fix test-multiturn-thinking-tools-streaming: same lenient approach - Use TEST_MODELS helper instead of hardcoded model ID Models may skip thinking on obvious next steps - this is valid behavior. Tests now only require thinking on first turn to verify signatures work. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>dbf109e
-
test: add empty response retry test
BrunoMarc +1: Claude Opus 4.5Adds comprehensive test for the empty response retry mechanism: - Verifies EmptyResponseError class exists and works correctly - Tests basic requests still work (no regression) - Validates error class behavior and detection All tests pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>6db8499
-
added cross model thinking to npm run test tests
65d336c
-
feat: Add Web UI for account and quota management
## Summary Add an optional Web UI for managing accounts and monitoring quotas. WebUI is implemented as a modular plugin with minimal changes to server.js (only 5 lines added). ## New Features - Dashboard: Real-time model quota visualization with Chart.js - Accounts: OAuth-based account management (add/enable/disable/refresh/remove) - Logs: Live server log streaming via SSE with search and level filtering - Settings: System configuration with 4 tabs - Interface: Language (EN/zh_CN), polling interval, log buffer size, display options - Claude CLI: Proxy connection config, model selection, alias overrides (~/.claude.json) - Models: Model visibility and ordering management - Server Info: Runtime info and account config reload ## Technical Changes - Add src/webui/index.js as modular plugin (all WebUI routes encapsulated) - Add src/config.js for centralized configuration (~/.config/antigravity-proxy/config.json) - Add authMiddleware for optional password protection (WEBUI_PASSWORD …671903d -
fix: correct state destructuring and document headless mode
- Fix extractCodeFromInput destructuring: returns { code, state } not { code, extractedState }, so state validation was being bypassed - Add --no-browser hint to CLI banner for discoverability - Document --no-browser mode in README.md and CLAUDE.md - Add test:oauth script to package.json - Add OAuth test to run-all.cjs test suite 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>c9fce19 -
feat: add --no-browser OAuth mode for headless servers
Caixiaopig## Feature Description Enables adding Google accounts on remote servers without a desktop environment (headless Linux, Docker containers, SSH sessions) where automatic browser opening is not possible. Users can manually copy the authorization URL to a device with a browser, complete authentication, and paste the authorization code back. ## Usage npm run accounts:add -- --no-browser ## Code Architecture ### New Modules 1. oauth.js - extractCodeFromInput() - Parses user input (full callback URL or raw authorization code) - Extracts code and state parameters - Handles OAuth error responses 2. accounts.js - addAccountNoBrowser() - Account addition flow for no-browser mode - Displays authorization URL for manual copying - Waits for user to paste authorization code - Calls extractCodeFromInput to parse input - Completes OAuth flow and saves account 3. tests/test-oauth-no-browser.cjs - 13 unit tests covering valid URLs, raw codes, error handling, edge cases …54b5f70
-
Signature handling for fallback
e7a0e87
-
Added support for Gemini models
6df4ec8 -
removing restcting of available models, fixing max tokens issues in test
93a9127
-
feat: add prompt caching, sticky account selection, and non-thinking model
- Implement sticky account selection for prompt cache continuity - Derive stable session ID from first user message (SHA256 hash) - Return cache_read_input_tokens in usage metadata - Add claude-sonnet-4-5 model without thinking - Remove DEFAULT_THINKING_BUDGET (let API use its default) - Add prompt caching test - Update README and CLAUDE.md documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>d914323
-
refactor: centralize constants, add error classes, and DRY test utilities
- Create src/errors.js with custom error classes (RateLimitError, AuthError, ApiError, etc.) - Create src/utils/helpers.js with shared utilities (formatDuration, sleep) - Create tests/helpers/http-client.cjs with shared test utilities (~250 lines deduped) - Centralize OAuth config and other constants in src/constants.js - Add JSDoc types to all major exported functions - Refactor all test files to use shared http-client utilities - Update CLAUDE.md with new architecture documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>bc9d752
-
code cleanup and test fix
11886d1
-
initial commit
f4bec9b