yanggh
b6f352735e
fix(convert): 修复 OpenAI 转 Claude 流时 thinking 块的格式问题
...
将 `ClaudeMediaMessage.Thinking` 的类型从 `string` 修改为 `*string`,以解决 `omitempty` 导致 `"thinking": ""` 字段在 JSON 序列化时被忽略的问题。
同时更新了 `service/convert.go` 和 `relay/channel/claude/relay-claude.go` 中的相关逻辑,以兼容新的指针类型,确保生成的 Claude 事件流符合官方规范。
2025-10-13 19:32:17 +08:00
Seefs
5010f2d004
format: package name -> github.com/QuantumNous/new-api ( #2017 )
2025-10-11 15:30:09 +08:00
CaIon
35105b3da5
feat: update Gemini API response handling to include block reason and improve error reporting
2025-10-05 19:33:47 +08:00
wzxjohn
c2e49f2b2a
fix(adaptor): missing first text delta while convert OpenAI to Claude
2025-08-13 09:57:06 +08:00
CaIon
ce74e94fc7
✨ feat: Refactor Gemini tools handling to support JSON raw message format
2025-08-11 19:48:04 +08:00
CaIon
5b5b97eb30
feat: 完善格式抓换,修复gemini渠道和openai渠道在claude code中使用的问题
2025-08-08 16:45:37 +08:00
CaIon
f69a4f7153
feat: enhance request handling to support tool calls and improve stream options
2025-08-08 13:47:39 +08:00
CaIon
b8b59a134e
feat: support deepseek claude format (convert)
2025-08-07 19:01:49 +08:00
creamlike1024
689dbfe71a
feat: convert gemini format to openai chat completions
2025-08-01 22:23:35 +08:00
CaIon
563d056ff7
refactor: update error handling to support dynamic error types
Publish Docker image (Multi Registries) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled
2025-07-31 21:16:01 +08:00
CaIon
6ddeab2f2f
fix(adaptor): enhance response handling and error logging for Claude format
2025-07-23 20:59:56 +08:00
CaIon
4a9ca4209a
refactor: Introduce standardized API error
...
This commit refactors the application's error handling mechanism by introducing a new standardized error type, `types.NewAPIError`. It also renames common JSON utility functions for better clarity.
Previously, internal error handling was tightly coupled to the `dto.OpenAIError` format. This change decouples the internal logic from the external API representation.
Key changes:
- A new `types.NewAPIError` struct is introduced to serve as a canonical internal representation for all API errors.
- All relay adapters (OpenAI, Claude, Gemini, etc.) are updated to return `*types.NewAPIError`.
- Controllers now convert the internal `NewAPIError` to the client-facing `OpenAIError` format at the API boundary, ensuring backward compatibility.
- Channel auto-disable/enable logic is updated to use the new standardized error type.
- JSON utility functions are renamed to align with Go's standard library conventions (e.g., `UnmarshalJson` -> `Unmarshal`, `EncodeJson` -> `Marshal`).
2025-07-10 15:02:40 +08:00
CaIon
f14f4eaf1a
✨ feat: refactor environment variable initialization and introduce new constant types for API and context keys
2025-07-03 13:10:25 +08:00
neotf
c787f59822
Merge branch 'main' into feat-04
2025-06-18 15:20:24 +08:00
CaIon
c4e652461e
🔧 refactor(dto): update BudgetTokens handling in Thinking struct
2025-06-16 18:29:49 +08:00
neotf
1ce5c34703
Merge branch 'main' into feat-04
2025-06-05 20:35:47 +08:00
neotf
a813b24184
feat: support claude cache and thinking for upstream [OpenRouter] ( #983 )
...
* feat: support claude cache for upstream [OpenRouter]
* feat: support claude thinking for upstream [OpenRouter]
* feat: reasoning is common params for OpenRouter
2025-06-05 17:35:48 +08:00
neotf
c0df38767c
feat: enhance token usage details for upstream OpenRouter
2025-05-29 00:55:57 +08:00
neotf
935cc1c605
fix: wrong systemStr for Claude (OpenAI Upstream)
2025-04-14 01:09:02 +08:00
CaIon
74d9bb1a12
feat: enhance Claude to OpenAI request conversion with additional relay info support
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
Publish Docker image (arm64) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled
2025-04-11 19:13:38 +08:00
CaIon
9e4506ebaf
feat: 完善openai转claude支持
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
Publish Docker image (arm64) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled
2025-04-11 18:28:50 +08:00
1808837298@qq.com
47c297794d
feat: 初步兼容流模式下openai渠道类型转为claude格式访问 #862
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
2025-03-13 19:32:08 +08:00
1808837298@qq.com
78fc3a191c
feat: claude relay
2025-03-12 21:31:46 +08:00