Commit Graph

13 Commits

Author SHA1 Message Date
CaIon
1fededceb3 feat: refactor token estimation logic
- Introduced new OpenAI text models in `common/model.go`.
- Added `IsOpenAITextModel` function to check for OpenAI text models.
- Refactored token estimation methods across various channels to use estimated prompt tokens instead of direct prompt token counts.
- Updated related functions and structures to accommodate the new token estimation approach, enhancing overall token management.
2025-12-02 21:34:39 +08:00
Seefs
dbdcb14e7a feat: embedding param override && internal params 2025-11-22 18:27:17 +08:00
Seefs
5010f2d004 format: package name -> github.com/QuantumNous/new-api (#2017) 2025-10-11 15:30:09 +08:00
Seefs
d075fbee23 fix: missing field & field control 2025-10-02 00:14:35 +08:00
CaIon
552d795742 Merge branch 'alpha' 2025-09-19 14:20:15 +08:00
creamlike1024
f6984272bf fix: openai responses api 未统计图像生成调用计费 2025-09-16 12:47:59 +08:00
Xyfacai
c176e713f7 fix: 非openai 渠道使用 SystemPrompt 设置会panic 2025-09-15 19:38:31 +08:00
CaIon
1a8d781721 Revert "feat: gemini-2.5-flash-image-preview 文本和图片输出计费"
This reverts commit a45513a7a6.
2025-09-13 12:53:28 +08:00
Xyfacai
3f9adc9992 fix: openai 格式请求 claude 没计费 create cache token 2025-09-10 15:30:23 +08:00
creamlike1024
a45513a7a6 feat: gemini-2.5-flash-image-preview 文本和图片输出计费 2025-08-27 21:30:52 +08:00
CaIon
1b8bcfb000 fix: update error types for upstream errors and JSON marshal failure 2025-08-26 16:26:56 +08:00
CaIon
13301d8544 fix: enhance error handling for invalid request types in relay handlers 2025-08-23 13:34:56 +08:00
CaIon
060ce89286 refactor: rename relay-text.go to compatible_handler.go for clarity 2025-08-23 13:13:57 +08:00