Commit Graph

3505 Commits

Author SHA1 Message Date
CaIon 6d2e92fb7b feat: add JSONEditor component for enhanced JSON input handling v0.8.8.0-alpha.14 2025-07-31 12:54:07 +08:00
CaIon 590e6db670 fix: 修复被禁用的渠道无法测试的问题 2025-07-31 10:56:51 +08:00
CaIon 40848f28d4 fix: correct request mode assignment logic in adaptor v0.8.8.0-alpha.13 2025-07-30 23:32:20 +08:00
CaIon 91febc3097 fix: remove debug print statement 2025-07-30 23:29:45 +08:00
CaIon a2fbf368c1 fix: 修复缓存开启下自动禁用失效 v0.8.8.0-alpha.12 2025-07-30 23:26:09 +08:00
Xyfacai 9055698b4f feat: 显式指定 error 跳过重试 2025-07-30 22:35:31 +08:00
creamlike1024 3db78818cf Merge branch 'RedwindA-fix/gemini-native-sse' into alpha 2025-07-30 20:37:10 +08:00
creamlike1024 1bb8a314cb Merge branch 'fix/gemini-native-sse' of github.com:RedwindA/new-api into RedwindA-fix/gemini-native-sse 2025-07-30 20:34:12 +08:00
CaIon 28ededaf8e fix: WriteContentType panic 2025-07-30 20:31:51 +08:00
IcedTangerine 017c0b19ec Merge pull request #1405 from RedwindA/fix/gemini-nothinking-handler
fix: improve gemini nothinking handler
2025-07-30 20:31:26 +08:00
CaIon 9afb9b594d feat: 错误内容脱敏 2025-07-30 19:08:35 +08:00
CaIon 2d1cd5595c Merge remote-tracking branch 'origin/alpha' into alpha v0.8.8.0-alpha.11 2025-07-30 18:39:32 +08:00
CaIon 2db71673a5 fix: auto ban 2025-07-30 18:39:19 +08:00
IcedTangerine d7c9b65245 Merge pull request #1472 from QuantumNous/revert-1385-patch-1
Revert 1385 patch 1
2025-07-30 12:19:57 +08:00
IcedTangerine f56040ae21 Revert "Update relay-claude.go" 2025-07-30 12:17:56 +08:00
IcedTangerine cfabf2c0d9 Merge pull request #1385 from QingyeSC/patch-1
Update claude topP argument
2025-07-30 00:12:57 +08:00
CaIon efb7c6a15e fix: auto ban v0.8.8.0-alpha.10 2025-07-29 23:08:16 +08:00
CaIon a1caf37f5b fix: auto ban 2025-07-29 15:20:08 +08:00
t0ng7u e0d9a419be Merge remote-tracking branch 'origin/alpha' into alpha 2025-07-28 01:33:36 +08:00
t0ng7u e85bf7b1b0 feat: Enhance Channel Model Management UI
Summary
• Introduced standalone `ModelSelectModal.jsx` for selecting channel models
• Fetch-list now opens modal instead of in-place select, keeping EditChannelModal lean

Modal Features
1. Search bar with `IconSearch`, keyboard clear & mobile full-screen support
2. Tab layout (“New Models” / “Existing Models”) displayed next to title, responsive wrapping
3. Models grouped by vendor via `getModelCategories` and rendered inside always-expanded `Collapse` panels
4. Per-category checkbox in panel extra area for bulk select / deselect
5. Footer checkbox for bulk select of all models in current tab, with real-time counter
6. Empty state uses `IllustrationNoResult` / `IllustrationNoResultDark` for visual consistency
7. Accessible header/footer paddings aligned with Semi UI defaults

Fixes & Improvements
• All indeterminate and full-select states handled correctly
• Consistent “selected X / Y” stats synced with active tab, not global list
• All panels now controlled via `activeKey`, ensuring they remain expanded
• Search, vendor grouping, and responsive layout tested across mobile & desktop

