Commit Graph

466 Commits

Author SHA1 Message Date
ciat-777 b0e16fd3ea Fix model refresh dedupe and desktop packaging 2026-03-16 15:49:15 +08:00
ciat-777 d9e33e71ed Unify site badge links across console pages 2026-03-16 14:48:46 +08:00
ciat-777 bfb7ea180f Refine DownstreamKeys management page 2026-03-16 14:41:29 +08:00
Hureru f36e867e1d test(proxy): add tests for account-level proxy resolution
Cover getProxyUrlFromExtraConfig, resolveChannelProxyUrl,
withSiteRecordProxyRequestInit third parameter, and
withAccountProxyOverride ALS context propagation.
2026-03-16 01:07:14 +08:00
Hureru f7b163c8b0 feat(web): add proxy URL field to account edit panel
Add proxyUrl input to the account edit form with a hint about
supported protocols. Display a proxy badge on accounts that have
a custom proxy configured in both mobile and desktop list views.
2026-03-16 01:06:57 +08:00
Hureru ffc2ad039c feat(proxy): wrap platform adapter calls with account proxy override
Use withAccountProxyOverride to propagate account-level proxy URL
through AsyncLocalStorage for checkin, balance refresh, model
discovery, token sync, rebind-session verify, and token CRUD
operations. Also accept proxyUrl field in PUT /api/accounts/:id
with validation via parseSiteProxyUrlInput.
2026-03-16 01:06:40 +08:00
Hureru 6d2f1c4b81 feat(proxy): pass account proxy through all proxy route handlers
Thread account-level proxyUrl from extraConfig into
resolveChannelProxyUrl for endpointFlow and the third parameter
of withSiteRecordProxyRequestInit for direct fetch calls across
chat, responses, completions, embeddings, images, search, and
videos proxy routes.
2026-03-16 01:06:16 +08:00
Hureru b43a4fd2ea fix(proxy): use proxyUrl parameter in endpointFlow fetch
The ExecuteEndpointFlowInput.proxyUrl field was defined but ignored
by the fetch call. Apply it via withExplicitProxyRequestInit when
present, falling back to withSiteProxyRequestInit otherwise.
2026-03-16 01:05:43 +08:00
Hureru 5687e87308 feat(proxy): add account-level proxy resolution core
Add getProxyUrlFromExtraConfig to extract proxy URL from account
extraConfig JSON. Extend siteProxy with AsyncLocalStorage-based
withAccountProxyOverride, resolveChannelProxyUrl, and optional
accountProxyUrl parameter on withSiteRecordProxyRequestInit.

Priority chain: account proxyUrl > site useSystemProxy > direct.
2026-03-16 01:03:32 +08:00
ciat-777 bb608a39e9 fix: remove duplicate proxy log compat helper after rebase 2026-03-15 23:17:11 +08:00
ciat-777 4660c8ae0b fix: add downstream API key metadata and update proxy logs schema
# Conflicts:
#	src/server/db/generated/mysql.upgrade.sql
#	src/server/db/generated/postgres.upgrade.sql
#	src/server/db/index.ts
2026-03-15 23:14:44 +08:00
ciat-777 b15da138d1 feat: enhance MySQL upgrade generation with index prefix length control
- Added support for specifying prefix lengths for live text-backed columns in MySQL upgrade SQL generation.
- Introduced `mysqlIndexPrefixRequirements` option to `generateUpgradeSql` function.
- Updated tests to validate the new functionality for MySQL upgrade generation.
- Removed legacy shared index compatibility specifications to avoid duplication with runtime schema bootstrap.
- Improved error handling and response structure in account token coverage refresh logic.
- Added tests for coverage refresh failure scenarios to ensure proper handling of token persistence.

