feat: add Avian as an LLM provider#1951
Conversation
Add Avian (https://avian.io) as an OpenAI-compatible LLM provider. Avian provides access to multiple models through a unified API endpoint at https://api.avian.io/v1 with Bearer token authentication. Supported models: - deepseek/deepseek-v3.2: 164K context, $0.26/$0.38 per 1M tokens - moonshotai/kimi-k2.5: 131K context, $0.45/$2.20 per 1M tokens - z-ai/glm-5: 131K context, $0.30/$2.55 per 1M tokens - minimax/minimax-m2.5: 1M context, $0.30/$1.10 per 1M tokens Changes: - Add LLMType.AVIAN enum value to llm_config.py - Register AVIAN with OpenAILLM provider (OpenAI-compatible API) - Add token costs and context lengths for Avian models - Add example config yaml (config/examples/avian-deepseek-v3.2.yaml) - Add mock config and unit tests
|
Friendly follow-up — this PR is still active and ready for review. Would appreciate a look when you get a chance! cc @geekan @better629 |
|
Friendly follow-up — this PR is still active and ready for review. All feedback has been addressed. Would appreciate a look when you get a chance! cc @better629 |
|
Hey @geekan @garylin2099 — friendly follow-up on this PR. Avian is an OpenAI-compatible inference provider that's already live and powering apps like ISEKAI ZERO. This is a lightweight integration (standard OpenAI-compatible endpoint) and we're happy to address any feedback or make adjustments. Would love to get this merged if you have a moment to review. Thanks! |
|
Addressed feedback: updated cost tracking to use CostManager, added to LLMType enum |
|
Hi — this PR is approved and the most recent CI run passes. The older failed run appears to be a stale timeout (720 hours). Could a maintainer merge or re-run the stale check to clear it? Thanks! |
|
Pushed empty commit to retrigger CI and clear stale check. |
Features
Add Avian as an OpenAI-compatible LLM provider. Avian provides access to multiple frontier models through a unified API endpoint at
https://api.avian.io/v1with Bearer token authentication (AVIAN_API_KEY).Supported Models
deepseek/deepseek-v3.2moonshotai/kimi-k2.5z-ai/glm-5minimax/minimax-m2.5Changes
metagpt/configs/llm_config.py: AddLLMType.AVIANenum valuemetagpt/provider/openai_api.py: RegisterLLMType.AVIANwithOpenAILLM(standard OpenAI-compatible provider)metagpt/utils/token_counter.py: Add token costs (TOKEN_COSTS) and context lengths (TOKEN_MAX) for all Avian modelsconfig/examples/avian-deepseek-v3.2.yaml: Example configuration filetests/metagpt/provider/mock_llm_config.py: Add mock config for Aviantests/metagpt/provider/test_avian_api.py: Unit tests (provider registration, client config, mock completions)Usage
This follows the same pattern as other OpenAI-compatible providers (DeepSeek, SiliconFlow, OpenRouter, Llama API, etc.) — no new dependencies required.
cc @garylin2099 @better629