Commit Graph

243 Commits

Author SHA1 Message Date
CaIon
6f818574ab fix: improve error message for unsupported image generation models 2026-03-04 00:36:03 +08:00
Seefs
2cf3c1836c fix: preserve explicit zero values in native relay requests 2026-03-01 15:47:03 +08:00
Seefs
c97f4524f2 fix: unify usage mapping and include toolUsePromptTokenCount in input tokens 2026-02-17 15:45:14 +08:00
CaIon
92aca9771f feat: refactor extra_body handling for improved configuration parsing 2026-02-11 22:15:22 +08:00
Seefs
99928bcfde fix: charge local input tokens when Gemini returns empty response 2026-02-05 15:57:17 +08:00
CaIon
ffef331192 refactor(gemini): remove GeminiVisionMaxImageNum constant and related image count logic 2026-02-04 19:10:06 +08:00
CaIon
9ef9e78821 feat(file): unify file handling with a new FileSource abstraction for URL and base64 data 2026-02-04 18:23:17 +08:00
thirking
4108c404ee fix: remove unnecessary unescapeMapOrSlice call in Gemini relay
The JSON serialization/deserialization already handles escape characters
correctly, so the unescapeMapOrSlice function is redundant.
2026-02-03 11:47:45 +08:00
RedwindA
3985d10ae1 feat(gemini): support cached token billing 2026-02-01 22:50:47 +08:00
RedwindA
9899073ecb feat(gemini): map OpenAI stop to Gemini stopSequences 2026-01-29 21:30:27 +08:00
Seefs
68e1e635e9 feat: logs show reject reason 2026-01-25 14:52:18 +08:00
Seefs
7af4d07843 fix: Charge locally even if there's an error 2026-01-25 14:32:51 +08:00
Seefs
c09c272574 Merge branch 'upstream-main' into fix/pr-2540
# Conflicts:
#	relay/channel/gemini/relay-gemini.go
2026-01-25 14:14:05 +08:00
Calcium-Ion
3f208ee365 Merge pull request #2701 from seefs001/fix/gemini-tool-call-index
fix: calls to multiple tools in gemini all return index=0
2026-01-21 23:47:48 +08:00
Seefs
7e90c832e2 fix: issue where consecutive calls to multiple tools in gemini all returned an index of 0 2026-01-20 22:03:19 +08:00
Seefs
d694a197d2 fix: openAI function to gemini function field adjusted to whitelist mode 2026-01-15 13:26:42 +08:00
Seefs
14b3dac82c fix: clean propertyNames for gemini function 2026-01-11 23:34:18 +08:00
RedwindA
db96248c5b refactor(gemini): 更新 GeminiModelsResponse 以使用 dto.GeminiModel 类型 2026-01-09 18:08:11 +08:00
RedwindA
e8eea5d3ee fix(gemini): fetch model list via native v1beta/models endpoint
Use the native Gemini Models API (/v1beta/models) instead of the OpenAI-compatible
path when listing models for Gemini channels, improving compatibility with
third-party Gemini-format providers that don't implement OpenAI routes.

