1. 02 Sep, 2025 5 commits
  2. 01 Sep, 2025 13 commits
    • 🐛 fix(web/layout): explicitly import headerbar/index.jsx to resolve Linux build failure · c28e89ab
      The Linux/Vite build failed with:
      “Could not resolve "./headerbar" from "src/components/layout/PageLayout.jsx"”
      
      On Linux and with stricter ESM/rollup resolution, directory index files (index.jsx)
      may not be auto-resolved reliably. Explicitly importing the index file ensures
      cross-platform stability.
      
      Changes:
      - Update PageLayout import from "./headerbar" to "./headerbar/index.jsx"
      
      Impact:
      - Fixes build on Linux
      - No runtime behavior changes
      
      Verification:
      - Linter passes for web/src/components/layout/PageLayout.jsx
      
      Notes:
      - Prefer explicit index file imports (and extensions) to avoid platform differences.
      t0ng7u committed
    • feat: Add skeleton loading states for sidebar navigation · d8e36a70
      Add comprehensive skeleton screen implementation for sidebar to improve loading UX, matching the existing headerbar skeleton pattern.
      
      ## Features Added
      - **Sidebar skeleton screens**: Complete 1:1 recreation of sidebar structure during loading
      - **Responsive skeleton layouts**: Different layouts for expanded (164×30px) and collapsed (44×44px) states
      - **Skeleton component enhancements**: Extended SkeletonWrapper with new skeleton types (sidebar, button, sidebarNavItem, sidebarGroupTitle)
      - **Minimum loading time**: Integrated useMinimumLoadingTime hook with 500ms duration for smooth UX
      
      ## Layout Specifications
      - **Expanded nav items**: 164×30px with 8px horizontal margins and 3px vertical margins
      - **Collapsed nav items**: 44×44px with 4px bottom margin and 8px horizontal margins
      - **Collapse button**: 156×24px (expanded) / 36×24px (collapsed) with rounded corners
      - **Container padding**: 12px top padding, 8px horizontal margins
      - **Group labels**: 4px 15px 8px padding matching real sidebar-group-label styles
      
      ## Code Improvements
      - **Refactored skeleton rendering**: Eliminated code duplication using reusable components (NavRow, CollapsedRow)
      - **Configuration-driven sections**: Sections defined as config objects with title widths and item widths
      - **Fixed width calculations**: Removed random width generation, using precise fixed widths per menu item
      - **Proper CSS class alignment**: Uses real sidebar CSS classes (sidebar-section, sidebar-group-label, sidebar-divider)
      
      ## UI/UX Enhancements
      - **Bottom-aligned collapse button**: Fixed positioning using margin-top: auto to stay at viewport bottom
      - **Accurate spacing**: Matches real sidebar margins, padding, and spacing exactly
      - **Skeleton stability**: Fixed width values prevent layout shifts during loading
      - **Clean file structure**: Removed redundant HeaderBar.js export file
      
      ## Technical Details
      - Extended SkeletonWrapper component with sidebar-specific skeleton types
      - Integrated skeleton loading state management in SiderBar component
      - Added support for collapsed state awareness in skeleton rendering
      - Implemented precise dimension matching for pixel-perfect loading states
      
      Closes: Sidebar skeleton loading implementation
      t0ng7u committed
    • 🧹 refactor(db): remove legacy models/vendors index cleanup logic · d15b31ab
      - Delete dropIndexIfExists helper from `model/main.go`
      - Remove all calls to dropIndexIfExists in `migrateDB` and `migrateDBFast`
      - Drop related comments and MySQL-only DROP INDEX code paths
      - Keep GORM AutoMigrate as the sole migration path for `Model` and `Vendor`
      
      Why:
      - Simplifies migrations and avoids destructive index drops at startup
      - Prevents noisy MySQL 1091 errors and vendor-specific branches
      - Aligns with composite unique indexes (uk_model_name_delete_at, uk_vendor_name_delete_at)
      
      Impact:
      - No expected runtime behavior change; schema remains managed by GORM
      - Legacy single-column unique indexes (if any) will no longer be auto-dropped
      - Safe across MySQL/PostgreSQL/SQLite; MySQL Chinese charset checks remain intact
      
      Verification:
      - Lint passed for `model/main.go`
      - Confirmed no remaining `DROP INDEX` or `dropIndexIfExists` references
      t0ng7u committed
    • feat(models-sync): official upstream sync with conflict resolution UI, opt‑out… · 54f118d9
       feat(models-sync): official upstream sync with conflict resolution UI, opt‑out flag, and backend resiliency
      
      Backend
      - Add endpoints:
        - GET /api/models/sync_upstream/preview — diff preview (filters out models with sync_official = 0)
        - POST /api/models/sync_upstream — apply sync (create missing; optionally overwrite selected fields)
      - Respect opt‑out: skip models with sync_official = 0 in both preview and apply
      - Return detailed stats: created_models, created_vendors, updated_models, skipped_models, plus created_list / updated_list
      - Add model.Model.SyncOfficial (default 1); auto‑migrated by GORM
      - Make HTTP fetching robust:
        - Shared http.Client (connection reuse) with 3x exponential backoff retry
        - 10MB response cap; keep existing IPv4‑first for *.github.io
      - Vendor handling:
        - New ensureVendorID helper (cache lookup → DB lookup → create), reduces round‑trips
        - Transactional overwrite to avoid partial updates
      - Small cleanups and clearer helpers (containsField, coalesce, chooseStatus)
      
      Frontend
      - ModelsActions: add “Sync official” button with Popover (p‑2) explaining community contribution; loading = syncing || previewing; preview → conflict modal → apply flow
      - New UpstreamConflictModal:
        - Per‑field columns (description/icon/tags/vendor/name_rule/status) with column‑level checkbox to select all
        - Cell with Checkbox + Tag (“Click to view differences”) and Popover (p‑2) showing Local vs Official values
        - Auto‑hide columns with no conflicts; responsive width; use native Semi Modal footer
        - Full i18n coverage
      - useModelsData: add syncing/previewing states; new methods previewUpstreamDiff, applyUpstreamOverwrite, syncUpstream; refresh vendors/models after apply
      - EditModelModal: add “Participate in official sync” switch; persisted as sync_official
      - ModelsColumnDefs: add “Participate in official sync” column
      
      i18n
      - Add missing English keys for the new UI and messages; fix quoting issues
      
      Refs
      - Upstream metadata: https://github.com/basellm/llm-metadata
      t0ng7u committed
    • feat(ratio-sync, ui): add built‑in “Official Ratio Preset” and harden upstream sync · 55c82713
      Backend (controller/ratio_sync.go):
      - Add built‑in official upstream to GetSyncableChannels (ID: -100, BaseURL: https://basellm.github.io)
      - Support absolute endpoint URLs; otherwise join BaseURL + endpoint (defaults to /api/ratio_config)
      - Harden HTTP client:
        - IPv4‑first with IPv6 fallback for github.io
        - Add ResponseHeaderTimeout
        - 3 attempts with exponential backoff (200/400/800ms)
      - Validate Content-Type and limit response body to 10MB (safe decode via io.LimitReader)
      - Robust parsing: support type1 ratio_config map and type2 pricing list
      - Use net.SplitHostPort for host parsing
      - Use float tolerance in differences comparison to avoid false mismatches
      - Remove unused code (tryDirect) and improve warnings
      
      Frontend:
      - UpstreamRatioSync.jsx: auto-assign official endpoint to /llm-metadata/api/newapi/ratio_config-v1-base.json
      - ChannelSelectorModal.jsx:
        - Pin the official source at the top of the list
        - Show a green “官方” tag next to the status
        - Refactor status renderer to accept the full record
      
      Notes:
      - Backward compatible; no API surface changes
      - Official ratio_config reference: https://basellm.github.io/llm-metadata/api/newapi/ratio_config-v1-base.json
      t0ng7u committed
    • Merge pull request #1680 from HynoR/fix/res · 7d972851
      fix: update model name filtering to be case-sensitive
      Seefs committed
    • Merge pull request #1712 from seefs001/feature/bark · 99afd05d
      feat: bark notification #1699
      Seefs committed
    • Merge pull request #1713 from seefs001/feature/channel_remark · 60b7db29
      feat: add channel remark #1710
      Seefs committed
    • feat: add channel remark #1710 · 06785c01
      Seefs committed
    • feat: bark notification #1699 · 4f44bbed
      Seefs committed
  3. 31 Aug, 2025 8 commits
  4. 30 Aug, 2025 2 commits
  5. 29 Aug, 2025 12 commits
    • feat(pricing): add default vendor icons with LobeHub color support · aee5b8ca
      - Add defaultVendorIcons mapping for major AI vendors
      - Update getOrCreateVendor to automatically set vendor icons
      - Add getDefaultVendorIcon helper function
      - Support LobeHub icons Color variants (e.g., Claude.Color, Gemini.Color)
      - Fix issue where default vendors were created without icons
      
      This ensures that when new models are encountered, their vendors
      will be created with appropriate colored icons for better UI display.
      
      Affected vendors include:
      - OpenAI, Anthropic, Google, Moonshot, 智谱, 阿里巴巴
      - DeepSeek, MiniMax, 百度, 讯飞, 腾讯, Cohere
      - Cloudflare, 360, 零一万物, Jina, Mistral, xAI
      - Meta, 字节跳动, 快手, 即梦, Vidu, Microsoft/Azure
      t0ng7u committed
    • Merge branch 'pr/fix-kling-text2image' of github.com:feitianbubu/new-api into… · d081dcff
      Merge branch 'pr/fix-kling-text2image' of github.com:feitianbubu/new-api into feitianbubu-pr/fix-kling-text2image
      creamlike1024 committed
    • Merge branch 'pr/kling-new-params' of github.com:feitianbubu/new-api into… · 63bf35a1
      Merge branch 'pr/kling-new-params' of github.com:feitianbubu/new-api into feitianbubu-pr/kling-new-params
      creamlike1024 committed
    • 🎨 feat(ui): enhance pricing components with improved icons and responsive design · 78260992
      - Replace copy button icon from semi-ui IconCopy to lucide-react Copy in PricingCardView
      - Add conditional tooltip functionality to SelectableButtonGroup that only shows when text overflows
      - Implement responsive table column behavior in PricingTableColumns with mobile-aware fixed positioning
      - Use DOM-based overflow detection (scrollWidth vs clientWidth) for better performance
      - Apply useIsMobile hook to conditionally set fixed: 'right' only on desktop devices
      
      These changes improve user experience across different screen sizes and provide more consistent iconography throughout the pricing interface.
      t0ng7u committed
    • Merge pull request #1564 from feitianbubu/pr/init-default-vendor · 4bf9ef55
      feat: init default vendor
      IcedTangerine committed
    • chore: Increase default page size from 10 to 100 items in model pricing views · 64058614
      This commit updates the default pagination settings across the model pricing
      components to improve user experience by reducing the need for frequent
      page navigation when browsing large model catalogs.
      
      Changes made:
      - Update initial pageSize state from 10 to 100 in useModelPricingData hook
      - Set defaultPageSize to 100 in PricingTable pagination configuration
      - Increase default skeletonCount from 10 to 100 in PricingCardSkeleton
      
      Files modified:
      - web/src/hooks/model-pricing/useModelPricingData.jsx
      - web/src/components/table/model-pricing/view/table/PricingTable.jsx
      - web/src/components/table/model-pricing/view/card/PricingCardSkeleton.jsx
      
      This change affects both card and table view modes of the model pricing page,
      ensuring consistent pagination behavior across different display formats.
      t0ng7u committed
    • 📱 feat(pricing-header): show only search/copy/filter on mobile; hide vendor intro · 8ceb0316
      - Mobile (isMobile=true): render SearchActions (search, copy, filter) only; hide vendor intro card
      - Keep PricingFilterModal available on mobile for filtering
      - Desktop/Non-mobile: unchanged behavior (vendor intro remains visible)
      - Improves small-screen UX by reducing visual clutter and prioritizing primary actions
      
      Files:
      - web/src/components/table/model-pricing/layout/header/PricingTopSection.jsx
      
      Notes:
      - Added `SearchActions` import and conditional rendering
      - No breaking changes; no styling changes required
      t0ng7u committed
    • 🎨 feat: Implement responsive design for SelectableButtonGroup component · 1bc0010f
      This commit introduces a comprehensive responsive design system for the SelectableButtonGroup component that adapts to container width changes, particularly optimized for dynamic sidebar layouts.
      
      ## Key Features
      
      ### 1. Container Width Detection
      - Added `useContainerWidth` hook using ResizeObserver API
      - Real-time container width monitoring for responsive calculations
      - Automatic layout adjustments based on available space
      
      ### 2. Intelligent Column Layout
      Implements a 4-tier responsive system:
      - **≤280px**: 1 column + tags (mobile portrait)
      - **281-380px**: 2 columns + tags (narrow screens)
      - **381-460px**: 3 columns - tags (general case, prioritizes readability)
      - **>460px**: 3 columns + tags (wide screens, full feature display)
      
      ### 3. Dynamic Tag Visibility
      - Tags automatically hide in medium-width containers (381-460px) to improve text readability
      - Tags show in narrow and wide containers where space allows for optimal UX
      - Responsive threshold ensures content clarity across all viewport sizes
      
      ### 4. Adaptive Grid Spacing
      - Compact spacing `[4,4]` for containers ≤400px
      - Standard spacing `[6,6]` for larger containers
      - Additional `.sbg-compact` CSS class for fine-tuned styling in narrow layouts
      
      ### 5. Sidebar Integration
      - Perfectly compatible with dynamic sidebar width: `clamp(280px, 24vw, 520px)`
      - Automatically adjusts as sidebar scales with viewport changes
      - Maintains optimal button density and information display at all sizes
      
      ## Technical Implementation
      
      - **Hook**: `useContainerWidth.js` - ResizeObserver-based width detection
      - **Component**: Enhanced `SelectableButtonGroup.jsx` with responsive logic
      - **Styling**: Added `.sbg-compact` mode in `index.css`
      - **Performance**: Efficient span calculation using `Math.floor(24 / perRow)`
      
      ## Benefits
      
      - Improved UX across all screen sizes and sidebar configurations
      - Better text readability through intelligent tag hiding
      - Seamless integration with existing responsive sidebar system
      - Maintains component functionality while optimizing space utilization
      
      Closes: Responsive design implementation for model marketplace sidebar components
      t0ng7u committed