Conversation
Add first-class support for Avian AI (https://avian.io), an OpenAI-compatible inference provider offering DeepSeek, Kimi, GLM, and MiniMax models. - New `LlmBackend::Avian` variant with `AVIAN_API_KEY` / `AVIAN_MODEL` env vars (default model: deepseek/deepseek-v3.2) - `AvianConfig` struct and `create_avian_provider()` using the Chat Completions API via rig-core's OpenAI adapter - Setup wizard integration: provider selection, API key flow, and model picker with all four models - Documentation in LLM_PROVIDERS.md and FEATURE_PARITY.md
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the system's flexibility by introducing a new, dedicated large language model provider. This integration streamlines the process for users who wish to leverage Avian's diverse model offerings, moving beyond a generic OpenAI-compatible setup. The changes ensure a consistent user experience, whether configuring via environment variables or an interactive wizard, and update internal configurations and documentation to reflect this new capability. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for Avian as a named LLM provider. The changes are well-structured, following the existing patterns for adding new providers, and include updates to configuration, the setup wizard, and documentation. I have one suggestion to improve the maintainability of the model list in the setup wizard.
| let models: Vec<(String, String)> = vec![ | ||
| ( | ||
| "deepseek/deepseek-v3.2".into(), | ||
| "DeepSeek V3.2 (164K context)".into(), | ||
| ), | ||
| ( | ||
| "moonshotai/kimi-k2.5".into(), | ||
| "Kimi K2.5 (131K context)".into(), | ||
| ), | ||
| ("z-ai/glm-5".into(), "GLM-5 (131K context)".into()), | ||
| ( | ||
| "minimax/minimax-m2.5".into(), | ||
| "MiniMax M2.5 (1M context)".into(), | ||
| ), | ||
| ]; |
There was a problem hiding this comment.
To improve readability and avoid repeated .into() calls, you can define the models as an array of string slices and then map it to a Vec<(String, String)>. This makes the data definition cleaner and more idiomatic.
| let models: Vec<(String, String)> = vec![ | |
| ( | |
| "deepseek/deepseek-v3.2".into(), | |
| "DeepSeek V3.2 (164K context)".into(), | |
| ), | |
| ( | |
| "moonshotai/kimi-k2.5".into(), | |
| "Kimi K2.5 (131K context)".into(), | |
| ), | |
| ("z-ai/glm-5".into(), "GLM-5 (131K context)".into()), | |
| ( | |
| "minimax/minimax-m2.5".into(), | |
| "MiniMax M2.5 (1M context)".into(), | |
| ), | |
| ]; | |
| let models: Vec<(String, String)> = [ | |
| ( | |
| "deepseek/deepseek-v3.2", | |
| "DeepSeek V3.2 (164K context)", | |
| ), | |
| ( | |
| "moonshotai/kimi-k2.5", | |
| "Kimi K2.5 (131K context)", | |
| ), | |
| ("z-ai/glm-5", "GLM-5 (131K context)"), | |
| ( | |
| "minimax/minimax-m2.5", | |
| "MiniMax M2.5 (1M context)", | |
| ), | |
| ].iter().map(|(id, desc)| (id.to_string(), desc.to_string())).collect(); |
|
Thanks for clarifying! Maintaining consistency with existing patterns for other providers is a valid approach. The current implementation is acceptable. |
zmanian
left a comment
There was a problem hiding this comment.
The code is well-written and follows the Tinfoil provider pattern cleanly -- nice work on the implementation quality. However, I don't think this should be a named provider.
Avian is an OpenAI-compatible endpoint. Users can already use it today with zero code changes:
LLM_BACKEND=openai_compatible
LLM_BASE_URL=https://api.avian.io/v1
LLM_API_KEY=your-avian-key
LLM_MODEL=deepseek/deepseek-v3.2Our project guidelines say "prefer generic/extensible architectures over hardcoding specific integrations." Tinfoil got a named provider because it has unique TEE/attestation properties that require special handling. Avian uses the standard OpenAI Chat Completions API with no technical differentiation that warrants a dedicated backend variant.
Each named provider adds ongoing maintenance: config structs, setup wizard flows, feature parity tracking, documentation, and test fixtures that need updating whenever LlmConfig changes (as you can see from the avian: None additions in test helpers and wizard.rs). That cost is justified when there's a technical need, but not for convenience when the generic path already works.
If there's something Avian-specific that the openai_compatible path can't handle, I'd be interested to hear about it -- but as it stands, I'd recommend closing this PR and instead contributing a section to docs/LLM_PROVIDERS.md under "OpenAI-Compatible Endpoints" showing users how to configure Avian via the generic path.
Summary
Adds first-class support for Avian as a named LLM provider, following the same pattern as the Tinfoil provider added in #62.
Avian is an OpenAI-compatible inference service providing access to DeepSeek, Kimi, GLM, and MiniMax models. This PR adds it as a dedicated backend (
LLM_BACKEND=avian) rather than requiring users to configure it through the genericopenai_compatiblepath.Changes
src/config/llm.rs—LlmBackend::Avianenum variant,AvianConfigstruct,AVIAN_API_KEY/AVIAN_MODELenv var resolution (default model:deepseek/deepseek-v3.2)src/config/mod.rs— ExportAvianConfigsrc/llm/mod.rs—create_avian_provider()using Chat Completions API via rig-core's OpenAI adapter, routed fromLlmBackend::Avianmatch armsrc/setup/wizard.rs— Avian in provider selection list,setup_avian()API key flow, model picker with all 4 models (DeepSeek V3.2, Kimi K2.5, GLM-5, MiniMax M2.5)docs/LLM_PROVIDERS.md— Avian section with env config and model tableFEATURE_PARITY.md— Avian row in provider matrix and design decisionsAvailable models
deepseek/deepseek-v3.2moonshotai/kimi-k2.5z-ai/glm-5minimax/minimax-m2.5Usage
Or via the setup wizard:
ironclaw onboardand select "Avian".cc @ilblackdragon @serrrfirat — would appreciate a review when you get a chance. This follows the same pattern as the Tinfoil provider (#62).