- Add paginated model listing with timeout and optional proxy support
- Select an enabled key for multi-key Gemini channels
2026-01-09 18:00:40 +08:00
Xyfacai
eeccb2146f fix: 修复 gemini 文件类型不支持 image/jpg 2026-01-04 22:09:03 +08:00
Your Name
9c243d1fb8 feat(gemini): 支持 tool_choice 参数转换,优化错误处理 2025-12-27 18:33:09 +08:00
RedwindA
518563c7eb feat: map OpenAI developer role to Gemini system instructions 2025-12-27 02:52:33 +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
CaIon
7d586ef507 fix(helper): improve error handling in FlushWriter and related functions 2025-12-13 13:29:21 +08:00
Calcium-Ion
4c54836a53 Merge pull request #2344 from seefs001/feature/gemini-thinking-level
feat: gemini 3 thinking level gemini-3-pro-preview-high
2025-12-02 21:55:43 +08:00
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
CaIon
e19e9ad2fa feat(gemini): implement markdown image handling in text processing 2025-12-01 17:54:41 +08:00
Seefs
607f7305b7 feat: gemini 3 thinking level gemini-3-pro-preview-high 2025-12-01 16:40:46 +08:00
CaIon
5d05cd9d32 feat(gemini): add validation and conversion for imageConfig parameters in extra_body 2025-11-30 19:31:08 +08:00
Seefs
c074ed2eb5 Revert "OAI生图接口支持gemini 3 pro image preview" 2025-11-30 18:49:18 +08:00
Calcium-Ion
8c5c944fd6 Merge pull request #2339 from QuantumNous/revert-2330-pr/fix-nano-banana-err
Revert "fix: nano-banana not compatible imageSize"
2025-11-30 18:48:09 +08:00
Calcium-Ion
d33e4c8d35 Merge pull request #2338 from QuantumNous/revert-2321-pr/gemini-image-edit
Revert "Gemini Image系列支持图像编辑"
2025-11-30 18:48:01 +08:00
Seefs
4c8287411e Revert "fix: nano-banana not compatible imageSize" 2025-11-30 18:46:10 +08:00
Seefs
b827d1f778 Revert "Gemini Image系列支持图像编辑" 2025-11-30 18:45:54 +08:00
Seefs
2fb1fa08d2 Revert "fix: gemini image correct generationConfig" 2025-11-30 18:45:23 +08:00
feitianbubu
3901781068 fix: nano-banana not compatible imageSize 2025-11-29 00:58:25 +08:00
feitianbubu
fb55d56089 feat: gemini image support edit 2025-11-27 16:04:04 +08:00
feitianbubu
156229ce92 fix: gemini image correct generationConfig 2025-11-26 15:54:11 +08:00
feitianbubu
2d6f8fb58f feat: gemini-3-pro-image-preview add extra param 2025-11-26 12:03:24 +08:00
feitianbubu
796d62c605 feat: support gemini-3-pro-image-preview via images/generations 2025-11-26 12:03:24 +08:00
Claude
7645300f96 feat: enable thoughtSignature for non-function-call messages
Previously thoughtSignature was only attached to messages with function
calls. This change extends the feature to also attach thoughtSignature
to the first text part of assistant/model messages when no tool_calls
are present, ensuring compatibility with Gemini thinking models in
regular conversation scenarios.
2025-11-24 00:31:20 +00:00
CaIon
89709dfa74 feat: Set ContextKeyLocalCountTokens in NativeGeminiEmbeddingHandler for token tracking 2025-11-23 23:50:04 +08:00
CaIon
ed3858ada7 refactor: Deprecate HARM_CATEGORY_CIVIC_INTEGRITY in safety settings 2025-11-23 23:45:48 +08:00
CaIon
c8bbf7bed8 feat: Add ContextKeyLocalCountTokens and update ResponseText2Usage to use context in multiple channels 2025-11-21 18:17:01 +08:00
Seefs
4ac4849ab6 feat: Fill thoughtSignature only for Gemini/Vertex channels using the OpenAI format 2025-11-20 15:54:33 +08:00
Seefs
89a6303032 feat: gemini-3-pro 2025-11-19 01:46:51 +08:00
Seefs
fd55ba7f2c feat: ShouldPreserveThinkingSuffix (#2189) 2025-11-07 17:43:33 +08:00
CaIon
7391b15b4b fix: remove redundant error handling for empty Gemini API response 2025-10-13 21:58:50 +08:00
CaIon
063926dd29 fix: update error messages for unsupported parameter names in Google extra body 2025-10-12 22:21:45 +08:00
Seefs
5010f2d004 format: package name -> github.com/QuantumNous/new-api (#2017) 2025-10-11 15:30:09 +08:00