Open
Conversation
Add Avian (https://avian.io) as a new LLM provider with OpenAI-compatible API support including chat completions, streaming, and function calling. 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 AvianIcon to components/icons.tsx - Add 'avian' to ProviderId type - Add Avian provider definition with model pricing in models.ts - Create providers/avian/ with index.ts and utils.ts - Register provider in registry.ts and utils.ts
|
@avianion is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Greptile SummaryAdded Avian as a new LLM provider with OpenAI-compatible API integration. The implementation follows the established DeepSeek provider pattern, reusing proven architecture for OpenAI SDK-based providers. The integration includes proper tool calling support, streaming responses, cost tracking, and provider metadata registration. All 4 models are correctly configured with pricing and context window specifications. Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User selects Avian provider] --> B[Provider Registry]
B --> C[avianProvider from /providers/avian/index.ts]
C --> D[Initialize OpenAI SDK]
D --> E[baseURL: api.avian.io/v1]
E --> F{Request Type?}
F -->|Streaming + No Tools| G[Create stream response]
F -->|With Tools| H[Tool execution loop]
F -->|Standard| I[Standard completion]
H --> J[Execute tools with prepareToolsWithUsageControl]
J --> K[Track forced tool usage]
K --> L[Iterate up to MAX_TOOL_ITERATIONS]
L --> M{Stream final?}
M -->|Yes| G
M -->|No| N[Return response with timing]
G --> O[Calculate costs using model pricing]
I --> O
N --> O
O --> P[Return to user with tokens & cost]
Last reviewed commit: f77f80c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Avian as a new LLM provider. Avian is an OpenAI-compatible inference API offering competitive pricing on frontier models.
Models:
Features supported:
Changes
components/icons.tsx— AddAvianIconSVG componentproviders/types.ts— Add'avian'toProviderIdunion typeproviders/models.ts— Add Avian provider definition with model pricing and capabilitiesproviders/avian/index.ts— Provider implementation using OpenAI SDK (follows DeepSeek pattern)providers/avian/utils.ts— Streaming utility using sharedcreateOpenAICompatibleStreamproviders/registry.ts— RegisteravianProviderin the provider registryproviders/utils.ts— Add Avian to provider metadata mapImplementation
The provider follows the same pattern as other OpenAI-compatible providers (DeepSeek, Cerebras). It uses the
openainpm package withbaseURL: 'https://api.avian.io/v1'and supports all standard features including tool calling loops, forced tool usage, and streaming with cost tracking.Authentication is via user-provided API key (
AVIAN_API_KEYas Bearer token).Test plan
deepseek/deepseek-v3.2modelcc @waleedlatif1 @emir-karabeg