papersnake
47d7bca268
feat: support claude-opus-4-7 ( #4293 )
...
* feat: support claude-opus-4-7
* feat: summarized display for opus 4.7
2026-04-17 13:52:34 +08:00
Seefs
f7adf02eb4
feat(claude): add cache_control and speed passthrough controls ( #4247 )
2026-04-15 20:55:01 +08:00
CaIon
03758a4a85
refactor(file-source): unify file source creation and enhance caching mechanisms
2026-04-06 15:54:55 +08:00
Nekohy
a4629f2630
feats: repair the thinking of claude to openrouter convert
2026-03-05 06:12:48 +08:00
Seefs
ad326beb10
Merge pull request #3066 from seefs001/fix/aws-header-override
...
Fix/aws header override
2026-03-02 18:54:56 +08:00
Seefs
2cf3c1836c
fix: preserve explicit zero values in native relay requests
2026-03-01 15:47:03 +08:00
Seefs
bb7ad0ce15
feat: gate Claude inference_geo passthrough behind channel setting and add field docs
2026-02-21 14:25:58 +08:00
Seefs
4746b2bf9f
feat: add missing OpenAI/Claude/Gemini request fields and responses stream options
2026-02-19 14:16:07 +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
Seefs
8daea6e7ee
fix: claude request missing field
2025-11-26 02:06:25 +08:00
Seefs
e1b9317531
feat: claude 1h cache ( #2155 )
...
* feat: claude 1h cache
* feat: claude 1h cache
* fix price
2025-11-04 00:20:50 +08:00
CaIon
1fdb54651b
feat: 临时兼容aws使用链接媒体
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Build Electron App / build (windows-latest) (push) Has been cancelled
Build Electron App / release (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
2025-10-15 18:21:19 +08:00
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
Seefs
d075fbee23
fix: missing field & field control
2025-10-02 00:14:35 +08:00
Seefs
a7f6065f42
feat: claude context editing
2025-09-30 09:22:40 +08:00
CaIon
1b8bcfb000
fix: update error types for upstream errors and JSON marshal failure
Publish Docker image (Multi Registries) / Push Docker image to multiple registries (push) Has been cancelled
2025-08-26 16:26:56 +08:00
CaIon
1ee3d1cc50
feat: 修复重试后请求结构混乱,修复rerank端点无法使用
2025-08-23 13:12:15 +08:00
CaIon
77b100ba2b
refactor: update function signatures to include context and improve file handling #1599
Publish Docker image (Multi Registries) / Push Docker image to multiple registries (push) Has been cancelled
2025-08-15 18:40:54 +08:00
CaIon
07137e6bb8
refactor: update token type handling and improve token counting logic
2025-08-15 13:28:03 +08:00
CaIon
97ea8b6560
refactor: Introduce pre-consume quota and unify relay handlers
...
This commit introduces a major architectural refactoring to improve quota management, centralize logging, and streamline the relay handling logic.
Key changes:
- **Pre-consume Quota:** Implements a new mechanism to check and reserve user quota *before* making the request to the upstream provider. This ensures more accurate quota deduction and prevents users from exceeding their limits due to concurrent requests.
- **Unified Relay Handlers:** Refactors the relay logic to use generic handlers (e.g., `ChatHandler`, `ImageHandler`) instead of provider-specific implementations. This significantly reduces code duplication and simplifies adding new channels.
- **Centralized Logger:** A new dedicated `logger` package is introduced, and all system logging calls are migrated to use it, moving this responsibility out of the `common` package.
- **Code Reorganization:** DTOs are generalized (e.g., `dalle.go` -> `openai_image.go`) and utility code is moved to more appropriate packages (e.g., `common/http.go` -> `service/http.go`) for better code structure.
2025-08-14 20:05:06 +08:00
CaIon
5b5b97eb30
feat: 完善格式抓换,修复gemini渠道和openai渠道在claude code中使用的问题
2025-08-08 16:45:37 +08:00
CaIon
b8b59a134e
feat: support deepseek claude format (convert)
2025-08-07 19:01:49 +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
Calcium-Ion
a1609f36c7
Merge pull request #1384 from QuantumNous/RequestOpenAI2ClaudeMessage
...
feat: 改进 RequestOpenAI2ClaudeMessage 和添加 claude web search 计费
2025-07-17 19:15:54 +08:00
creamlike1024
e351642db9
feat: claude web search tool 计费
2025-07-15 18:57:22 +08:00
creamlike1024
aeca676d55
feat: RequestOpenAI2ClaudeMessage add more parms map
2025-07-15 12:38:05 +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
c4e652461e
🔧 refactor(dto): update BudgetTokens handling in Thinking struct
2025-06-16 18:29:49 +08:00
Xyfacai
8343fe0740
refactor: message content 改成 any
...
refactor: message content 改成 any
2025-06-07 23:47:22 +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
CaIon
3169bfe362
refactor: update ClaudeMessageSource struct to include optional Url field and adjust media source handling in relay-claude #993
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-24 00:39:09 +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
9b85cb2371
refactor: Update ClaudeResponse error handling to use pointer for ClaudeError and improve nil checks in response processing
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-03-16 23:14:45 +08:00
1808837298@qq.com
62dc82638d
feat: Introduce JSON decoding utility functions and update error handling in Claude and OpenAI response structures
2025-03-16 18:34:39 +08:00
1808837298@qq.com
b869cec78b
refactor: Change ClaudeError field type to non-pointer and enhance response handling with reasoning content
2025-03-14 17:48:26 +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