These changes modernise the channel model management workflow and prepare the codebase for upcoming upstream-ratio integration.
2025-07-28 01:33:23 +08:00
CaIon 10f025ea45 fix: increase maximum request count limits for user rate settings 2025-07-27 16:46:34 +08:00
Calcium-Ion a35419c629 Merge pull request #1446 from Raymondxox/fix
模型请求速率限制,增加对请求次数最大值的限制
2025-07-27 16:33:49 +08:00
CaIon 1c5ba67ed3 fix: ensure minimum quota display and handle zero values in render function 2025-07-27 16:32:14 +08:00
Raymond 1bc4c240ed 模型请求速率限制,增加对请求次数最大值的限制 2025-07-27 16:01:59 +08:00
t0ng7u 84fb6eea1f 🗂️ refactor(table): isolate column preferences per role
Summary
• Added role-specific localStorage keys for column visibility in three hooks:
  - `useUsageLogsData.js` → `logs-table-columns-admin` / `logs-table-columns-user`
  - `useMjLogsData.js`   → `mj-logs-table-columns-admin` / `mj-logs-table-columns-user`
  - `useTaskLogsData.js` → `task-logs-table-columns-admin` / `task-logs-table-columns-user`

Details
1. Each hook now derives a `STORAGE_KEY` based on `isAdminUser`, preventing admin and non-admin sessions from overwriting one another’s column settings.
2. Removed the previous “save but strip admin columns” workaround—settings are persisted unmodified to each role’s key.
3. Kept runtime behaviour: non-admin users still see admin-only columns forcibly hidden.
4. Replaced newly added Chinese comments with clear English equivalents for consistency.

Result
Switching between admin and non-admin accounts no longer corrupts column visibility preferences, and codebase comments are fully English-localized.
2025-07-27 09:49:57 +08:00
t0ng7u 90cf9efd6b 🔍 fix: select search filter
Summary
• Introduced a unified `selectFilter` helper that matches both `option.value` and `option.label`, ensuring all `<Select>` components support intuitive search (fixes channel “type” dropdown not filtering).
• Replaced all usages of the old `modelSelectFilter` with `selectFilter` in:
  • `EditChannelModal.jsx`
  • `SettingsPanel.js`
  • `EditTokenModal.jsx`
  • `EditTagModal.jsx`
• Removed the deprecated `modelSelectFilter` export from `utils.js` (no backward-compat alias).
• Updated documentation comments accordingly.

Why
The old filter only inspected `option.value`, causing searches to fail when `label` carried the meaningful text (e.g., numeric IDs for channel types). The new helper searches both fields, covering all scenarios and unifying the API across the codebase.

Notes
No functional regressions expected; all components have been migrated.
2025-07-27 00:01:12 +08:00
t0ng7u bbc3ae6e7b 💄 style(ui): show "Force Format" toggle only for OpenAI channels
Previously, the "Force Format" switch was displayed for every channel type
although it only applies to OpenAI (type === 1).
This change wraps the switch in a conditional so it renders exclusively when
the selected channel type is OpenAI.

Why:
- Prevents user confusion when configuring non-OpenAI channels
- Keeps the UI clean and context-relevant

Scope:
- web/src/components/table/channels/modals/EditChannelModal.jsx

No backend logic affected.
2025-07-26 17:18:47 +08:00
Raymond 94f0751d25 模型请求速率限制,增加对请求次数最大值的限制 2025-07-26 17:09:38 +08:00
Calcium-Ion 31d5e39d2b Merge pull request #1443 from QuantumNous/claude_to_gemini
feat: Claude to gemini (适配claude格式调用gemini渠道模型)
v0.8.8.0-alpha.8
2025-07-26 14:04:47 +08:00
Calcium-Ion 4ce58dbfeb Merge pull request #1437 from Raymondxox/fix
判断兑换码名称长度,改为按字符长度计算
2025-07-26 14:04:02 +08:00
t0ng7u 2356c3fe66 🎨 refactor(ui): redesign channel extra settings section in EditChannelModal
- Extract channel extra settings into a dedicated Card component for better visual hierarchy
- Replace custom gray background container with consistent Form component styling
- Simplify layout structure by removing complex Row/Col grid layout in favor of native Form component layout
- Unify help text styling by using extraText prop consistently across all form fields
- Move "Settings Documentation" link to card header subtitle for better accessibility
- Improve visual consistency with other setting cards by using matching design patterns

