Commit Graph

969 Commits

Author SHA1 Message Date
RedwindA
fb428ee9c0 fix(jina): remove encoding_format for jina embedding 2025-10-01 02:06:30 +08:00
CaIon
121e01c764 fix(adaptor): update relay mode handling to support relay format 2025-09-30 16:53:57 +08:00
Seefs
08b424a35e Merge pull request #1817 from wzxjohn/hotfix/relay_vertex_claude
fix(relay): wrong URL for claude model in GCP Vertex AI
2025-09-30 11:27:15 +08:00
Seefs
853814045a Merge pull request #1925 from seefs001/feature/claude-context-editing
feat: claude context editing
2025-09-30 09:48:32 +08:00
Seefs
bc1971843d Merge pull request #1926 from seefs001/fix/claude-beta
fix: claude beta=true
2025-09-30 09:48:18 +08:00
Seefs
946da49721 fix: claude beta=true 2025-09-30 09:46:46 +08:00
Seefs
740c46102b Merge pull request #1924 from prnake/claude-4-5
feat: support claude-sonnet-4-5-20250929
2025-09-30 09:26:34 +08:00
Seefs
a7f6065f42 feat: claude context editing 2025-09-30 09:22:40 +08:00
papersnake
112ab0b17c feat: support claude-sonnet-4-5-20250929 2025-09-30 09:14:12 +08:00
t0ng7u
8294a76bc2 💱 feat(settings): introduce site-wide quota display type (USD/CNY/TOKENS/CUSTOM)
Replace the legacy boolean “DisplayInCurrencyEnabled” with an injected, type-safe
configuration `general_setting.quota_display_type`, and wire it through the
backend and frontend.

Backend
- Add `QuotaDisplayType` to `operation_setting.GeneralSetting` with injected
  registration via `config.GlobalConfig.Register("general_setting", ...)`.
  Helpers: `IsCurrencyDisplay()`, `IsCNYDisplay()`, `GetQuotaDisplayType()`.
- Expose `quota_display_type` in `/api/status` and keep legacy
  `display_in_currency` for backward compatibility.
- Logger: update `LogQuota` and `FormatQuota` to support USD/CNY/TOKENS. When
  CNY is selected, convert using `operation_setting.USDExchangeRate`.
- Controllers:
  - `billing`: compute subscription/usage amounts based on the selected type
    (USD: divide by `QuotaPerUnit`; CNY: USD→CNY; TOKENS: keep raw tokens).
  - `topup` / `topup_stripe`: treat inputs as “amount” for USD/CNY and as
    token-count for TOKENS; adjust min topup and pay money accordingly.
  - `misc`: include `quota_display_type` in status payload.
- Compatibility: in `model/option.UpdateOption`, map updates to
  `DisplayInCurrencyEnabled` → `general_setting.quota_display_type`
  (true→USD, false→TOKENS). Keep exporting the legacy key in `OptionMap`.

Frontend
- Settings: replace the “display in currency” switch with a Select
  (`general_setting.quota_display_type`) offering USD / CNY / Tokens.
  Provide fallback mapping from legacy `DisplayInCurrencyEnabled`.
- Persist `quota_display_type` to localStorage (keep `display_in_currency`
  for legacy components).
- Rendering helpers: base all quota/price rendering on `quota_display_type`;
  use `usd_exchange_rate` for CNY symbol/values.
- Pricing page: default view currency follows site display type (USD/CNY),
  while TOKENS mode still allows per-view currency toggling when needed.

