Add a 24-hour time-to-live check to the data cache restoration logic to prevent using stale cached data. This ensures data freshness by expiring and removing outdated cache entries before restoration. Also corrected a minor typo in the validity check comment.
Extract hardcoded priority logic into a DEAD_THRESHOLD constant and MODEL_TIERS array for better maintainability and readability. This refactoring improves code organization without altering functionality.
Switch from substring includes to regex word boundary tests for model names like opus, sonnet, and gemini variants, improving accuracy in the account manager's prioritization logic.
Improve layout and styling of dashboard filters and charts to better adapt to larger viewports, including updated flex directions, button sizes, and hover effects for lg breakpoints.
Refactor subtitle elements in accounts, dashboard, and models views to use styled badge containers with rounded backgrounds, borders, and improved typography for better visual consistency.
- Implement localStorage-based caching in data-store to restore accounts, models, and usage data on load, improving initial render performance
- Add hash-based routing in global store to sync active tab with URL, enabling browser back/forward navigation and direct linking to tabs
Add sorting functionality to the models table with clickable headers for columns like Stat, Model Identity, Global Quota, Next Reset, and Account Distribution. Includes dynamic sort icons and logic to handle ascending/descending order with appropriate defaults.
Introduce a priority-based system for selecting the main model quota, considering model tiers (e.g., opus, sonnet, pro) and availability status. This enhances accuracy by treating models with less than 1% remaining quota as "dead" for prioritization, ensuring users see the most relevant and active model in the dashboard.
Implement responsive sidebar functionality that auto-opens on desktop (≥1024px) and auto-closes on mobile, with a toggle button for mobile users. Added overlay for mobile sidebar dismissal and CSS for collapsed state on desktop. Minor adjustments to dashboard chart borders and grid layouts.
When a tool call is made, stopReason is set to 'tool_use'. However, when
finishReason: STOP arrives later, it was overwriting stopReason back to
'end_turn', breaking multi-turn tool conversations in clients like OpenCode.
Fix: Initialize stopReason to null and only set it from finishReason if
not already set. This ensures tool_use is preserved once detected.
Fixes#96
Co-Authored-By: Claude <noreply@anthropic.com>
The WebUI was generating model names like "gemini-3-flash [1m]" with a
space before the suffix, causing 404 errors when Claude Code used
sub-agents. Changed to "gemini-3-flash[1m]" (no space).
Fixes#97
Co-Authored-By: Claude <noreply@anthropic.com>
Ensure the visibility change event listener for health checks is set up only once
and properly removed on destroy to avoid memory leaks and duplicate handlers.
Implement periodic health checks every 15 seconds to monitor connection status,
pausing when the tab is hidden and resuming on visibility. Update UI bindings
to use data store for connection status instead of global store. Add destroy
method to clean up timers on component teardown.
- Replace Tailwind CDN with local build (PostCSS + autoprefixer + daisyui)
- Add CSS build scripts with automatic prepare hook on npm install
- Create account-actions.js service layer with unified response format
- Extend ErrorHandler.withLoading() for automatic loading state management
- Add skeleton screens for initial load, silent refresh for subsequent updates
- Implement loading animations for async operations (buttons, modals)
- Improve empty states and add ARIA labels for accessibility
- Abstract component styles using @apply (buttons, badges, inputs)
- Add JSDoc documentation for Dashboard modules
- Update README and CLAUDE.md with development guidelines
When all accounts fail with HTTP 500/503 errors (e.g., Google API returning
'Unknown Error' for Claude models on large conversations), the proxy now
attempts to use a fallback model if --fallback is enabled.
This enables graceful degradation when:
- All accounts are exhausted due to 5xx errors (not just rate limits)
- Claude models fail on very large conversations
- The API has temporary issues with specific models
The fallback uses the existing MODEL_FALLBACK_MAP configuration:
- claude-opus-4-5-thinking -> gemini-3-pro-high
- claude-sonnet-4-5-thinking -> gemini-3-flash
Relates to #88
- Update CLAUDE.md with comprehensive WebUI architecture and API documentation
- Improve settings UI with searchable model dropdowns and visual family indicators
- Migrate usage statistics persistence to user config directory with auto-migration
- Refactor server request handling and fix model suffix logic
- 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>
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#82
- 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 features
- Add ENABLE_EXPERIMENTAL_MCP_CLI toggle in Claude CLI settings (default: true)
- Add Gemini 1M Context Mode toggle for [1m] suffix (default: true)
- Auto-apply [1m] suffix to existing Gemini model configurations
- Add i18n translations for both features (English and Chinese)
- Add [ignore] tags around system instruction to prevent model from
identifying as "Antigravity" when asked "Who are you?"
- Replace full system instruction with minimal version used by
CLIProxyAPI/gcli2api to reduce token usage and improve response quality
Fixes#76
Co-Authored-By: Claude <noreply@anthropic.com>
Adopts issue template pattern from opencode-antigravity-auth:
- Bug report template with [BUG] prefix and 6-item checklist
- Feature request template with [FEATURE] prefix
- Config disables blank issues, adds links to Google Cloud Support, TOS, and Discussions
Co-Authored-By: Claude <noreply@anthropic.com>