The channel extra settings (force format, thinking content conversion, pass-through body, proxy address, and system prompt) now follow the same design language as other configuration sections, providing a more cohesive user experience.

Affected settings:
- Force Format (OpenAI channels only)
- Thinking Content Conversion
- Pass-through Body
- Proxy Address
- System Prompt
2025-07-26 13:33:10 +08:00
CaIon 360012bed2 feat: support claude convert to gemini 2025-07-26 13:31:33 +08:00
Calcium-Ion c4d24e4e37 Merge pull request #1441 from QuantumNous/system_prompt
feat: 支持渠道级透传选项,支持设置渠道系统提示词
v0.8.8.0-alpha.7
2025-07-26 12:16:16 +08:00
CaIon 2cb7b9ae62 fix: improve error messaging and JSON schema handling in distributor and relay components 2025-07-26 12:11:20 +08:00
CaIon f610773455 feat: enhance request handling with pass-through options and system prompt support 2025-07-26 11:39:09 +08:00
CaIon 1adc83e4c9 Merge remote-tracking branch 'origin/alpha' into alpha 2025-07-26 10:43:42 +08:00
Raymond 776402c3f6 判断兑换码名称长度,改为按字符长度计算 2025-07-25 22:40:12 +08:00
t0ng7u 3ea058e0db 🔒 fix: Enforce admin-only column visibility in logs tables
Ensure non-admin users cannot enable columns reserved for administrators
across the following hooks:

* web/src/hooks/usage-logs/useUsageLogsData.js
  - Force-hide CHANNEL, USERNAME and RETRY columns for non-admins.

* web/src/hooks/mj-logs/useMjLogsData.js
  - Force-hide CHANNEL and SUBMIT_RESULT columns for non-admins.

* web/src/hooks/task-logs/useTaskLogsData.js
  - Force-hide CHANNEL column for non-admins.

The checks run when loading column preferences from localStorage, overriding
any tampered settings to keep sensitive information hidden from
unauthorized users.
2025-07-25 20:31:20 +08:00
同語 6426042218 🌟 fix: standardize and improve Playground Chat VIP group functionality
Merge pull request #1424 from feitianbubu/pr/fix-playground-chat-vip-group
2025-07-25 20:18:29 +08:00
CaIon 3243f2296b feat: add upstream error type and default handling for OpenAI and Claude errors 2025-07-25 18:48:59 +08:00
IcedTangerine 0e2ec053f5 Merge pull request #1425 from feitianbubu/pr/add-vidu-video-channel
feat: add vidu video channel
v0.8.8.0-alpha.6
2025-07-24 12:14:04 +08:00
feitianbubu 4378e0f96d feat: add vidu video channel 2025-07-24 10:14:25 +08:00
feitianbubu d10c7a3548 fix: playground chat vip group 2025-07-24 09:38:00 +08:00
CaIon 50a2c2c5a8 feat: support multi-key mode 2025-07-23 22:00:30 +08:00
CaIon 6ddeab2f2f fix(adaptor): enhance response handling and error logging for Claude format 2025-07-23 20:59:56 +08:00
CaIon c73b5886b9 feat: support ollama claude format 2025-07-23 20:01:03 +08:00
CaIon f2e10286c4 fix(adaptor): update relay mode handling #1419 2025-07-23 19:28:58 +08:00
CaIon ec0eb57db0 fix(adaptor): implement request conversion methods for Claude and Image. (close #1419) 2025-07-23 19:09:20 +08:00
CaIon 127d1d692f fix(distributor): add validation for model name in channel selection 2025-07-23 16:46:06 +08:00
CaIon 5418bb3b7c fix: improve error messages for channel retrieval failures in distributor and relay v0.8.8.0-alpha.5 2025-07-23 16:32:52 +08:00