Notes
- No database migrations required.
- Legacy clients remain functional via compatibility fields.
2025-09-29 23:23:31 +08:00
Seefs
60045cdceb fix: submodel adapter 2025-09-29 21:55:34 +08:00
dd
40a6d957b5 Merge branch 'QuantumNous:main' into main 2025-09-29 14:13:50 +08:00
Seefs
343d8091fc Merge branch 'main-upstream' into fix/volcengine_default_baseurl
# Conflicts:
#	main.go
2025-09-29 12:08:52 +08:00
Calcium-Ion
1ba2cb0b92 Merge pull request #1897 from QuantumNous/openrouter-enterprise
feat: 添加 openrouter-enterprise 支持
2025-09-28 15:31:01 +08:00
CaIon
6f8edd49c4 fix: streamline error handling in OpenRouter response processing 2025-09-28 15:29:01 +08:00
CaIon
6682842cbb feat: enhance OpenRouter enterprise support with new settings and response handling 2025-09-28 15:23:27 +08:00
Calcium-Ion
42a29e485e Merge pull request #1811 from somnifex/main
refactor: 重构ollama渠道
2025-09-28 14:30:45 +08:00
Calcium-Ion
4bbd59c740 Merge pull request #1836 from joesonshaw/main
fix(relay-xunfei): 修复讯飞渠道无法使用问题 #1740
2025-09-28 01:17:22 +08:00
Seefs
23c1bd472e feat: gemini urlContext 2025-09-27 16:16:34 +08:00
huanghejian
d1f590aa7b pref: 优化代码 2025-09-27 15:19:54 +08:00
huanghejian
690d103021 feat: volcengine支持自定义域名 2025-09-27 09:35:03 +08:00
huanghejian
a069d03ef7 feat: amazon nova model 2025-09-26 15:55:00 +08:00
huanghejian
5545e70a42 feat: amazon nova model 2025-09-26 15:32:59 +08:00
joesonshaw
04848bd28b Merge branch 'QuantumNous:main' into main 2025-09-19 23:31:43 +08:00
feitianbubu
b183f2f663 feat: vidu video add starEnd and reference gen video 2025-09-19 18:54:45 +08:00
feitianbubu
22db389fac feat: vidu video support multi images 2025-09-19 18:54:40 +08:00
CaIon
552d795742 Merge branch 'alpha' 2025-09-19 14:20:15 +08:00
wzxjohn
237f599422 fix(relay): wrong key param while enable sse 2025-09-19 11:22:03 +08:00
joesonshaw
241b92b28e fix(relay-xunfei): 修复讯飞渠道无法使用问题 #1740
将连接延迟关闭逻辑调整到协程中执行,防止在完全接收到所有数据前提前关闭
2025-09-19 10:49:47 +08:00
creamlike1024
5cae6be108 feat: 支持 gemini-embedding-001 2025-09-19 00:24:01 +08:00
Seefs
e81e2ee3f2 Merge pull request #1833 from seefs001/feature/deepseek-claude-code
fix: deepseek claude response
2025-09-18 16:37:51 +08:00
Seefs
d4fc4f280e feat: deepseek claude endpoint 2025-09-18 16:32:29 +08:00
Calcium-Ion
ec4d2de47e Merge pull request #1832 from seefs001/feature/deepseek-claude-code
feat: deepseek claude endpoint
2025-09-18 16:30:01 +08:00
Seefs
06ccdcbaa4 feat: deepseek claude endpoint 2025-09-18 16:19:44 +08:00
Seefs
7077756241 fix: kimi claude code 2025-09-18 16:14:25 +08:00
wzxjohn
da54561b36 fix(relay): wrong URL for claude model in GCP Vertex AI 2025-09-16 17:18:32 +08:00
Xyfacai
9fa9cf38c2 feat: jimeng kling 支持new api 嵌套中转 2025-09-16 16:28:27 +08:00
huanghejian
f56783c4eb Merge branch 'main' into fix/volcengine-image-model 2025-09-16 14:58:59 +08:00
huanghejian
97755c2e94 fix: VolcEngine doubao-seedream-4-0-250828 2025-09-16 14:30:12 +08:00
creamlike1024
f6984272bf fix: openai responses api 未统计图像生成调用计费 2025-09-16 12:47:59 +08:00
somnifex
05241aea92 fix: 修复ollamaChatHandler中ReasoningContent字段的赋值逻辑 2025-09-16 08:54:34 +08:00
somnifex
414b959e65 fix: 添加对Thinking字段的处理逻辑,确保推理内容正确传递 2025-09-16 08:51:29 +08:00
somnifex
b80811a412 fix: 修复图像URL处理逻辑,确保正确生成base64数据 2025-09-16 08:13:28 +08:00
somnifex
f57c539a1f fix: 修复ollamaChatHandler中的FinishReason字段赋值逻辑 2025-09-15 23:43:39 +08:00
somnifex
a1f79761cf refactor: 简化请求转换函数和流处理逻辑 2025-09-15 23:41:09 +08:00
somnifex
a9354df549 fix: 优化ollamaStreamHandler中的停止和最终使用响应逻辑 2025-09-15 23:23:53 +08:00
somnifex
503a2669d5 refactor: 更新请求转换逻辑,优化工具调用解析 2025-09-15 23:15:46 +08:00
somnifex
cdf0c9dae4 fix: 优化ollamaChatStreamChunk结构体字段格式 2025-09-15 23:09:10 +08:00
somnifex
767d46e829 feat: 重构ollama渠道请求 2025-09-15 23:01:14 +08:00
feitianbubu
cf446438ed feat: jimeng video 3.0 req_key convert 2025-09-15 15:54:13 +08:00