Skip to content

feat: add Avian as an LLM provider#1997

Open
avianion wants to merge 1 commit intomckaywrigley:mainfrom
avianion:add-avian-provider
Open

feat: add Avian as an LLM provider#1997
avianion wants to merge 1 commit intomckaywrigley:mainfrom
avianion:add-avian-provider

Conversation

@avianion
Copy link
Copy Markdown

Summary

Adds Avian as a new LLM provider. Avian exposes an OpenAI-compatible API (https://api.avian.io/v1) and offers competitively priced frontier models.

Models added

Model Context Max Output Input $/1M Output $/1M
deepseek/deepseek-v3.2 164K 65K $0.26 $0.38
moonshotai/kimi-k2.5 131K 8K $0.45 $2.20
z-ai/glm-5 131K 16K $0.30 $2.55
minimax/minimax-m2.5 1M 1M $0.30 $1.10

Changes

  • API route (app/api/chat/avian/route.ts): Uses the OpenAI SDK with baseURL: "https://api.avian.io/v1", same pattern as the Groq provider
  • Model definitions (lib/models/llm/avian-llm-list.ts): 4 models with pricing info
  • Type system (types/): AvianLLMID type, "avian" added to ModelProvider, AVIAN_API_KEY to env/key types
  • Chat setting limits: Context length and max output for each model
  • Icon (components/icons/avian-svg.tsx): SVG icon component for model selector
  • Profile settings: API key input field in the settings panel
  • Server helpers: AVIAN_API_KEY env var mapping for server-side configuration
  • API keys route: Avian included in the env key availability check
  • Supabase migration: Adds avian_api_key column to profiles table

Configuration

Users can configure Avian in two ways:

  1. Per-user: Enter API key in Profile Settings > API Keys
  2. Server-wide: Set AVIAN_API_KEY environment variable

Test plan

  • Set AVIAN_API_KEY env var and verify Avian models appear in model selector
  • Enter API key in profile settings and verify models appear
  • Send a chat message using an Avian model and verify streaming response
  • Verify model icon displays correctly in light and dark themes
  • Run Supabase migration and verify avian_api_key column is created

cc @mckaywrigley

Add Avian (https://avian.io) as a new LLM provider with OpenAI-compatible
API support. Includes 4 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:
- API route at /api/chat/avian using OpenAI SDK with custom base URL
- Model list, types, chat setting limits, and icon component
- API key support via profile settings, env vars, and Supabase migration
- Full integration with existing provider pattern
@avianion
Copy link
Copy Markdown
Author

avianion commented Mar 5, 2026

Friendly follow-up — this PR is still active and ready for review. Would appreciate a look when you get a chance! cc @mckaywrigley

@avianion
Copy link
Copy Markdown
Author

avianion commented Mar 5, 2026

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 @mckaywrigley

@avianion
Copy link
Copy Markdown
Author

avianion commented Mar 5, 2026

Hey @mckaywrigley — 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant