Commit Graph

239 Commits

Author SHA1 Message Date
Seefs
5fe8e98eeb fix: default codex and claude channel affinity templates to skip retry on failure 2026-03-19 16:56:28 +08:00
zhongyuan.zhao
202a433f86 feat(waffo): Waffo payment gateway integration with configurable methods
- Add Waffo payment SDK integration (waffo-go v1.3.1)
- Backend: webhook handler, pay endpoint, order lock race-condition fix
- Settings: full Waffo config (API keys, sandbox/prod, currency, pay methods)
- Frontend: Waffo payment buttons in topup page, admin settings panel
- i18n: Waffo-related translations for en/fr/ja/ru/vi/zh-TW

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 18:04:58 +08:00
CaIon
7fc39363d7 feat: enhance Claude request header handling with append functionality 2026-03-09 23:47:51 +08:00
CaIon
c0a0285f74 fix: update language settings and improve model pricing editor for better clarity and functionality 2026-03-06 21:36:51 +08:00
Seefs
329416d67b fix(relay): skip retries for bad response body errors 2026-03-06 18:22:25 +08:00
CaIon
5372d9ba55 fix: add support for gpt-5.4 model in model_ratio.go 2026-03-06 11:43:05 +08:00
CaIon
15b7d1c23e feat: add AionUI to chat settings and built-in templates 2026-03-02 21:19:04 +08:00
CaIon
c1cb03456c feat: add cc-switch integration and modal for token management
- Introduced a new CCSwitchModal component for managing CCSwitch configurations.
- Updated the TokensPage to include functionality for opening the CCSwitch modal.
- Enhanced the useTokensData hook to handle CCSwitch URLs and trigger the modal.
- Modified chat settings to include a new "CC Switch" entry.
- Updated sidebar logic to skip certain links based on the new configuration.
2026-03-01 23:23:20 +08:00
Seefs
8103b4b1a7 Merge pull request #3009 from seefs001/feature/improve-param-override
feat: improve channel override ui/ux
2026-02-28 18:19:40 +08:00
Calcium-Ion
30061f3c2c Merge pull request #3059 from QuantumNous/feat/veo
feat(gemini): implement video generation configuration
2026-02-28 17:55:24 +08:00
CaIon
32d9ae1f83 feat(gemini): implement video generation configuration and billing estimation
- Added Gemini video generation configuration structures and payloads.
- Introduced functions for parsing and resolving video duration and resolution from metadata.
- Enhanced the Vertex adaptor to support Gemini video generation requests and billing estimation based on duration and resolution.
- Updated model pricing settings for new Gemini video models.
2026-02-28 17:37:08 +08:00
Seefs
ff0ecef37d feat: add gemini-3-pro-image-preview/gemini-2.5-flash-image/gemini-3.1-flash-image-preview to supported image presets 2026-02-27 00:44:17 +08:00
Seefs
e027f38244 feat:add CLI param-override templates with visual editor and apply on first rule match 2026-02-25 15:08:23 +08:00
Seefs
50ffa639a2 feat: guard new 504/524 status remaps with risk confirmation 2026-02-22 20:03:46 +08:00
RedwindA
b2898b392a fix: adjust default Gemini cache ratios 2026-02-20 12:28:30 +08:00
CaIon
aed8c07cd7 refactor(ratio): replace maps with RWMap for improved concurrency handling 2026-02-08 00:48:21 +08:00
Seefs
8ef6089bf7 feat: make 5m cache-creation ratio configurable 2026-02-06 19:46:59 +08:00
Calcium-Ion
1bae8928fb Merge commit from fork
fix: harden token search with pagination, rate limiting and input validation
2026-02-06 17:54:40 +08:00
CaIon
327cc5fa23 fix: harden token search with pagination, rate limiting and input validation
- Add configurable per-user token creation limit (max_user_tokens)
- Sanitize search input patterns to prevent expensive queries
- Add per-user search rate limiting (by user ID)
- Add pagination to search endpoint with strict page size cap
- Skip empty search fields instead of matching nothing
- Hide internal errors from API responses
- Fix Interface2String float64 formatting causing config parse failures
- Add float-string fallback in config system for int/uint fields
2026-02-06 17:52:19 +08:00
Papersnake
e194b747c3 feat: support adaptive thinking 2026-02-06 11:01:23 +08:00
Papersnake
7ca072b1b0 feat: add claude-opus-4-6 2026-02-06 09:12:45 +08:00
CaIon
330e1e6395 remove: drop support for claude-2 and claude-1 series models
- Remove claude-instant-1.2, claude-2, claude-2.0, claude-2.1 from model lists
- Remove /v1/complete endpoint support (legacy completion API)
- Remove RequestModeCompletion and related code paths
- Simplify handler functions by removing requestMode parameter
- Update all channel adaptors that referenced claude handlers
2026-02-05 17:20:46 +08:00
CaIon
5e71ef98d9 feat(performance): implement system performance monitoring with configurable thresholds 2026-02-04 21:26:07 +08:00
Seefs
c91d07466f feat: default enable channel affinity 2026-02-02 22:21:49 +08:00
Seefs
f244a9e661 fix: channel affinity (#2799)
* fix: channel affinity log styles

* fix: Issue with incorrect data storage when switching key sources

* feat: support not retrying after a single rule configuration fails

* fix: render channel affinity tooltip as multiline content

* feat: channel affinity cache hit

* fix: prevent ChannelAffinityUsageCacheModal infinite loading and hide data before fetch

* chore: format backend with gofmt and frontend with prettier/eslint autofix
2026-02-02 14:37:31 +08:00
RedwindA
3985d10ae1 feat(gemini): support cached token billing 2026-02-01 22:50:47 +08:00
Calcium-Ion
d7c55b92b2 feat: disk request body cache (#2780)
* feat: 引入通用 HTTP BodyStorage/DiskCache 缓存配置与管理

- 新增 common/body_storage.go 提供 HTTP 请求体存储抽象和文件缓存能力
- 增加 common/disk_cache_config.go 支持全局磁盘缓存配置
- main.go 挂载缓存初始化流程
- 新增和补充 controller/performance.go (及 unix/windows) 用于缓存性能监控接口
- middleware/body_cleanup.go 自动清理缓存文件
- router 挂载相关接口
- 前端 settings 页面新增性能监控设置 PerformanceSetting
- 优化缓存开关状态和模块热插拔能力
- 其他相关文件同步适配缓存扩展

* fix: 修复 BodyStorage 并发安全和错误处理问题

- 修复 diskStorage.Close() 竞态条件,先获取锁再执行 CAS
- 为 memoryStorage 添加互斥锁和 closed 状态检查
- 修复 CreateBodyStorageFromReader 在磁盘存储失败时的回退逻辑
- 添加缓存命中统计调用 (IncrementDiskCacheHits/IncrementMemoryCacheHits)
- 修复 gin.go 中 Seek 错误被忽略的问题
- 在 api-router 添加 BodyStorageCleanup 中间件
- 修复前端 formatBytes 对异常值的处理

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-01-30 01:00:49 +08:00
Seefs
4f6d92ce7b fix: /v1/responses/compact default billing 2026-01-28 14:22:34 +08:00
Seefs
4056e55151 feat: grok Usage Guidelines Violation Fee (#2753)
* feat: grok Usage Guidelines Violation Fee ui setting

* feat: grok Usage Guidelines Violation Fee consume log

* fix: grok Usage Guidelines Violation Fee log detail
2026-01-26 20:20:30 +08:00
Seefs
cf114ca7d6 feat: openai response /v1/response/compact (#2644)
* feat: openai response /v1/response/compact

* feat: /v1/response/compact bill

* feat: /v1/response/compact

* feat: /v1/responses/compact -> codex channel

* feat: /v1/responses/compact -> codex channel

* feat: /v1/responses/compact -> codex channel

* feat: codex channel default models

* feat: compact model price

* feat: /v1/responses/comapct test
2026-01-26 20:20:16 +08:00
Seefs
d9321b7da3 feat: channel affinity (#2669)
* feat: channel affinity

* feat: channel affinity -> model setting

* fix: channel affinity

* feat: channel affinity op

* feat: channel_type setting

* feat: clean

* feat: cache supports both memory and Redis.

* feat: Optimise ui/ux

* feat: Optimise ui/ux

* feat: Optimise codex usage ui/ux

* feat: Optimise ui/ux

* feat: Optimise ui/ux

* feat: Optimise ui/ux

* feat: If the affinitized channel fails and a retry succeeds on another channel, update the affinity to the successful channel
2026-01-26 19:57:41 +08:00
Xyfacai
5609c7f928 feat(qwen): support qwen image sync image model config 2026-01-22 17:46:36 +08:00
Seefs
9a7fa9d139 feat: customizable automatic retry status codes 2026-01-14 14:34:12 +08:00
Seefs
ac04c802a7 Merge pull request #2647 from seefs001/feature/status-code-auto-disable
feat: status code auto-disable configuration
2026-01-12 18:47:45 +08:00
Seefs
71460cba15 feat: /v1/chat/completion -> /v1/response (#2629)
* feat: /v1/chat/completion -> /v1/response
2026-01-11 21:38:07 +08:00
CaIon
d340112ce2 feat(checkin): add check-in functionality with status retrieval and user quota rewards 2026-01-02 23:00:33 +08:00
CaIon
87a75b0565 feat(ratio): add functions to check for audio ratios and clean up unused code 2025-12-31 21:29:10 +08:00
CaIon
7bbb7f8114 feat(model): add audio ratios for new TTS models and adjust default values 2025-12-31 21:22:33 +08:00
Calcium-Ion
15b38adf98 Merge pull request #2460 from seefs001/feature/gemini-flash-minial
fix(gemini): handle minimal reasoning effort budget
2025-12-26 13:57:56 +08:00
Seefs
0edef97413 fix: revert model ratio 2025-12-25 15:37:54 +08:00
Seefs
219b13af70 fix: 模型设置增加针对Vertex渠道过滤content[].part[].functionResponse.id的选项,默认启用 2025-12-21 17:09:49 +08:00
Seefs
39df47486c fix(gemini): handle minimal reasoning effort budget
- Add minimal case to clampThinkingBudgetByEffort to avoid defaulting to full thinking budget
2025-12-18 08:10:46 +08:00
t0ng7u
c2ed76ddfd 🛡️ fix: prevent OOM on large/decompressed requests; skip heavy prompt meta when token count is disabled
Clamp request body size (including post-decompression) to avoid memory exhaustion caused by huge payloads/zip bombs, especially with large-context Claude requests. Add a configurable `MAX_REQUEST_BODY_MB` (default `32`) and document it.

- Enforce max request body size after gzip/br decompression via `http.MaxBytesReader`
- Add a secondary size guard in `common.GetRequestBody` and cache-safe handling
- Return **413 Request Entity Too Large** on oversized bodies in relay entry
- Avoid building large `TokenCountMeta.CombineText` when both token counting and sensitive check are disabled (use lightweight meta for pricing)
- Update READMEs (CN/EN/FR/JA) with `MAX_REQUEST_BODY_MB`
- Fix a handful of vet/formatting issues encountered during the change
- `go test ./...` passes
2025-12-16 17:00:19 +08:00
CaIon
06d1bd404b feat(model_ratio): add default ratios for gpt-4o-mini-tts 2025-12-13 19:14:27 +08:00
CaIon
be2a863b9b feat(audio): enhance audio request handling with token type detection and streaming support 2025-12-13 17:24:23 +08:00
FlowerRealm
a655801017 feat: add claude-haiku-4-5-20251001 model support
- Add model to Claude ModelList
- Add model ratio (0.5, $1/1M input tokens)
- Add completion ratio support (5x, $5/1M output tokens)
- Add cache read ratio (0.1, $0.10/1M tokens)
- Add cache write ratio (1.25, $1.25/1M tokens)

Model specs:
- Context window: 200K tokens
- Max output: 64K tokens
- Release date: October 1, 2025
2025-12-05 18:54:20 +08:00
Seefs
607f7305b7 feat: gemini 3 thinking level gemini-3-pro-preview-high 2025-12-01 16:40:46 +08:00
Seefs
c074ed2eb5 Revert "OAI生图接口支持gemini 3 pro image preview" 2025-11-30 18:49:18 +08:00
feitianbubu
796d62c605 feat: support gemini-3-pro-image-preview via images/generations 2025-11-26 12:03:24 +08:00
Papersnake
766b6bc795 feat: add claude-opus-4-5-20251101 2025-11-25 10:53:01 +08:00