From 1d75c691dd6ea9ee12ef8f50924fbdced0cafb77 Mon Sep 17 00:00:00 2001 From: avianion <37309215+avianion@users.noreply.github.com> Date: Tue, 10 Mar 2026 14:34:10 +0000 Subject: [PATCH] feat: add avian provider (#196) --- internal/providers/configs/avian.json | 63 +++++++++++++++++++++++++++ internal/providers/providers.go | 8 ++++ pkg/catwalk/provider.go | 2 + 3 files changed, 73 insertions(+) create mode 100644 internal/providers/configs/avian.json diff --git a/internal/providers/configs/avian.json b/internal/providers/configs/avian.json new file mode 100644 index 0000000000000000000000000000000000000000..0a89143b216d2fcb4e11f791b4d1c6eb8298cec6 --- /dev/null +++ b/internal/providers/configs/avian.json @@ -0,0 +1,63 @@ +{ + "name": "Avian", + "id": "avian", + "type": "openai-compat", + "api_key": "$AVIAN_API_KEY", + "api_endpoint": "https://api.avian.io/v1", + "default_large_model_id": "moonshotai/kimi-k2.5", + "default_small_model_id": "deepseek/deepseek-v3.2", + "models": [ + { + "id": "deepseek/deepseek-v3.2", + "name": "DeepSeek V3.2", + "cost_per_1m_in": 0.28, + "cost_per_1m_out": 0.42, + "cost_per_1m_in_cached": 0.014, + "cost_per_1m_out_cached": 0, + "context_window": 164000, + "default_max_tokens": 65000, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "moonshotai/kimi-k2.5", + "name": "Kimi K2.5", + "cost_per_1m_in": 0.45, + "cost_per_1m_out": 2.2, + "cost_per_1m_in_cached": 0.225, + "cost_per_1m_out_cached": 0, + "context_window": 262000, + "default_max_tokens": 65536, + "can_reason": true, + "supports_attachments": false, + "options": {} + }, + { + "id": "z-ai/glm-5", + "name": "GLM-5", + "cost_per_1m_in": 0.95, + "cost_per_1m_out": 2.55, + "cost_per_1m_in_cached": 0.2, + "cost_per_1m_out_cached": 0, + "context_window": 205000, + "default_max_tokens": 65536, + "can_reason": true, + "supports_attachments": false, + "options": {} + }, + { + "id": "minimax/minimax-m2.5", + "name": "MiniMax M2.5", + "cost_per_1m_in": 0.3, + "cost_per_1m_out": 1.1, + "cost_per_1m_in_cached": 0.15, + "cost_per_1m_out_cached": 0, + "context_window": 200000, + "default_max_tokens": 131072, + "can_reason": false, + "supports_attachments": false, + "options": {} + } + ] +} diff --git a/internal/providers/providers.go b/internal/providers/providers.go index df4b75cc49a42eda78a9d3b4e5cd0d8036aad416..80a7b68b05e2bcbf4c685cbb5d854390de5504e8 100644 --- a/internal/providers/providers.go +++ b/internal/providers/providers.go @@ -87,6 +87,9 @@ var ioNetConfig []byte //go:embed configs/qiniucloud.json var qiniuCloudConfig []byte +//go:embed configs/avian.json +var avianConfig []byte + // ProviderFunc is a function that returns a Provider. type ProviderFunc func() catwalk.Provider @@ -117,6 +120,7 @@ var providerRegistry = []ProviderFunc{ miniMaxChinaProvider, ioNetProvider, qiniuCloudProvider, + avianProvider, } // GetAll returns all registered providers. @@ -240,3 +244,7 @@ func ioNetProvider() catwalk.Provider { func qiniuCloudProvider() catwalk.Provider { return loadProviderFromConfig(qiniuCloudConfig) } + +func avianProvider() catwalk.Provider { + return loadProviderFromConfig(avianConfig) +} diff --git a/pkg/catwalk/provider.go b/pkg/catwalk/provider.go index 03ce89fca47528ddcebb4680a22d5aa3afdc64bf..f8345fe6e0c962a55e7c53fd9412d720b3cd72c3 100644 --- a/pkg/catwalk/provider.go +++ b/pkg/catwalk/provider.go @@ -46,6 +46,7 @@ const ( InferenceProviderMiniMaxChina InferenceProvider = "minimax-china" InferenceProviderIoNet InferenceProvider = "ionet" InferenceProviderQiniuCloud InferenceProvider = "qiniucloud" + InferenceProviderAvian InferenceProvider = "avian" ) // Provider represents an AI provider configuration. @@ -115,6 +116,7 @@ func KnownProviders() []InferenceProvider { InferenceProviderMiniMax, InferenceProviderMiniMaxChina, InferenceProviderQiniuCloud, + InferenceProviderAvian, } }