-
Notifications
You must be signed in to change notification settings - Fork 149
release:v0.5.1 #655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release:v0.5.1 #655
Conversation
…#635) When upgrading from older versions, existing providers were incorrectly grouped under "Unknown Vendor #0" instead of being auto-aggregated by their website domain. Changes: - Add backfillProviderVendorsFromProviders() to auto-create vendors from provider URLs during startup - Add deriveDisplayNameFromDomain() to generate display names from domains - Integrate vendor backfill into instrumentation.ts startup flow - Fix providerVendorId type to allow null (Schema, Type, Transformer) - Add vendorId=-1 protection for orphaned providers in frontend - Add i18n keys for orphanedProviders in 5 languages The backfill runs idempotently on startup, processing providers with null or 0 vendorId, extracting domains from websiteUrl (preferred) or url, and creating/associating vendors accordingly.
…ering (#636) * fix(providers): auto-backfill vendor aggregation for legacy providers When upgrading from older versions, existing providers were incorrectly grouped under "Unknown Vendor #0" instead of being auto-aggregated by their website domain. Changes: - Add backfillProviderVendorsFromProviders() to auto-create vendors from provider URLs during startup - Add deriveDisplayNameFromDomain() to generate display names from domains - Integrate vendor backfill into instrumentation.ts startup flow - Fix providerVendorId type to allow null (Schema, Type, Transformer) - Add vendorId=-1 protection for orphaned providers in frontend - Add i18n keys for orphanedProviders in 5 languages The backfill runs idempotently on startup, processing providers with null or 0 vendorId, extracting domains from websiteUrl (preferred) or url, and creating/associating vendors accordingly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(probe): remove success log filtering to enable latency curve rendering Problem: - Endpoint probe scheduler runs correctly every 10s - But successful probes were filtered by 60s sampling threshold - ~5/6 success probes not recorded to history table - Frontend latency curve could not be rendered Solution: - Remove shouldLogScheduledSuccess() filtering function - Remove SUCCESS_LOG_MIN_INTERVAL_MS constant - Always call recordProviderEndpointProbeResult() for all probes - Change default retention from 7 days to 1 day (storage: ~40MB/day) - Update .env.example to reflect new behavior
* refactor(providers): modular provider form with vertical scroll navigation - Refactor monolithic provider-form.tsx into modular architecture - Implement vertical scroll navigation replacing tab switching - Remove deprecated provider types: claude-auth, gemini-cli - Make openai-compatible permanently available (no feature flag) - Add framer-motion for smooth animations - Remove asterisks from i18n labels (SmartInputWrapper handles required markers) - Update provider types in vendor view and keys list - Add sections i18n for new form structure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: format code (feat-provider-form-refactor-6bc06d5) * feat(dashboard): add bento grid layout with glassmorphism design - Add BentoGrid and BentoCard components with subtle glass morphism styling - Add BentoMetricCard with icon, trend badge, and comparison data support - Add LeaderboardCard with progress bars for user/provider/model rankings - Add LiveSessionsPanel for real-time session monitoring - Add StatisticsChartCard with time range selector and user filtering - Support light/dark mode with appropriate contrast - Reduce shadow intensity for cleaner visual design Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(dashboard): add comparison metrics and RPM to bento cards Add yesterday same-period comparison data for dashboard metric cards: - Concurrent sessions shows real-time RPM (requests per minute) - Today requests/cost/response time compare vs yesterday same period - Support user-scoped data for non-admin users when global view disabled - Add i18n translations for rpm and vsYesterday labels (5 languages) - Include dashboard page and metric card updates Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(settings): enhance UI with new components and translations - Add new translation keys for notification and client version stats - Implement page transition animations and responsive layout improvements - Update form components with consistent styling and accessibility - Add icon support to settings sections and navigation items - Improve table skeletons and loading states - Refactor notification cards and webhook targets section - Optimize provider form layout and validation * chore: format code (feat-provider-form-refactor-6e7e96e) * style(ui): update component styling to use consistent muted colors replace dark mode specific background and border colors with theme-aware muted variants to improve consistency and maintainability across the application * feat(providers): improve form handling and translations - Add new labelEdit translations for API key field in edit mode - Update icon size in section card component - Refactor provider form to handle URL resolution and key updates more cleanly - Reset form state after successful submission * refactor(provider-form): simplify form data handling and remove unused imports Clean up form data construction logic by separating base fields from conditional ones Remove unused Label import and urlResolver prop Improve tab navigation mapping by removing unused index parameter * refactor(provider-form): clean up unused imports and variables Remove unused imports from provider-form-types.ts Rename unused displayValue to _displayValue in network-section Remove unused TAB_CONFIG import and rename unused scrollTop to _scrollTop in index.tsx * feat(dashboard): improve bento grid components - Add dynamic height calculation for live sessions panel - Make BentoCard accept refs with forwardRef - Add select/deselect all buttons to statistics chart - Allow non-percentage values in metric card comparisons * feat(endpoint-latency): add tooltip and average latency display to sparkline Add interactive tooltip showing latency values on hover and display average latency for the last 5 minutes * style(settings): remove unnecessary line breaks in sparkline component * fix(metric-card): use spread operator for comparison props * feat(providers): add batch edit and quick paste features - Implement batch edit functionality for providers including selection, edit, delete and circuit reset - Add quick paste feature to extract provider info from clipboard text - Introduce multi-select mode with toolbar and action buttons - Create batch edit dialog with field toggles and confirmation - Add clipboard utils and provider text parser for quick paste - Include translations for new features in multiple languages - Add unit tests for provider text parsing logic * feat(providers): add quick paste feature and batch operations tests add quick paste translations for multiple languages implement comprehensive unit tests for provider batch operations * chore: format code (feat-provider-form-refactor-f37e60e) * feat(i18n): add missing translations for session status and loading states - Add loading and unknownUser translations for active sessions panel - Add status translations (running, init, idle, error, done) for all supported languages - Update LiveSessionsPanel to use translated status labels - Add keyboard navigation support to BentoCard components - Fix animation cleanup in MetricCard component - Add Tooltip mock to sparkline test --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix user rate limit enforcement * chore: format code (fix-rate-limit-user-limits-d46e1e6) * Fix i18n errors and user limit parsing * chore: format code (fix-rate-limit-user-limits-fd82bf6) * fix: resolve TypeScript type conversion error in transformers test (#645) Fixed TypeScript error TS2352 by adding intermediate 'unknown' cast when converting User type to Record<string, unknown> for dynamic field access in test assertions. Error: Conversion of type 'User' to type 'Record<string, unknown>' may be a mistake because neither type sufficiently overlaps with the other. Solution: Added intermediate cast to 'unknown' as suggested by TypeScript compiler.
…k settings - Add availability dashboard i18n keys for overview, provider, and endpoint sections - Add network section translations for provider form (proxy settings) - Update customs and dashboard translations for all 5 languages (en, ja, ru, zh-CN, zh-TW) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…miting - Add isSSLCertificateError() function to detect SSL/TLS errors (hostname mismatch, expired certs, self-signed) - Limit endpoint candidates to maxRetryAttempts to prevent excessive retries - Use Agent Pool for cached HTTP/2 connections to prevent memory leaks - Track directConnectionCacheKey for SSL error handling - Add unit tests for SSL error detection and retry limit logic Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…rectifier - Add detection for "signature: Extra inputs are not permitted" error - Support third-party API channels that don't accept signature field - Reuse existing rectifier logic for consistency - Add unit tests for extra signature field detection Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ilities - Add SessionTracker.getConcurrentCountBatch() for efficient N+1 query avoidance - Add concurrentCount field to ActiveSessionInfo type - Create session-status.ts with status calculation utilities - Update active-sessions action to support batch queries - Add unit tests for session status calculation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add AgentPool class for centralized agent lifecycle management - Implement LRU-style eviction with configurable TTL and max size - Support health tracking for detecting SSL certificate errors - Add cache key generation based on endpoint + proxy + http2 config - Re-export pool utilities from proxy-agent.ts - Add comprehensive unit tests for agent pool behavior Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…mponents - Add AvailabilityDashboard main component with tab navigation - Create overview section with GaugeCard for metrics visualization - Add provider tab with ConfidenceBadge, LaneChart, LatencyChart - Add endpoint tab with LatencyCurve, ProbeGrid, ProbeTerminal - Implement shared components: FloatingProbeButton, TimeRangeSelector - Improve AvailabilitySkeleton with realistic loading states - Add comprehensive unit tests for all new components Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Optimize LiveSessionsPanel component structure - Add dynamic item rendering with better state management - Update DashboardBento integration - Add unit tests for dynamic item behavior Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix chart component tooltip styling - Enhance tag-input with better keyboard navigation - Update network-section form styling consistency Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… path Remove erroneous cacheMisses-- in pending wait branch. The waiter request never incremented cacheMisses (it exits early at pending check), so decrementing would subtract from a different request's miss count, violating the invariant: totalRequests === cacheHits + cacheMisses Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix duplicate JSON keys in ru/zh-TW dashboard.json (availability.timeRange, laneChart, etc.) - Fix tag-input.tsx scroll offset bug: use viewport coords for fixed positioning - Fix agent-pool.ts credential exposure: only use proxy origin in cache key - Add missing type="button" to shared availability components Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change status labels: ERROR->FAIL, IN_PROGRESS->BUSY, INITIALIZING->INIT - Add status column to active-sessions-table with visual indicators - Maintain consistent styling between live-sessions-panel and sessions table Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(my-usage): UI improvements for My Usage page - Remove bold font from model name in usage logs table - Rename "Quota Usage" to "Quota User Usage" - Rename "Statistics Summary" to "Key Statistics" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(i18n): replace hardcoded zh-CN locale with dynamic locale in dashboard charts - Use useLocale() from next-intl to get current locale - Replace hardcoded "zh-CN" in toLocaleTimeString/toLocaleDateString/toLocaleString - Move chartConfig inside component to use translated label - Add locale to useMemo dependencies where needed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(i18n): translate database connection unavailable error message - Add connectionUnavailable key to all 5 language files - Use translated message in database-status.tsx when isAvailable is false - Handle both HTTP 503 errors and status.error from API response Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(provider-test): use configured proxy for model testing Previously, the provider model test ignored the configured proxy URL and always made direct connections. Now the test respects proxyUrl setting by creating a dispatcher via createProxyAgentForProvider. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(i18n): add batchEdit translations and update group field description - Add providersBatchEdit import to all 5 locale index.ts files - Update provider group field description to mention select/create behavior Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ui): improve MCP passthrough select and raw response display - Fix MCP passthrough select to show translated label instead of value - Fix raw response overflow with break-all and overflow-x-hidden Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ui): adjust logs table column widths for better user visibility Shrink Time column (flex 0.8→0.6, min-width 80→56px) and expand User column (flex 0.6→0.8) to show more of the username. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(ui): add color indicators for cache hit rate in leaderboard Apply color coding to cache hit rate column: green (>=85%), yellow (60-84%), orange (<60%) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(ui): enhance user key statistics modal with token details - Add token statistics (input, output, cache creation, cache read) to SQL queries - Redesign key stats dialog with summary cards and compact model rows - Add cache hit rate indicator per model with color coding - Fix user limit refresh by clearing usage cache on refresh button click - Add i18n translations for new modal fields (5 languages) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ui): improve group tooltip formatting in dashboard users Add header and bullet list styling to group tooltips for consistency with request-filters tooltip design. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(ui): add expiry countdown badge for user mode in dashboard - Show compact badge with clock icon and days remaining when <= 7 days - Display tooltip with full localized text on hover - Rename column header from "Edit" to "Status" in user mode - Add i18n support for all 5 languages (en, zh-CN, zh-TW, ja, ru) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * perf(ui): memoize chartConfig and daysLeft calculations - Wrap chartConfig in useMemo to prevent recreation on every render - Wrap daysLeft calculation in useMemo with localExpiresAt dependency Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: address PR review feedback - Move proxy creation into try/catch block (test-service.ts) - Check 503 status before parsing JSON (database-status.tsx) - Fix English grammar "User Quota Usage" (myUsage.json) - Return null for expired keys in getDaysLeft (user-key-table-row.tsx) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: John Doe <johndoe@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Only display users with non-zero usage (cost > 0 or calls > 0) in the user legend below the statistics chart. This improves readability by hiding inactive users while preserving color consistency through original index tracking. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Non-network errors (PROVIDER_ERROR): keep same endpoint on retry - Network errors (SYSTEM_ERROR): switch to next lowest-latency endpoint - Endpoint exhaustion: stay at last endpoint without wrap-around - Scope: single request only, no cross-request stickiness Introduced `currentEndpointIndex` variable to track endpoint independently from `attemptCount`. Only network errors (SYSTEM_ERROR) advance the index; HTTP errors (PROVIDER_ERROR) keep the same endpoint for retry.
…rapper on OKLCH variables The chart CSS variables (--chart-*, --destructive, --background) are defined in OKLCH format in globals.css, but the latency charts wrapped them with hsl() causing color parsing to fail. This fix uses var(--chart-*) directly in ChartConfig and var(--color-<key>) for stroke/fill, matching the pattern used by other working charts. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ls (#654) * feat(dashboard): enhance logs UI with modular filters and error details - Refactor error-details-dialog into modular tab-based components: - SummaryTab: key metrics overview with cost, tokens, duration - LogicTraceTab: provider decision chain visualization with steps - PerformanceTab: TTFB gauge, latency breakdown, output rate - MetadataTab: session, client, billing info with timeline - Extract filters into dedicated components for better maintainability: - TimeFilters, IdentityFilters, RequestFilters, StatusFilters - QuickFiltersBar for common filter presets (today, errors, retries) - ActiveFiltersDisplay for showing/clearing active filter tags - Add column visibility management with localStorage persistence - Add message redaction utility for sensitive data masking - Add scroll-area component for consistent scrollable containers - Add session reuse indicator (Link2 icon) in provider chain display - Update i18n messages for all 5 languages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(i18n): add session reuse details translations Add additional i18n keys for session reuse UI including: - Session info labels (session ID, request sequence, age) - Session reuse selection descriptions - Cache optimization hint text Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(dashboard): enhance provider chain popover with session reuse UI - Add session reuse indicator and details in provider chain popover - Add i18n translations for ja, ru, zh-TW locales - Minor table display improvements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: format code (feat-logs-ui-enhancement-d94d11d) * refactor(dashboard): improve provider chain tooltip with detailed context - Enhance tooltip for single requests with session reuse details (session age, priority, cost multiplier) - Add selection funnel visualization for initial selection (total -> enabled -> healthy providers) - Show candidate providers with probability when multiple at same priority - Display cost multiplier and group tag badges in retry popover trigger - Remove redundant provider summary tooltip from logs table Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: format code (feat-logs-ui-enhancement-6b4f036) * fix(dashboard): address bugbot review comments - LogicTraceTab: include all filtered providers, not just rate_limited/circuit_open - LogicTraceTab: add error handling for clipboard copy - MetadataTab: fix costUsd === 0 being treated as no data - PerformanceTab: include outputTokens in hasData check - error-details-dialog: fix race condition in session messages check using requestId ref - provider-chain-popover: normalize probability display (0-1 to percentage) - usage-logs-view: add aria-label for icon-only buttons (accessibility) - active-sessions-cards: use Link component instead of router.push to preserve locale Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: format code (feat-logs-ui-enhancement-e222e7a) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
Important Review skippedToo many files! 150 files out of 300 files are above the max files limit of 150. You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @ding113, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a comprehensive set of features and improvements focused on enhancing observability, management, and user experience within the system. Key areas of focus include real-time provider health monitoring, a redesigned dashboard with richer metrics and active session insights, and a more detailed and organized view for request logs. The changes also streamline provider configuration and management through new UI elements and batch operations. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Summary
This is a massive release PR (v0.5.1) merging dev into main with significant changes across the codebase. After thorough analysis, I've identified one CRITICAL issue that must be addressed before merging.
PR Size: XL
- Lines changed: 44,300 (39,862 additions + 4,438 deletions)
- Files changed: 350
- Makes thorough code review nearly impossible
- Increases risk of introducing bugs
- Makes it difficult to identify the root cause if issues arise
- Violates best practices for incremental delivery
Recommendation: Future releases should be broken down into feature-specific PRs (e.g., agent pool implementation, availability dashboard, provider endpoints refactor, etc.) that can be reviewed and merged incrementally.
Issues Found
| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| Standards Violation | 1 | 0 | 0 | 0 |
| Error Handling | 0 | 0 | 1 | 0 |
| Code Quality | 0 | 0 | 1 | 0 |
Critical Issues (Must Fix)
1. [CRITICAL] Wrong PR Target Branch (CLAUDE.md violation)
Location: PR configuration
Issue: This PR targets main branch, but CLAUDE.md explicitly requires all PRs to target dev branch.
Evidence from CLAUDE.md:
PR Target Branch:
dev(all pull requests must target the dev branch)
Impact: Bypasses the intended branching strategy, potentially skipping integration testing and staging validation.
Fix Required: Close this PR and recreate it targeting dev branch instead of main.
Confidence Score: 100/100
Medium Priority Issues (Consider Fixing)
1. Client-Side Error Logging Pattern
Locations: Multiple client components use console.error instead of proper error handling:
src/app/[locale]/dashboard/availability/_components/availability-dashboard.tsx:64src/app/[locale]/dashboard/logs/_components/error-details-dialog/index.tsx:116src/app/[locale]/settings/providers/_components/forms/provider-form/index.tsx(multiple instances)src/app/api/availability/endpoints/route.ts:42
Issue: While console.error is acceptable for client-side debugging, the API route at src/app/api/availability/endpoints/route.ts:42 should use the centralized logger for consistency and proper log aggregation.
Suggested fix for API route:
// Instead of:
console.error("Endpoint availability API error:", error);
// Use:
import { logger } from "@/lib/logger";
logger.error("Endpoint availability API error", { error });Confidence Score: 85/100
2. Type Safety - Intentional any Usage
Locations:
src/repository/provider-endpoints.ts(lines withtoProviderVendor,toProviderEndpoint,toProviderEndpointProbeLog)src/repository/_shared/transformers.ts
Observation: These files use // eslint-disable-next-line @typescript-eslint/no-explicit-any with any types for database row transformers.
Assessment: This appears to be intentional design for handling dynamic database query results. The transformer functions validate and type-cast the data appropriately. While not ideal, this is a pragmatic approach for ORM result handling.
Recommendation: Consider using Drizzle's typed query results if possible, but current implementation is acceptable given the validation logic in place.
Confidence Score: 80/100 (intentional design, not a defect)
Positive Observations
✅ Excellent test coverage: New features like agent-pool have comprehensive unit tests (467 lines of tests for 450 lines of implementation)
✅ Good error handling: The AgentPoolImpl properly handles agent cleanup, TTL expiration, and LRU eviction
✅ Type safety: Most new code uses proper TypeScript types with minimal any usage
✅ Internationalization: All user-facing strings properly use i18n across 5 languages
✅ Documentation: Complex modules like agent-pool.ts have clear JSDoc comments explaining purpose and behavior
Review Coverage
- Logic and correctness - Reviewed
- Security (OWASP Top 10) - No issues found
- Error handling - Minor improvements suggested
- Type safety - Acceptable with intentional
anyusage - Documentation accuracy - Good
- Test coverage - Excellent for new features
- Code clarity - Good
- Standards compliance - CRITICAL violation found
Action Required
CRITICAL: This PR must be closed and recreated targeting the dev branch per CLAUDE.md requirements. The main branch should only receive merges from dev after proper validation.
Automated review by Claude AI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
此 Pull Request 为 v0.5.0 版本引入了大量新功能和改进,包括一个全新设计的仪表盘(采用 bento 网格布局)、一个新的供应商可用性监控页面,以及大幅增强的用量日志筛选和详情视图。数据库 schema 已更新,以支持新的供应商/服务商/端点模型。代码质量总体较高,很好地运用了现代 React hooks 和服务器操作。
我发现了一个数据库迁移中的关键问题,可能会影响现有部署。此外,还存在一个版本号不一致的小问题和一个可能导致混淆的环境变量配置。请查看具体评论以获取建议。
| "updated_at" timestamp with time zone DEFAULT now() | ||
| ); | ||
| --> statement-breakpoint | ||
| ALTER TABLE "providers" ADD COLUMN IF NOT EXISTS "provider_vendor_id" integer;--> statement-breakpoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ALTER TABLE "providers" ADD COLUMN IF NOT EXISTS "provider_vendor_id" integer; 语句添加了一个可为空的整数列。然而,相应的快照文件 drizzle/meta/0056_snapshot.json 将此列定义为 notNull: true。对于已有数据的表,这将导致新列的值为 NULL,与应用程序的 schema 定义(Drizzle schema object)冲突,很可能在运行时引发错误。
为了确保迁移的安全性,建议分步操作:
- 添加可为空的列。
- 编写一个数据迁移脚本,为
providers表中的现有行填充provider_vendor_id的值。 - 添加
NOT NULL约束。
| PROBE_INTERVAL_MS=30000 | ||
| PROBE_TIMEOUT_MS=5000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -1 +1 @@ | |||
| 0.4.3 | |||
| 0.5.0 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| { | ||
| "name": "claude-code-hub", | ||
| "version": "0.4.0", | ||
| "version": "0.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
| @@ -1 +1 @@ | |||
| 0.4.3 | |||
| 0.5.0 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VERSION file shows 0.5.0 but PR title says v0.5.1 - check which version is correct and ensure consistency
Prompt To Fix With AI
This is a comment left during a code review.
Path: VERSION
Line: 1:1
Comment:
VERSION file shows `0.5.0` but PR title says `v0.5.1` - check which version is correct and ensure consistency
How can I resolve this? If you propose a fix, please make it concise.- Update UI highlight colors from accent to primary for better visual consistency across Calendar, Command, DropdownMenu, Select, and TagInput components - Fix probability display in provider chain popover to handle out-of-range values (prevents 10000% display when value is already percentage-like) - Add shouldHideOutputRate utility to hide misleading output rates for blocked streaming requests (when generationTime/duration < 0.1 and rate > 5000 tok/s) - Fix batch key section toggle to use inverted logic matching add/edit forms (switch ON = independent personal usage page enabled) - Update i18n labels: "Allow Web UI Login" -> "Independent Personal Usage Page" - Add circuit breaker disabled state display when threshold is 0 - Add comprehensive unit tests for new functionality Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 2 comments
| @@ -1 +1 @@ | |||
| 0.4.3 | |||
| 0.5.0 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version file shows 0.5.0 but PR title indicates v0.5.1
| 0.5.0 | |
| 0.5.1 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: VERSION
Line: 1:1
Comment:
Version file shows `0.5.0` but PR title indicates `v0.5.1`
```suggestion
0.5.1
```
How can I resolve this? If you propose a fix, please make it concise.| { | ||
| "name": "claude-code-hub", | ||
| "version": "0.4.0", | ||
| "version": "0.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package.json version should match the VERSION file and PR title
| "version": "0.5.0", | |
| "version": "0.5.1", |
Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 3:3
Comment:
`package.json` version should match the VERSION file and PR title
```suggestion
"version": "0.5.1",
```
How can I resolve this? If you propose a fix, please make it concise.…tead of storage Change STORE_SESSION_MESSAGES behavior from "skip storage when false" to "always store but redact message content when false". This provides better observability while protecting sensitive data by default. Key changes: - Backend-side redaction: Move redaction from frontend to backend (session-manager.ts, errors.ts) for security-in-depth - Add redactResponseBody for response body redaction (OpenAI, Claude, Gemini, Codex formats) - Add Gemini format support in redactRequestBody (contents[], parts[], systemInstruction) - Fix SOCKS proxy URL parsing in agent-pool.ts (socks4://, socks5://) - Update session status display labels (INIT, BUSY, FAIL) - Fix test mocks and skip unreliable Dialog interaction tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 2 comments
| @@ -1 +1 @@ | |||
| 0.4.3 | |||
| 0.5.0 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version should be 0.5.1 to match PR title
| 0.5.0 | |
| 0.5.1 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: VERSION
Line: 1:1
Comment:
Version should be `0.5.1` to match PR title
```suggestion
0.5.1
```
How can I resolve this? If you propose a fix, please make it concise.| { | ||
| "name": "claude-code-hub", | ||
| "version": "0.4.0", | ||
| "version": "0.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version should be 0.5.1 to match PR title and VERSION file
| "version": "0.5.0", | |
| "version": "0.5.1", |
Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 3:3
Comment:
Version should be `0.5.1` to match PR title and VERSION file
```suggestion
"version": "0.5.1",
```
How can I resolve this? If you propose a fix, please make it concise.
Summary
Release v0.5.1 - Major feature release with vendor-endpoint architecture, availability monitoring, connection pooling, and critical rate limit fixes.
Related Issues:
What's New in v0.5.1
🚀 Major Features
1. Vendor-Endpoint Architecture (#608)
provider_vendors,provider_endpoints,provider_endpoint_probe_logs2. Availability Dashboard (#646)
3. Agent Pool for Connection Management (#646)
4. Enhanced Logs UI (#654)
🐛 Critical Fixes
User Rate Limit Enforcement (#643) - Fixes #634
Problem: User-level limits (5h/daily/weekly/monthly/concurrent sessions) were not enforced due to incorrect null-checking logic treating
0as falsy.Solution:
0(unlimited) vsnull(not set)Impact: Keys can no longer bypass user quotas. User-level limits now properly enforced across all dimensions.
Provider Failover Logic (#633) - Fixes #629
Problem: When a provider redirected models (e.g.,
claude-*→glm-*), failover logic used the redirected model name, causing premature provider exhaustion.Solution:
getOriginalModel()instead ofgetCurrentModel()for provider selectiontool_resultblocksImpact: Proper failover to backup providers when primary provider fails, even with model redirects.
Endpoint Stickiness on Retries (#651) - Partially addresses #629
Problem: Retry logic cycled through endpoints for both network and HTTP errors, causing suboptimal retry behavior.
Solution:
currentEndpointIndexto track endpoint selection independently fromattemptCountImpact: Smarter retry behavior - network errors try different endpoints, HTTP errors retry same endpoint.
SSL Certificate Error Detection (#646)
isSSLCertificateError()function to detect SSL/TLS errorsmaxRetryAttemptsto prevent excessive retries🎨 UX Improvements
Dashboard Enhancements (#650, #637)
Provider Form Refactoring (#637)
claude-auth,gemini-clino longer available🔧 Additional Improvements
Session Management (#646)
getConcurrentCountBatch()) to avoid N+1 queriesgetSessionDisplayStatus()) for consistent status calculationconcurrentCountfield toActiveSessionInfotypeThinking Signature Rectifier (#646)
signaturefield in thinking blocksi18n Updates
zh-CNlocale in chart componentsDatabase Migration
Migration 0056 includes:
provider_vendors,provider_endpoints,provider_endpoint_probe_logsprovider_vendor_idonproviderstable (auto-backfilled from URL domains)To apply:
Or enable
AUTO_MIGRATE=truein environment variables.Breaking Changes
✅ No breaking changes - All changes are backward compatible.
Files Changed
Testing
Pre-merge Checklist
bun run build- Production build passesbun run lint- Biome check passesbun run typecheck- TypeScript check passesbun run test- All unit tests passManual Testing Recommended
Upgrade Notes
bun run db:migrateor enableAUTO_MIGRATE=trueclaude-authandgemini-cliare no longer available in UIContributors
Full Changelog: v0.4.3...v0.5.1
Description enhanced by Claude AI
Greptile Overview
Greptile Summary
This is a major feature release (v0.5.1) introducing vendor-endpoint architecture, availability monitoring, connection pooling, and critical bug fixes for rate limiting and provider failover.
Key Changes
Critical Fixes:
0as falsy. Now properly distinguishes between0(unlimited) andnull(not set).getOriginalModel()instead ofgetCurrentModel(), preventing premature provider exhaustion when model redirects occur.currentEndpointIndextracking - network errors advance to next endpoint, HTTP errors retry same endpoint (sticky behavior).Major Features:
Database Migration:
provider_vendors,provider_endpoints,provider_endpoint_probe_logstables with proper indexes and foreign keys.provider_vendor_idfrom existing URL domains.UI/UX Improvements:
Issues Found
VERSIONandpackage.jsonshow0.5.0but PR title indicatesv0.5.1- needs correctionConfidence Score: 4/5
Important Files Changed
Sequence Diagram
sequenceDiagram participant Client participant ProxyForwarder participant RateLimitGuard participant ProviderSelector participant EndpointSelector participant AgentPool participant CircuitBreaker participant Provider Client->>ProxyForwarder: API Request ProxyForwarder->>RateLimitGuard: Check Rate Limits Note over RateLimitGuard: Check in order:<br/>1. Key/User Total Limits<br/>2. Key/User Concurrent Sessions<br/>3. User RPM<br/>4. Key/User 5h/Daily/Weekly/Monthly alt Rate Limit Exceeded RateLimitGuard-->>Client: 429 Rate Limit Error end RateLimitGuard->>ProviderSelector: Select Provider ProviderSelector->>ProviderSelector: Filter by Group/Model/Format ProviderSelector->>CircuitBreaker: Check Circuit State alt Circuit Open ProviderSelector->>ProviderSelector: Exclude Provider end ProviderSelector->>ProviderSelector: Select by Priority/Weight ProviderSelector-->>ProxyForwarder: Selected Provider ProxyForwarder->>EndpointSelector: Get Endpoints for Vendor EndpointSelector-->>ProxyForwarder: Endpoint List (sorted by latency) loop Retry Logic (Endpoint Stickiness) ProxyForwarder->>AgentPool: Get/Create Agent alt Agent Unhealthy AgentPool->>AgentPool: Evict & Create New end AgentPool-->>ProxyForwarder: HTTP Agent ProxyForwarder->>Provider: Forward Request via Endpoint alt Network Error (SYSTEM_ERROR) Provider-->>ProxyForwarder: Network Failure ProxyForwarder->>CircuitBreaker: Record Endpoint Failure ProxyForwarder->>ProxyForwarder: Advance to Next Endpoint else HTTP Error (PROVIDER_ERROR) Provider-->>ProxyForwarder: HTTP 4xx/5xx ProxyForwarder->>ProxyForwarder: Retry Same Endpoint else Success Provider-->>ProxyForwarder: Success Response ProxyForwarder->>CircuitBreaker: Record Endpoint Success end end alt All Endpoints Failed ProxyForwarder->>ProviderSelector: Select Next Provider ProviderSelector-->>ProxyForwarder: Fallback Provider else All Providers Failed ProxyForwarder-->>Client: 503 No Available Providers else Request Succeeded ProxyForwarder-->>Client: Success Response end