From e3dd9e7bff23da1e20a39b89abe22f578cef3e89 Mon Sep 17 00:00:00 2001 From: Nur Ad-Duja Date: Wed, 22 Jul 2026 22:51:47 +0700 Subject: [PATCH] feat(kenari): add new provider --- internal/providers/configs/kenari.json | 514 +++++++++++++++++++++++++ internal/providers/providers.go | 8 + 2 files changed, 522 insertions(+) create mode 100644 internal/providers/configs/kenari.json diff --git a/internal/providers/configs/kenari.json b/internal/providers/configs/kenari.json new file mode 100644 index 00000000..5c9c13e9 --- /dev/null +++ b/internal/providers/configs/kenari.json @@ -0,0 +1,514 @@ +{ + "name": "Kenari", + "id": "kenari", + "api_key": "$KENARI_API_KEY", + "api_endpoint": "https://kenari.id/v1", + "type": "openai-compat", + "default_large_model_id": "claude-sonnet-5", + "default_small_model_id": "deepseek-v4-flash", + "models": [ + { + "id": "claude-fable-5", + "name": "Claude Fable 5", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1000000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "claude-opus-4-7", + "name": "Claude Opus 4.7", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1000000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "claude-opus-4-8", + "name": "Claude Opus 4.8", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1000000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "claude-sonnet-5", + "name": "Claude Sonnet 5", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1000000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "deepseek-v4-flash", + "name": "DeepSeek V4 Flash", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1048576, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": false, + "reasoning_levels": [ + "high", + "xhigh" + ], + "default_reasoning_effort": "high" + }, + { + "id": "deepseek-v4-pro", + "name": "DeepSeek V4 Pro", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1048576, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": false, + "reasoning_levels": [ + "high", + "xhigh" + ], + "default_reasoning_effort": "high" + }, + { + "id": "gemini-2-5-flash", + "name": "Gemini 2.5 Flash", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1048576, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true + }, + { + "id": "gemini-2-5-flash-lite", + "name": "Gemini 2.5 Flash Lite", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1048576, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true + }, + { + "id": "gemini-3-1-flash-lite", + "name": "Gemini 3.1 Flash Lite", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1048576, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "minimal", + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "gemma-4-31b-it", + "name": "Gemma 4 31B IT", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 262144, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true + }, + { + "id": "glm-5-1", + "name": "GLM-5.1", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 204800, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": false + }, + { + "id": "glm-5-2", + "name": "GLM-5.2", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1048576, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": false, + "reasoning_levels": [ + "high", + "xhigh" + ], + "default_reasoning_effort": "high" + }, + { + "id": "gpt-5-4-mini", + "name": "GPT-5.4 Mini", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 400000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "none", + "low", + "medium", + "high", + "xhigh" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "gpt-5-5", + "name": "GPT-5.5", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1050000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "none", + "low", + "medium", + "high", + "xhigh" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "gpt-5-6-luna", + "name": "GPT-5.6 Luna", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1050000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "none", + "low", + "medium", + "high", + "xhigh", + "max" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "gpt-5-6-sol", + "name": "GPT-5.6 Sol", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1050000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "none", + "low", + "medium", + "high", + "xhigh", + "max" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "gpt-5-6-terra", + "name": "GPT-5.6 Terra", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1050000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "none", + "low", + "medium", + "high", + "xhigh", + "max" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "gpt-oss-120b", + "name": "GPT-OSS 120B", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": false, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "gpt-oss-20b", + "name": "GPT-OSS 20B", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": false, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "grok-4-5", + "name": "Grok 4.5", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 500000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "low", + "medium", + "high" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "grok-build-0-1", + "name": "Grok Build 0.1", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 256000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true + }, + { + "id": "kimi-k2-6", + "name": "Kimi K2.6", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 262144, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true + }, + { + "id": "kimi-k2-7-code", + "name": "Kimi K2.7 Code", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 262144, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true + }, + { + "id": "kimi-k3", + "name": "Kimi K3", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1048576, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true, + "reasoning_levels": [ + "low", + "high", + "max" + ], + "default_reasoning_effort": "low" + }, + { + "id": "mimo-v2-5", + "name": "MiMo V2.5", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1050000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true + }, + { + "id": "mimo-v2-5-pro", + "name": "MiMo V2.5 Pro", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1050000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": false + }, + { + "id": "minimax-m3", + "name": "MiniMax M3", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1048576, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true + }, + { + "id": "nemotron-3-nano-30b-a3b", + "name": "Nemotron 3 Nano 30B A3B", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 256000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": false + }, + { + "id": "nemotron-3-super-120b-a12b", + "name": "Nemotron 3 Super 120B A12B", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 262144, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": false, + "reasoning_levels": [ + "low", + "medium" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "nemotron-3-ultra-550b-a55b", + "name": "Nemotron 3 Ultra 550B A55B", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1000000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": false, + "reasoning_levels": [ + "medium", + "high" + ], + "default_reasoning_effort": "medium" + }, + { + "id": "qwen3-7-plus", + "name": "Qwen3.7 Plus", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 1000000, + "default_max_tokens": 32768, + "can_reason": true, + "supports_attachments": true + } + ] +} diff --git a/internal/providers/providers.go b/internal/providers/providers.go index 6f11d669..444bd21c 100644 --- a/internal/providers/providers.go +++ b/internal/providers/providers.go @@ -66,6 +66,9 @@ var huggingFaceConfig []byte //go:embed configs/ionet.json var ioNetConfig []byte +//go:embed configs/kenari.json +var kenariConfig []byte + //go:embed configs/kimi.json var kimiCodingConfig []byte @@ -160,6 +163,7 @@ var providerRegistry = []ProviderFunc{ groqProvider, huggingFaceProvider, ioNetProvider, + kenariProvider, nebiusProvider, neuralwattProvider, openCodeGoProvider, @@ -268,6 +272,10 @@ func ioNetProvider() catwalk.Provider { return loadProviderFromConfig(ioNetConfig) } +func kenariProvider() catwalk.Provider { + return loadProviderFromConfig(kenariConfig) +} + func kimiCodingProvider() catwalk.Provider { return loadProviderFromConfig(kimiCodingConfig) }