# Conflicts:
#	src/server/db/sharedIndexSchemaCompatibility.test.ts
#	src/server/db/sharedIndexSchemaCompatibility.ts
#	src/server/index.ts
2026-03-15 23:13:37 +08:00
ciat-777 6ca08c1052 fix: update desktop server configuration for consistent port handling and access 2026-03-15 23:08:49 +08:00
ciat-777 4b42751953 fix: address gemini native and route coverage regressions 2026-03-15 23:08:49 +08:00
Delicious a64a51aa0c feat: 下游 API 密钥管理 (#103)
* feat: downstream API key usage + proxy log attribution

* chore(schema): regenerate generated artifacts

* test: keep migration replay + platform detection tests stable

* feat: complete downstream api key management validation

* refactor: move downstream keys into console nav

* feat: upgrade downstream keys management console

* feat: harden downstream key management flows

* test: cover downstream key policy guards

* feat: add downstream key grouping and tags

* feat: polish downstream key search and log metadata

* test: fix sqlite migration bootstrap coverage

* perf: isolate vchart bundle loading

* fix: align downstream key drawer metrics

---------

Co-authored-by: DeliciousBuding <DeliciousBuding@users.noreply.github.com>
2026-03-15 22:00:02 +08:00
Cita 6237eb631f fix(db): tolerate runtime schema drift on startup (#113) 2026-03-15 19:07:46 +08:00
ciat-777 b8735ad8c7 fix(db): enforce runtime external schema upgrades 2026-03-15 18:45:30 +08:00
Cita 67ad62c0d5 security: throttle sensitive admin routes (#111) 2026-03-15 17:28:34 +08:00
Cita fadb268d3a Merge pull request #88 from DeliciousBuding/fix/normalize-upstream-v1
fix(proxy): baseUrl 已含 /v1 时避免重复拼接
2026-03-15 15:58:17 +08:00
DeliciousBuding a6e6be9460 fix(proxy): normalize upstream url join 2026-03-15 15:54:48 +08:00
ciat-777 f78cf434a9 fix(db): handle mysql information schema field casing 2026-03-15 15:27:09 +08:00
ciat-777 2699882569 fix(db): avoid mysql prefixes on non-text indexes 2026-03-15 15:16:15 +08:00
DeliciousBuding ef90169cc9 fix(proxy): avoid duplicated /v1 when joining upstream url 2026-03-15 15:13:50 +08:00
ciat-777 ef5f67e604 ci: parallelize PR checks and gate schema parity 2026-03-15 15:10:51 +08:00
Cita bf01ae335b Merge pull request #83 from ksmaze/test-gemini
fix: remove gemini unrecognized fields before sending request
2026-03-15 13:27:10 +08:00
Cita 4b80807e56 Merge pull request #85 from cita-777/fix/render-generated-assets
fix: make external db bootstrap idempotent
2026-03-15 13:17:41 +08:00
ciat-777 c9d4a10f15 fix(db): make external bootstrap idempotent 2026-03-15 13:16:50 +08:00
ksmaze 9e4ffbd6c8 address comment 2026-03-14 22:05:12 -07:00
Cita 4aff5e6e27 Merge pull request #84 from cita-777/fix/render-generated-assets
fix(db): map mysql text primary keys to varchar
2026-03-15 12:55:35 +08:00
ciat-777 69e282cce1 fix(db): map mysql text primary keys to varchar 2026-03-15 12:50:10 +08:00
ksmaze e227fc0dd3 fix: remove gemini unrecognized fields before sending request 2026-03-14 21:40:39 -07:00
ksmaze 0c7e600d41 address comments 2026-03-14 20:34:02 -07:00
ksmaze ed3de8cca6 address comments 2026-03-14 20:21:17 -07:00
ksmaze 083ae0e720 address comments 2026-03-14 19:43:46 -07:00
ksmaze de22fc35fa feat: Add manual model availability management, including database schema updates, new API routes, and UI components. 2026-03-14 19:26:13 -07:00
ciat-777 cc675d51d5 refactor(db): fence legacy runtime schema compat 2026-03-14 23:56:04 +08:00
ciat-777 627b04d456 test(db): verify upgrade paths against the schema contract 2026-03-14 23:37:25 +08:00
ciat-777 af6bd86e23 test(db): add live schema parity checks for sqlite mysql and postgres 2026-03-14 23:27:28 +08:00
ciat-777 6d389cb3af feat(db): generate schema artifacts and align sqlite baseline 2026-03-14 23:04:33 +08:00
ciat-777 5bc5fb7039 feat(db): generate canonical schema contract from sqlite migrations 2026-03-14 22:45:05 +08:00
ciat-777 c037ea866e test(db): isolate default sqlite path under vitest 2026-03-14 22:42:22 +08:00
ciat-777 b834a9bef8 feat: add site_disabled_models and proxy tasks to database schema
- Implemented site_disabled_models table with necessary SQL commands for SQLite, MySQL, and PostgreSQL.
- Updated ensureSiteSchemaCompatibility to create site_disabled_models if it doesn't exist.
- Enhanced database migration service to include site_disabled_models, proxy_video_tasks, and proxy_files in migration statements.
- Created shared index compatibility for new tables and ensured existing indexes are maintained.
- Added tests for schema parity to ensure consistency between runtime schema and defined schema.
2026-03-14 21:16:43 +08:00
ciat-777 0c109278b9 feat(migrate): implement recovery for duplicate-column migrations and enhance migration handling 2026-03-14 20:40:46 +08:00
ciat-777 7d431d3ccd fix(db): detect duplicate-column from nested migration error cause 2026-03-14 19:25:55 +08:00
ciat-777 7bdcf27c41 merge: reconcile migrate bootstrap with duplicate-column recovery 2026-03-14 19:12:23 +08:00
ciat-777 7b8ce3dd13 feat: add recovery for duplicate-column migration errors and enhance migration utilities 2026-03-14 19:10:18 +08:00
Cita b3d678f738 Merge pull request #68 from grassroadsZ/feature/site-model-disable
feat: 将模型禁用功能从站点移至连接管理
2026-03-14 17:26:57 +08:00
ciat-777 595073cf4c fix(pr-68): harden model disable flows
Co-authored-by: grassroadsZ <44087648+grassroadsZ@users.noreply.github.com>
2026-03-14 17:22:06 +08:00
ciat-777 7bd48a3c6f fix: improve tester timeouts and telegram proxy config 2026-03-14 16:18:43 +08:00
ciat-777 1a1f0452b3 feat: add delete confirmation modal and enhance token handling
- Implemented a DeleteConfirmModal component for confirming deletions across various pages (Accounts, Sites, Tokens).
- Updated Accounts and Sites pages to utilize the new modal for single and batch deletions.
- Enhanced TokensPanel to support group selection and improved token deletion handling with confirmation.
- Added functionality to skip confirmation for batch actions and handle token group fetching with error management.
- Improved error handling for expired sessions in NewApiAdapter and OneApiAdapter.
- Added tests for new delete confirmation behavior and token editing interactions.
2026-03-14 13:31:15 +08:00