Commit Graph

890 Commits

Author SHA1 Message Date
CaIon
8d05e44f61 Merge remote-tracking branch 'origin/alpha' into alpha 2025-06-18 20:51:06 +08:00
CaIon
17f3832487 feat(relay): add debug logging for Gemini request body and introduce flexible speech configuration 2025-06-18 20:50:13 +08:00
neotf
685a65c722 format 2025-06-18 19:54:20 +08:00
Apple\Apple
175ea56fdd 🚚 Refactor(ratio_setting): refactor ratio management into standalone ratio_setting package
Summary
• Migrated all ratio-related sources into `setting/ratio_setting/`
  – `model_ratio.go` (renamed from model-ratio.go)
  – `cache_ratio.go`
  – `group_ratio.go`
• Changed package name to `ratio_setting` and relocated initialization (`ratio_setting.InitRatioSettings()` in main).
• Updated every import & call site:
  – Model / cache / completion / image ratio helpers
  – Group ratio helpers (`GetGroupRatio*`, `ContainsGroupRatio`, `CheckGroupRatio`, etc.)
  – JSON-serialization & update helpers (`*Ratio2JSONString`, `Update*RatioByJSONString`)
• Adjusted controllers, middleware, relay helpers, services and models to reference the new package.
• Removed obsolete `setting` / `operation_setting` imports; added missing `ratio_setting` imports.
• Adopted idiomatic map iteration (`for key := range m`) where value is unused.
• Ran static checks to ensure clean build.

