diff --git a/internal/providers/configs/alibaba-coding.json b/internal/providers/configs/alibaba-coding.json new file mode 100644 index 00000000..255e1982 --- /dev/null +++ b/internal/providers/configs/alibaba-coding.json @@ -0,0 +1,163 @@ +{ + "name": "Alibaba Coding Plan", + "id": "alibaba-coding", + "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", + "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-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 438a3bb4..dbbe8910 100644 --- a/internal/providers/providers.go +++ b/internal/providers/providers.go @@ -84,6 +84,18 @@ var miniMaxChinaConfig []byte //go:embed configs/ionet.json 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 @@ -113,6 +125,10 @@ var providerRegistry = []ProviderFunc{ miniMaxProvider, miniMaxChinaProvider, ioNetProvider, + alibabaCodingProvider, + alibabaPayProvider, + alibabaPayUSProvider, + alibabaPayChinaProvider, } // GetAll returns all registered providers. @@ -232,3 +248,19 @@ func miniMaxChinaProvider() catwalk.Provider { func ioNetProvider() catwalk.Provider { return loadProviderFromConfig(ioNetConfig) } + +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 ba0b1b4b..83b29df4 100644 --- a/pkg/catwalk/provider.go +++ b/pkg/catwalk/provider.go @@ -21,30 +21,34 @@ 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" + 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" + InferenceProviderAlibabaPay InferenceProvider = "alibaba-pay" + InferenceProviderAlibabaPayUS InferenceProvider = "alibaba-pay-us" + InferenceProviderAlibabaPayCN InferenceProvider = "alibaba-pay-china" ) // Provider represents an AI provider configuration. @@ -113,6 +117,11 @@ func KnownProviders() []InferenceProvider { InferenceProviderVercel, InferenceProviderMiniMax, InferenceProviderMiniMaxChina, + InferenceProviderIoNet, + InferenceProviderAlibabaCoding, + InferenceProviderAlibabaPay, + InferenceProviderAlibabaPayUS, + InferenceProviderAlibabaPayCN, } }