Commit Graph

654 Commits

Author SHA1 Message Date
Bainily 9cf3dd1904 feat(proxy): improve channel failover stability and sticky session coordination / 优化代理通道故障切换与粘滞会话协调 (#268)
* wip: preserve local changes before upstream merge

* Improve proxy routing stability and add stable-first strategy

* Sync explicit-group routing strategy to eligible source routes

* Fix proxy retry and runtime health review issues

* fix: make proxy channel retry attempts configurable

* fix: harden proxy retry recovery and bookkeeping

* fix: address pr 257 review comments

* feat(proxy): add sticky session channel coordination

---------

Co-authored-by: Cita <juricek.chen@gmail.com>
2026-03-24 19:40:44 +08:00
Cita 5b9c83f830 fix: default downstream key access selections to all (#263)
* fix: default downstream key access selections to all

* test: fix downstream keys test renderer typing
2026-03-23 22:48:15 +08:00
Cita 4a3b4a8bb6 fix: preserve protocol parity across compatibility hops (#259)
* wip: preserve local changes before upstream merge

* Improve proxy routing stability and add stable-first strategy

* Sync explicit-group routing strategy to eligible source routes

* Fix proxy retry and runtime health review issues

* fix: make proxy channel retry attempts configurable

* fix: harden proxy retry recovery and bookkeeping

* fix: address pr 257 review comments

* fix: preserve oe tool_result structure

* fix: preserve protocol parity across compatibility hops

* fix: satisfy server build and typecheck

* fix: preserve codex and mcp fallback semantics

* fix: address ci and review follow-ups

---------

Co-authored-by: bnvnvnv <bnvnvnv@gmail.com>
2026-03-23 20:25:20 +08:00
Cita b3869c4f55 fix: avoid armv7 desktop postinstall in docker build (#262) 2026-03-23 20:24:37 +08:00
Cita b07b16c942 fix: restore docker builder install deps (#261)
* fix: exclude runtime db config from backup and migration

* fix: restore docker builder install deps
2026-03-23 20:12:16 +08:00
Cita c838e3263b fix: exclude runtime db config from backup and migration (#260) 2026-03-23 20:05:00 +08:00
Bainily 1449f08e6c fix: stabilize Codex continuation and proxy retry recovery / 修复 Codex 续传与代理重试稳定性 (#257)
* wip: preserve local changes before upstream merge

* Improve proxy routing stability and add stable-first strategy

* Sync explicit-group routing strategy to eligible source routes

* Fix proxy retry and runtime health review issues

* fix: make proxy channel retry attempts configurable

* fix: harden proxy retry recovery and bookkeeping

* fix: address pr 257 review comments

---------

Co-authored-by: Cita <juricek.chen@gmail.com>
2026-03-23 19:17:22 +08:00
Cita 5be5e2eb07 fix: preserve protocol parity across Claude fallbacks (#256)
* fix: preserve protocol parity across claude fallbacks

* fix: tighten protocol parity across responses and anthropic fallbacks

* fix: preserve stricter tool contracts across fallbacks

* fix: unblock anthropic stream server build
2026-03-23 17:29:49 +08:00
Cita 2940b003af Merge pull request #255 from cita-777/codex/ci-typecheck-pr
fix: tighten CI typecheck coverage
2026-03-23 16:40:52 +08:00
Cita 653b7557a7 fix: address review followups 2026-03-23 16:24:31 +08:00
Cita 4b903fdd3b fix: tighten ci typecheck coverage 2026-03-23 16:02:13 +08:00
Cita 40c8c1c7ad Merge pull request #244 from cita-777/codex/single-source-consolidation
refactor: consolidate single-source routing and protocol helpers
2026-03-23 15:28:44 +08:00
Cita 764b9aa0e6 fix: address latest coderabbit review findings 2026-03-23 15:24:00 +08:00
Cita 426d9a538d test: relax token selection count assertion 2026-03-23 14:51:57 +08:00
Cita 4686c558aa Merge origin/main into codex/single-source-consolidation 2026-03-23 14:44:52 +08:00
Cita bf969c136a docs: capture full-scope consolidation finish 2026-03-23 14:32:11 +08:00
Cita f9316784aa fix: align final verification scripts and expectations 2026-03-23 14:29:44 +08:00
Cita 7cc0a04b8b refactor: share responsive filter panel scaffold 2026-03-23 14:29:11 +08:00
Cita dd914b327c refactor: extract downstream key drawer 2026-03-23 14:28:37 +08:00
Cita 8e001508bf refactor: extract model tester composer and tighten shared types 2026-03-23 13:44:52 +08:00
Cita 8f14540549 refactor: extract model tester debug panel 2026-03-23 13:35:42 +08:00
Cita 9b21ed3fed refactor: extract account model management modal 2026-03-23 13:32:55 +08:00
Cita c3e3985b6e refactor: extract remaining settings modals 2026-03-23 13:29:39 +08:00
Cita 62eca41bc2 refactor: extract settings portal modals 2026-03-23 13:18:37 +08:00
Cita f7a7084278 refactor: share responsive batch actions across admin pages 2026-03-23 13:12:06 +08:00
Cita b82d7c31d9 refactor: derive legacy schema compat from feature specs 2026-03-23 13:04:09 +08:00
Cita 55aea6afc4 refactor: separate brand registry from BrandIcon 2026-03-23 12:44:38 +08:00
Cita 8b3653c7c9 refactor: share schema metadata normalization rules 2026-03-23 12:23:04 +08:00
Cita 86518202fa refactor: move platform discovery out of model service 2026-03-23 12:14:22 +08:00
Cita 50c34b8866 refactor: keep downstream client metadata on cli profiles 2026-03-23 12:02:44 +08:00
Cita 3877f3a3f1 refactor: centralize oauth identity and route refresh workflow 2026-03-23 11:53:59 +08:00
Cita 328b492ab3 fix: finish review-driven single-source cleanup 2026-03-23 11:26:01 +08:00
Cita a3b061b60f Merge pull request #245 from cita-777/codex/site-binding-conflict
fix: handle duplicate site binding conflicts
2026-03-23 09:20:58 +08:00
Cita f5892b9656 Merge pull request #241 from Hureru/feat/model-filter-system
feat: add model filter system and route page performance optimization
2026-03-23 00:19:29 +08:00
Cita 90e9140c70 fix: preserve site disabled models on partial load failure 2026-03-22 23:58:43 +08:00
Cita 29c9fcbd29 fix: resolve remaining review follow-ups 2026-03-22 23:53:41 +08:00
Cita 5d78658af9 fix: address review feedback and code scanning alerts 2026-03-22 23:41:45 +08:00
Hureru 9a5e2bbc60 fix: prevent brand list loading indicator from hanging on API failure 2026-03-22 23:13:51 +08:00
Cita daa6a01ccf fix: handle duplicate site binding conflicts 2026-03-22 22:18:44 +08:00
Cita 32d7037629 refactor: share platform file and route helpers 2026-03-22 22:17:50 +08:00
Cita 9290e51ecc refactor: consolidate single-source routing and protocol helpers 2026-03-22 21:27:09 +08:00
Cita 96e7614835 fix: trust proxy headers and align proxy file mysql indexes 2026-03-22 21:17:56 +08:00
Hureru d278b41be2 fix: address review issues in brand filter sync, model guard, route counts, and candidate loading
- Sync blockedBrands local state after save to prevent stale chips
- Defer getBrandList from blocking Settings bootstrap
- Guard model management UI on brandGroups instead of availableModels
- Deduplicate single-model add in disabled models
- Skip read-only/zero-channel routes in enabledCounts and filter
- Add sequence counter to loadCandidates to prevent force race condition
- Use stableAddChannel for mobile add-channel button
2026-03-22 20:44:55 +08:00
Hureru b8ad89d1ab fix: use ref-based stale guard for site disabled-models fetch
Replace closure-captured editor check with loadingModelsSiteIdRef so the
stale-response guard works correctly across rapid site switches. Also
gate setDisabledModelsLoading(false) behind the same ref check.
2026-03-22 20:26:45 +08:00
Hureru 26be7c024a fix: address review issues across settings, sites, brand matcher, and token routes
- settings.ts: trigger route rebuild after globalBlockedBrands changes in both
  import and PUT handler; reject non-array payloads with 400 instead of silently
  defaulting to empty array
- sites.ts: trim model names before deduplication so whitespace variants merge
- brandMatcher.ts: align boundary regex with frontend delimiter class [/:_\-\s]
- Settings.tsx: add role="switch" and aria-checked to brand filter chips; make
  getBrandList best-effort so its failure doesn't block page load
- Sites.tsx: build brandGroups from union of availableModels and disabledModels
  so legacy/removed models remain visible; add stale-response guard and error
  logging for disabled/available model fetches
- TokenRoutes.tsx: use baseFilteredRoutes.length for totalRouteCount to keep
  enabled/disabled counts in sync with status filter; add candidatesVersionRef
  to invalidate lazy caches on payload change; add per-channel in-flight guard
  on toggle; invalidate channel cache after rebuild and site-block operations
2026-03-22 20:18:50 +08:00
Hureru 911d76fa08 fix: add channel toggle and site-block buttons to mobile channel row 2026-03-22 19:27:43 +08:00
Hureru 2f8dae70c2 fix: add missing onToggleChannelEnabled and onSiteBlockModel props to mobile RouteCard 2026-03-22 19:18:44 +08:00
Hureru 3195282c4e fix: address review issues in TokenRoutes performance optimization
- Escape modelName/siteName in innerHTML to prevent XSS
- Use content-based routePatternsKey for cache invalidation instead of
  length-only keys that miss content changes
- Extract shared baseFilteredRoutes to eliminate duplicated filter logic
  between enabledCounts and filteredRoutes
- Add candidatesPromiseRef to deduplicate concurrent loadCandidates calls
2026-03-22 19:12:50 +08:00
Hureru 92fd5e034d perf: defer token-candidates loading and lazy-compute heavy route indices
The routes page loaded ~924KB of API data upfront (summary 366KB +
token-candidates 558KB), but token-candidates was only needed when
expanding cards, opening panels, or using filters. This caused a ~3s
element render delay blocking LCP.

Changes:
- Split load() so first paint only fetches routesSummary (366KB)
- Preload token-candidates in background via requestIdleCallback
- Wrap candidates state updates in startTransition to avoid UI jank
- Convert 3 heavy O(routes×models) useMemo indices to lazy per-route
  computation with ref-based cache (candidateIndex, missingTokenIndex,
  missingTokenGroupIndex)
- Guard 4 ManualRoutePanel-only useMemos with showManual check
- Convert 2 derived useMemos to per-route getter functions
- Add loadCandidates() calls at 7 interaction trigger points
2026-03-22 19:00:03 +08:00
Hureru d2db989b98 fix: add bottom border to channel rows for clearer separation 2026-03-22 19:00:02 +08:00