From 52f4cb2f3706918e6247d636ad7153fd049cd86a Mon Sep 17 00:00:00 2001 From: Robert Palm Date: Tue, 3 Mar 2026 11:59:01 +0100 Subject: [PATCH 1/3] Add Alibaba coding-plan provider Adds a new Alibaba provider config and registers it in the provider registry.\n\n- add internal/providers/configs/alibaba.json\n- register provider embed+factory in internal/providers/providers.go\n- add InferenceProviderAlibaba to known providers\n\nRefs #200 --- internal/providers/configs/alibaba.json | 163 ++++++++++++++++++++++++ internal/providers/providers.go | 8 ++ pkg/catwalk/provider.go | 3 + 3 files changed, 174 insertions(+) create mode 100644 internal/providers/configs/alibaba.json diff --git a/internal/providers/configs/alibaba.json b/internal/providers/configs/alibaba.json new file mode 100644 index 00000000..5ccf0615 --- /dev/null +++ b/internal/providers/configs/alibaba.json @@ -0,0 +1,163 @@ +{ + "name": "Alibaba Coding Plan", + "id": "alibaba", + "type": "openai-compat", + "api_key": "$ALIBABA_API_KEY", + "api_endpoint": "https://coding-intl.dashscope.aliyuncs.com/v1", + "default_large_model_id": "qwen3-max-2026-01-23", + "default_small_model_id": "glm-4.7", + "models": [ + { + "id": "qwen3-coder-next", + "name": "Qwen3 Coder Next", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3-coder-plus", + "name": "Qwen3 Coder Plus", + "context_window": 1000000, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3-max-2026-01-23", + "name": "Qwen3 Max 2026-01-23 (Coding Plan)", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3.5-plus", + "name": "Qwen3.5 Plus (Vision + Coding Plan)", + "context_window": 1000000, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + }, + { + "id": "kimi-k2.5", + "name": "Moonshot Kimi K2.5 (Coding Plan + Vision)", + "context_window": 262144, + "default_max_tokens": 32768, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + }, + { + "id": "glm-5", + "name": "GLM 5 (Coding Plan)", + "context_window": 202752, + "default_max_tokens": 16384, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "glm-4.7", + "name": "GLM 4.7 (Coding Plan)", + "context_window": 131072, + "default_max_tokens": 16384, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "MiniMax-M2.5", + "name": "MiniMax M2.5 (Coding Plan + Vision)", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + } + ] +} diff --git a/internal/providers/providers.go b/internal/providers/providers.go index 438a3bb4..2b681fa5 100644 --- a/internal/providers/providers.go +++ b/internal/providers/providers.go @@ -84,6 +84,9 @@ var miniMaxChinaConfig []byte //go:embed configs/ionet.json var ioNetConfig []byte +//go:embed configs/alibaba.json +var alibabaConfig []byte + // ProviderFunc is a function that returns a Provider. type ProviderFunc func() catwalk.Provider @@ -113,6 +116,7 @@ var providerRegistry = []ProviderFunc{ miniMaxProvider, miniMaxChinaProvider, ioNetProvider, + alibabaProvider, } // GetAll returns all registered providers. @@ -232,3 +236,7 @@ func miniMaxChinaProvider() catwalk.Provider { func ioNetProvider() catwalk.Provider { return loadProviderFromConfig(ioNetConfig) } + +func alibabaProvider() catwalk.Provider { + return loadProviderFromConfig(alibabaConfig) +} diff --git a/pkg/catwalk/provider.go b/pkg/catwalk/provider.go index ba0b1b4b..1d2836e0 100644 --- a/pkg/catwalk/provider.go +++ b/pkg/catwalk/provider.go @@ -45,6 +45,7 @@ const ( InferenceProviderMiniMax InferenceProvider = "minimax" InferenceProviderMiniMaxChina InferenceProvider = "minimax-china" InferenceProviderIoNet InferenceProvider = "ionet" + InferenceProviderAlibaba InferenceProvider = "alibaba" ) // Provider represents an AI provider configuration. @@ -113,6 +114,8 @@ func KnownProviders() []InferenceProvider { InferenceProviderVercel, InferenceProviderMiniMax, InferenceProviderMiniMaxChina, + InferenceProviderIoNet, + InferenceProviderAlibaba, } } From f7211745d890c526846f668acbf0b5f6f94ba71c Mon Sep 17 00:00:00 2001 From: Robert Palm Date: Thu, 5 Mar 2026 14:35:53 +0100 Subject: [PATCH 2/3] Rename Alibaba provider to alibaba-coding Align naming with coding-plan-specific endpoint and simplify model names. --- .../{alibaba.json => alibaba-coding.json} | 14 ++--- internal/providers/providers.go | 10 ++-- pkg/catwalk/provider.go | 52 +++++++++---------- 3 files changed, 38 insertions(+), 38 deletions(-) rename internal/providers/configs/{alibaba.json => alibaba-coding.json} (92%) diff --git a/internal/providers/configs/alibaba.json b/internal/providers/configs/alibaba-coding.json similarity index 92% rename from internal/providers/configs/alibaba.json rename to internal/providers/configs/alibaba-coding.json index 5ccf0615..255e1982 100644 --- a/internal/providers/configs/alibaba.json +++ b/internal/providers/configs/alibaba-coding.json @@ -1,6 +1,6 @@ { "name": "Alibaba Coding Plan", - "id": "alibaba", + "id": "alibaba-coding", "type": "openai-compat", "api_key": "$ALIBABA_API_KEY", "api_endpoint": "https://coding-intl.dashscope.aliyuncs.com/v1", @@ -47,7 +47,7 @@ }, { "id": "qwen3-max-2026-01-23", - "name": "Qwen3 Max 2026-01-23 (Coding Plan)", + "name": "Qwen3 Max 2026-01-23", "context_window": 262144, "default_max_tokens": 65536, "cost_per_1m_in": 0, @@ -66,7 +66,7 @@ }, { "id": "qwen3.5-plus", - "name": "Qwen3.5 Plus (Vision + Coding Plan)", + "name": "Qwen3.5 Plus", "context_window": 1000000, "default_max_tokens": 65536, "cost_per_1m_in": 0, @@ -85,7 +85,7 @@ }, { "id": "kimi-k2.5", - "name": "Moonshot Kimi K2.5 (Coding Plan + Vision)", + "name": "Moonshot Kimi K2.5", "context_window": 262144, "default_max_tokens": 32768, "cost_per_1m_in": 0, @@ -104,7 +104,7 @@ }, { "id": "glm-5", - "name": "GLM 5 (Coding Plan)", + "name": "GLM 5", "context_window": 202752, "default_max_tokens": 16384, "cost_per_1m_in": 0, @@ -123,7 +123,7 @@ }, { "id": "glm-4.7", - "name": "GLM 4.7 (Coding Plan)", + "name": "GLM 4.7", "context_window": 131072, "default_max_tokens": 16384, "cost_per_1m_in": 0, @@ -142,7 +142,7 @@ }, { "id": "MiniMax-M2.5", - "name": "MiniMax M2.5 (Coding Plan + Vision)", + "name": "MiniMax M2.5", "context_window": 262144, "default_max_tokens": 65536, "cost_per_1m_in": 0, diff --git a/internal/providers/providers.go b/internal/providers/providers.go index 2b681fa5..ab240ac3 100644 --- a/internal/providers/providers.go +++ b/internal/providers/providers.go @@ -84,8 +84,8 @@ var miniMaxChinaConfig []byte //go:embed configs/ionet.json var ioNetConfig []byte -//go:embed configs/alibaba.json -var alibabaConfig []byte +//go:embed configs/alibaba-coding.json +var alibabaCodingConfig []byte // ProviderFunc is a function that returns a Provider. type ProviderFunc func() catwalk.Provider @@ -116,7 +116,7 @@ var providerRegistry = []ProviderFunc{ miniMaxProvider, miniMaxChinaProvider, ioNetProvider, - alibabaProvider, + alibabaCodingProvider, } // GetAll returns all registered providers. @@ -237,6 +237,6 @@ func ioNetProvider() catwalk.Provider { return loadProviderFromConfig(ioNetConfig) } -func alibabaProvider() catwalk.Provider { - return loadProviderFromConfig(alibabaConfig) +func alibabaCodingProvider() catwalk.Provider { + return loadProviderFromConfig(alibabaCodingConfig) } diff --git a/pkg/catwalk/provider.go b/pkg/catwalk/provider.go index 1d2836e0..ce73c300 100644 --- a/pkg/catwalk/provider.go +++ b/pkg/catwalk/provider.go @@ -21,31 +21,31 @@ type InferenceProvider string // All the inference providers supported by the system. const ( - InferenceProviderOpenAI InferenceProvider = "openai" - InferenceProviderAnthropic InferenceProvider = "anthropic" - InferenceProviderSynthetic InferenceProvider = "synthetic" - InferenceProviderGemini InferenceProvider = "gemini" - InferenceProviderAzure InferenceProvider = "azure" - InferenceProviderBedrock InferenceProvider = "bedrock" - InferenceProviderVertexAI InferenceProvider = "vertexai" - InferenceProviderXAI InferenceProvider = "xai" - InferenceProviderZAI InferenceProvider = "zai" - InferenceProviderZhipu InferenceProvider = "zhipu" - InferenceProviderZhipuCoding InferenceProvider = "zhipu-coding" - InferenceProviderGROQ InferenceProvider = "groq" - InferenceProviderOpenRouter InferenceProvider = "openrouter" - InferenceProviderCerebras InferenceProvider = "cerebras" - InferenceProviderVenice InferenceProvider = "venice" - InferenceProviderChutes InferenceProvider = "chutes" - InferenceProviderHuggingFace InferenceProvider = "huggingface" - InferenceAIHubMix InferenceProvider = "aihubmix" - InferenceKimiCoding InferenceProvider = "kimi-coding" - InferenceProviderCopilot InferenceProvider = "copilot" - InferenceProviderVercel InferenceProvider = "vercel" - InferenceProviderMiniMax InferenceProvider = "minimax" - InferenceProviderMiniMaxChina InferenceProvider = "minimax-china" - InferenceProviderIoNet InferenceProvider = "ionet" - InferenceProviderAlibaba InferenceProvider = "alibaba" + InferenceProviderOpenAI InferenceProvider = "openai" + InferenceProviderAnthropic InferenceProvider = "anthropic" + InferenceProviderSynthetic InferenceProvider = "synthetic" + InferenceProviderGemini InferenceProvider = "gemini" + InferenceProviderAzure InferenceProvider = "azure" + InferenceProviderBedrock InferenceProvider = "bedrock" + InferenceProviderVertexAI InferenceProvider = "vertexai" + InferenceProviderXAI InferenceProvider = "xai" + InferenceProviderZAI InferenceProvider = "zai" + InferenceProviderZhipu InferenceProvider = "zhipu" + InferenceProviderZhipuCoding InferenceProvider = "zhipu-coding" + InferenceProviderGROQ InferenceProvider = "groq" + InferenceProviderOpenRouter InferenceProvider = "openrouter" + InferenceProviderCerebras InferenceProvider = "cerebras" + InferenceProviderVenice InferenceProvider = "venice" + InferenceProviderChutes InferenceProvider = "chutes" + InferenceProviderHuggingFace InferenceProvider = "huggingface" + InferenceAIHubMix InferenceProvider = "aihubmix" + InferenceKimiCoding InferenceProvider = "kimi-coding" + InferenceProviderCopilot InferenceProvider = "copilot" + InferenceProviderVercel InferenceProvider = "vercel" + InferenceProviderMiniMax InferenceProvider = "minimax" + InferenceProviderMiniMaxChina InferenceProvider = "minimax-china" + InferenceProviderIoNet InferenceProvider = "ionet" + InferenceProviderAlibabaCoding InferenceProvider = "alibaba-coding" ) // Provider represents an AI provider configuration. @@ -115,7 +115,7 @@ func KnownProviders() []InferenceProvider { InferenceProviderMiniMax, InferenceProviderMiniMaxChina, InferenceProviderIoNet, - InferenceProviderAlibaba, + InferenceProviderAlibabaCoding, } } From b5436004b28263a73dfc49a244c974e98b7022a1 Mon Sep 17 00:00:00 2001 From: Robert Palm Date: Thu, 5 Mar 2026 14:57:27 +0100 Subject: [PATCH 3/3] Add regional Alibaba pay providers Add alibaba-pay, alibaba-pay-us, and alibaba-pay-china provider configs and register them in the provider registry. --- .../providers/configs/alibaba-pay-china.json | 163 ++++++++++++++++++ .../providers/configs/alibaba-pay-us.json | 163 ++++++++++++++++++ internal/providers/configs/alibaba-pay.json | 163 ++++++++++++++++++ internal/providers/providers.go | 24 +++ pkg/catwalk/provider.go | 6 + 5 files changed, 519 insertions(+) create mode 100644 internal/providers/configs/alibaba-pay-china.json create mode 100644 internal/providers/configs/alibaba-pay-us.json create mode 100644 internal/providers/configs/alibaba-pay.json diff --git a/internal/providers/configs/alibaba-pay-china.json b/internal/providers/configs/alibaba-pay-china.json new file mode 100644 index 00000000..fcc499ac --- /dev/null +++ b/internal/providers/configs/alibaba-pay-china.json @@ -0,0 +1,163 @@ +{ + "name": "Alibaba Pay China", + "id": "alibaba-pay-china", + "type": "openai-compat", + "api_key": "$ALIBABA_API_KEY", + "api_endpoint": "https://dashscope.aliyuncs.com/compatible-mode/v1", + "default_large_model_id": "qwen3-max-2026-01-23", + "default_small_model_id": "glm-4.7", + "models": [ + { + "id": "qwen3-coder-next", + "name": "Qwen3 Coder Next", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3-coder-plus", + "name": "Qwen3 Coder Plus", + "context_window": 1000000, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3-max-2026-01-23", + "name": "Qwen3 Max 2026-01-23", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3.5-plus", + "name": "Qwen3.5 Plus", + "context_window": 1000000, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + }, + { + "id": "kimi-k2.5", + "name": "Moonshot Kimi K2.5", + "context_window": 262144, + "default_max_tokens": 32768, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + }, + { + "id": "glm-5", + "name": "GLM 5", + "context_window": 202752, + "default_max_tokens": 16384, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "glm-4.7", + "name": "GLM 4.7", + "context_window": 131072, + "default_max_tokens": 16384, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "MiniMax-M2.5", + "name": "MiniMax M2.5", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + } + ] +} diff --git a/internal/providers/configs/alibaba-pay-us.json b/internal/providers/configs/alibaba-pay-us.json new file mode 100644 index 00000000..f08f4e62 --- /dev/null +++ b/internal/providers/configs/alibaba-pay-us.json @@ -0,0 +1,163 @@ +{ + "name": "Alibaba Pay US", + "id": "alibaba-pay-us", + "type": "openai-compat", + "api_key": "$ALIBABA_API_KEY", + "api_endpoint": "https://dashscope-us.aliyuncs.com/compatible-mode/v1", + "default_large_model_id": "qwen3-max-2026-01-23", + "default_small_model_id": "glm-4.7", + "models": [ + { + "id": "qwen3-coder-next", + "name": "Qwen3 Coder Next", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3-coder-plus", + "name": "Qwen3 Coder Plus", + "context_window": 1000000, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3-max-2026-01-23", + "name": "Qwen3 Max 2026-01-23", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3.5-plus", + "name": "Qwen3.5 Plus", + "context_window": 1000000, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + }, + { + "id": "kimi-k2.5", + "name": "Moonshot Kimi K2.5", + "context_window": 262144, + "default_max_tokens": 32768, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + }, + { + "id": "glm-5", + "name": "GLM 5", + "context_window": 202752, + "default_max_tokens": 16384, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "glm-4.7", + "name": "GLM 4.7", + "context_window": 131072, + "default_max_tokens": 16384, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "MiniMax-M2.5", + "name": "MiniMax M2.5", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + } + ] +} diff --git a/internal/providers/configs/alibaba-pay.json b/internal/providers/configs/alibaba-pay.json new file mode 100644 index 00000000..fcd66d70 --- /dev/null +++ b/internal/providers/configs/alibaba-pay.json @@ -0,0 +1,163 @@ +{ + "name": "Alibaba Pay", + "id": "alibaba-pay", + "type": "openai-compat", + "api_key": "$ALIBABA_API_KEY", + "api_endpoint": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1", + "default_large_model_id": "qwen3-max-2026-01-23", + "default_small_model_id": "glm-4.7", + "models": [ + { + "id": "qwen3-coder-next", + "name": "Qwen3 Coder Next", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3-coder-plus", + "name": "Qwen3 Coder Plus", + "context_window": 1000000, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3-max-2026-01-23", + "name": "Qwen3 Max 2026-01-23", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "qwen3.5-plus", + "name": "Qwen3.5 Plus", + "context_window": 1000000, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + }, + { + "id": "kimi-k2.5", + "name": "Moonshot Kimi K2.5", + "context_window": 262144, + "default_max_tokens": 32768, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + }, + { + "id": "glm-5", + "name": "GLM 5", + "context_window": 202752, + "default_max_tokens": 16384, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "glm-4.7", + "name": "GLM 4.7", + "context_window": 131072, + "default_max_tokens": 16384, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": false, + "options": {} + }, + { + "id": "MiniMax-M2.5", + "name": "MiniMax M2.5", + "context_window": 262144, + "default_max_tokens": 65536, + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "can_reason": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium", + "supports_attachments": true, + "options": {} + } + ] +} diff --git a/internal/providers/providers.go b/internal/providers/providers.go index ab240ac3..dbbe8910 100644 --- a/internal/providers/providers.go +++ b/internal/providers/providers.go @@ -87,6 +87,15 @@ var ioNetConfig []byte //go:embed configs/alibaba-coding.json var alibabaCodingConfig []byte +//go:embed configs/alibaba-pay.json +var alibabaPayConfig []byte + +//go:embed configs/alibaba-pay-us.json +var alibabaPayUSConfig []byte + +//go:embed configs/alibaba-pay-china.json +var alibabaPayChinaConfig []byte + // ProviderFunc is a function that returns a Provider. type ProviderFunc func() catwalk.Provider @@ -117,6 +126,9 @@ var providerRegistry = []ProviderFunc{ miniMaxChinaProvider, ioNetProvider, alibabaCodingProvider, + alibabaPayProvider, + alibabaPayUSProvider, + alibabaPayChinaProvider, } // GetAll returns all registered providers. @@ -240,3 +252,15 @@ func ioNetProvider() catwalk.Provider { func alibabaCodingProvider() catwalk.Provider { return loadProviderFromConfig(alibabaCodingConfig) } + +func alibabaPayProvider() catwalk.Provider { + return loadProviderFromConfig(alibabaPayConfig) +} + +func alibabaPayUSProvider() catwalk.Provider { + return loadProviderFromConfig(alibabaPayUSConfig) +} + +func alibabaPayChinaProvider() catwalk.Provider { + return loadProviderFromConfig(alibabaPayChinaConfig) +} diff --git a/pkg/catwalk/provider.go b/pkg/catwalk/provider.go index ce73c300..83b29df4 100644 --- a/pkg/catwalk/provider.go +++ b/pkg/catwalk/provider.go @@ -46,6 +46,9 @@ const ( InferenceProviderMiniMaxChina InferenceProvider = "minimax-china" InferenceProviderIoNet InferenceProvider = "ionet" InferenceProviderAlibabaCoding InferenceProvider = "alibaba-coding" + InferenceProviderAlibabaPay InferenceProvider = "alibaba-pay" + InferenceProviderAlibabaPayUS InferenceProvider = "alibaba-pay-us" + InferenceProviderAlibabaPayCN InferenceProvider = "alibaba-pay-china" ) // Provider represents an AI provider configuration. @@ -116,6 +119,9 @@ func KnownProviders() []InferenceProvider { InferenceProviderMiniMaxChina, InferenceProviderIoNet, InferenceProviderAlibabaCoding, + InferenceProviderAlibabaPay, + InferenceProviderAlibabaPayUS, + InferenceProviderAlibabaPayCN, } }