Add protocol selection to Claude and Codex provider forms referencing CCSwitch
This commit is contained in:
1 parent
bae24cc439
commit
16957decb2
14 files changed
+274
-25
No files matched your search
@@ -6,16 +6,18 @@ import "gitea.rutua.cn/kate522/CrossRelay/internal/config"
|
||||
// Preset is a ready-made provider template. Model names reflect each
|
||||
// vendor's catalog as of 2026-10 and can be edited per provider.
|
||||
type Preset struct {
|
||||
Key string `json:"key"`
|
||||
BaseURL string `json:"base_url"`
|
||||
Models config.Models `json:"models"`
|
||||
Key string `json:"key"`
|
||||
BaseURL string `json:"base_url"`
|
||||
Protocol string `json:"protocol,omitempty"`
|
||||
Models config.Models `json:"models"`
|
||||
}
|
||||
|
||||
// All lists the built-in presets.
|
||||
var All = []Preset{
|
||||
{
|
||||
Key: "deepseek",
|
||||
BaseURL: "https://api.deepseek.com/v1",
|
||||
Key: "deepseek",
|
||||
BaseURL: "https://api.deepseek.com/v1",
|
||||
Protocol: config.ProtocolOpenAIChat,
|
||||
Models: config.Models{
|
||||
Default: "deepseek-chat",
|
||||
Sonnet: "deepseek-chat",
|
||||
@@ -25,8 +27,9 @@ var All = []Preset{
|
||||
},
|
||||
},
|
||||
{
|
||||
Key: "moonshot",
|
||||
BaseURL: "https://api.moonshot.cn/v1",
|
||||
Key: "moonshot",
|
||||
BaseURL: "https://api.moonshot.cn/v1",
|
||||
Protocol: config.ProtocolOpenAIChat,
|
||||
Models: config.Models{
|
||||
Default: "kimi-k2-0905-preview",
|
||||
Sonnet: "kimi-k2-0905-preview",
|
||||
@@ -36,8 +39,9 @@ var All = []Preset{
|
||||
},
|
||||
},
|
||||
{
|
||||
Key: "zhipu",
|
||||
BaseURL: "https://open.bigmodel.cn/api/paas/v4",
|
||||
Key: "zhipu",
|
||||
BaseURL: "https://open.bigmodel.cn/api/paas/v4",
|
||||
Protocol: config.ProtocolOpenAIChat,
|
||||
Models: config.Models{
|
||||
Default: "glm-4.6",
|
||||
Sonnet: "glm-4.6",
|
||||
|
||||
Reference in new issue
Block a user