This commit centralises all ratio configuration (model, cache and group) in one cohesive module, simplifying future maintenance and improving code clarity.
2025-06-18 18:00:49 +08:00
neotf
ecacff87ad Update relay/channel/openai/adaptor.go
use review's suggestion

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-18 15:29:19 +08:00
neotf
c787f59822 Merge branch 'main' into feat-04 2025-06-18 15:20:24 +08:00
xqx121
2541defbf4 Update relay-gemini-native.go 2025-06-18 14:26:23 +08:00
sgyy
302ca0b847 fix: Vertex channel global region format 2025-06-18 11:21:56 +08:00
RedwindA
9bc9d40891 feat(gemini): update audio input pricing and adjust model handling logic 2025-06-18 03:25:59 +08:00
RedwindA
a004db93c9 feat(Gemini): enhance budget clamping logic for Gemini models 2025-06-18 00:49:35 +08:00
CaIon
36a0d4d7ae fix(relay): ensure consistent setting of web search context size in TextHelper function 2025-06-18 00:37:22 +08:00
CaIon
d4e20df7a6 fix(relay): refine error message for unsupported MIME types and enhance error handling in OpenAI wrapper 2025-06-17 22:44:57 +08:00
CaIon
8d0b54bf6e fix(relay): improve error handling for unsupported MIME types by sanitizing URLs 2025-06-17 22:40:41 +08:00
Calcium-Ion
129d1b081f Merge pull request #1239 from QuantumNous/auto_group
feat: auto分组
2025-06-17 21:14:09 +08:00
CaIon
4ec7012974 feat: enhance group ratio handling in pricing calculations 2025-06-17 21:05:35 +08:00
CaIon
4238068c65 feat(channel): enhance Claude response handling with new Done flag and improved usage tracking 2025-06-17 20:08:25 +08:00
CaIon
2a1ed60738 Merge branch 'alpha' 2025-06-17 14:49:13 +08:00
chenjm
ab5dfd8d97 fix(audio): :bugs: fix webm audio strconv.ParseFloat: parsing "N/A" 2025-06-17 10:04:36 +08:00
chenjm
99dacb1d4b fix(audio): :bugs: fix webm audio strconv.ParseFloat: parsing "N/A" 2025-06-17 09:21:56 +08:00
CaIon
28a0eb2a6d Merge remote-tracking branch 'origin/alpha' into alpha 2025-06-17 00:09:38 +08:00
CaIon
af103dcc7f 🧹 chore(relay): remove unused import in relay-palm.go 2025-06-17 00:09:26 +08:00
Calcium-Ion
71fe637d2a Merge pull request #1231 from RedwindA/feat/gemini-budget-in-name
feat(Gemini): implement thinking budget control in model name
2025-06-17 00:03:53 +08:00
creamlike1024
c6a9df67b1 feat: auto分组 2025-06-16 22:15:12 +08:00
CaIon
288f279379 🔧 refactor(relay): replace UUID generation with helper function for response IDs 2025-06-16 21:02:27 +08:00
Calcium-Ion
bd82e7c341 Merge pull request #1205 from a37836323/fix-azure-responses-api
修复Azure渠道对responses API的兼容性支持 - 为Azure渠道添加对responses API的特殊处理 - 兼容微软新…
2025-06-16 19:17:21 +08:00
CaIon
c4e652461e 🔧 refactor(dto): update BudgetTokens handling in Thinking struct 2025-06-16 18:29:49 +08:00
Papersnake
d8790963ae feat: openrouter format for claude request 2025-06-16 17:43:39 +08:00
RedwindA
1e1a6aae55 feat: implement thinking budget control in model name 2025-06-15 23:20:41 +08:00
RedwindA
66ffccf164 💬 fix(GeminiHelper): clean up empty system instructions in request 2025-06-14 19:36:58 +08:00
Calcium-Ion
158d621fd7 Merge pull request #1207 from QuantumNous/user_group_ratio
feat: 分组特殊倍率
2025-06-13 01:25:46 +08:00
creamlike1024
2a0bf7f991 feat: 分组特殊倍率 2025-06-11 23:46:59 +08:00
a37836323
a126015940 修复Azure渠道对responses API的兼容性支持 - 为Azure渠道添加对responses API的特殊处理 - 兼容微软新的API格式,使用preview版本的api-version - 修复了Azure渠道无法正确处理responses请求的问题 2025-06-11 22:11:47 +08:00
neotf
1cff048cb7 Merge branch 'main' into feat-04 2025-06-11 13:55:47 +08:00
CaIon
5511ba3670 🔧 fix(stream_scanner): improve resource management and error handling in StreamScannerHandler 2025-06-11 00:18:16 +08:00
CaIon
92de4d0d04 🔧 fix(api_request): enhance ping keep-alive mechanism with error handling and timeout controls 2025-06-10 03:42:23 +08:00
IcedTangerine
6d90b2f3dc Merge pull request #1145 from RedwindA/feature/gemini_snake_case_support
feat: 支持Gemini inline_data 的蛇形命名法
2025-06-09 22:06:58 +08:00
Calcium-Ion
f95feae571 Merge pull request #1180 from RedwindA/fix/gemini-tool
🐛 fix(Gemini): improve JSON parsing for tool content handling
2025-06-09 20:51:28 +08:00
RedwindA
07a671ec27 🐛 fix: update condition to check for empty content in assistant role messages 2025-06-09 02:15:39 +08:00
CaIon
2fb222b9a4 refactor(dto): change function and encoding fields to use json.RawMessage for improved flexibility 2025-06-08 16:28:47 +08:00
CaIon
2b3e64e8b6 fix(relay-channel): correct condition for mediaMessages initialization in requestOpenAI2Mistral function 2025-06-08 16:25:00 +08:00
CaIon
fcb9647aeb fix(relay-gemini): remove outdated unsupported models from CovertGemini2OpenAI function 2025-06-08 16:22:39 +08:00
Calcium-Ion
5d7e688bfe Merge pull request #1174 from QuantumNous/refactor/message
refactor: message content 改成 any
2025-06-08 16:22:20 +08:00
CaIon
7469446a20 fix(relay-gemini): add unsupported models to CovertGemini2OpenAI function 2025-06-08 16:04:31 +08:00
RedwindA
da41545139 🐛 fix(Gemini): improve JSON parsing for tool content handling 2025-06-08 14:35:56 +08:00
Calcium-Ion
7607da2387 Merge pull request #1177 from QuantumNous/alpha
merge alpha to main
2025-06-08 02:26:06 +08:00
Calcium-Ion
258bad0a17 Merge pull request #1173 from RedwindA/fix/ali-embedding
🐛 fix(ali): Remove hardcoding of embedding model names.
2025-06-08 00:14:55 +08:00
RedwindA
546d0140d3 🐛 fix(mistral): validate and generate new IDs for tool calls and tool call IDs; Correctly handle null content for assistant messages with tool_calls. 2025-06-08 00:06:56 +08:00
Xyfacai
8343fe0740 refactor: message content 改成 any
refactor: message content 改成 any
2025-06-07 23:47:22 +08:00
RedwindA
7671f82ab6 🐛 fix(ali): Remove hardcoding of embedding model names. 2025-06-07 22:28:32 +08:00
RedwindA
b8cfb64a45 feat: ali rerank 2025-06-07 21:29:46 +08:00