✨ 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
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| billing.go | Loading commit data... | |
| channel-billing.go | Loading commit data... | |
| channel-test.go | Loading commit data... | |
| channel.go | Loading commit data... | |
| console_migrate.go | Loading commit data... | |
| github.go | Loading commit data... | |
| group.go | Loading commit data... | |
| image.go | Loading commit data... | |
| linuxdo.go | Loading commit data... | |
| log.go | Loading commit data... | |
| midjourney.go | Loading commit data... | |
| misc.go | Loading commit data... | |
| missing_models.go | Loading commit data... | |
| model.go | Loading commit data... | |
| model_meta.go | Loading commit data... | |
| model_sync.go | Loading commit data... | |
| oidc.go | Loading commit data... | |
| option.go | Loading commit data... | |
| playground.go | Loading commit data... | |
| prefill_group.go | Loading commit data... | |
| pricing.go | Loading commit data... | |
| ratio_config.go | Loading commit data... | |
| ratio_sync.go | Loading commit data... | |
| redemption.go | Loading commit data... | |
| relay.go | Loading commit data... | |
| setup.go | Loading commit data... | |
| swag_video.go | Loading commit data... | |
| task.go | Loading commit data... | |
| task_video.go | Loading commit data... | |
| telegram.go | Loading commit data... | |
| token.go | Loading commit data... | |
| topup.go | Loading commit data... | |
| topup_stripe.go | Loading commit data... | |
| twofa.go | Loading commit data... | |
| uptime_kuma.go | Loading commit data... | |
| usedata.go | Loading commit data... | |
| user.go | Loading commit data... | |
| vendor_meta.go | Loading commit data... | |
| wechat.go | Loading commit data... |