Skip to content

feat: add Avian as a new channel provider - #3128

Closed
avianion wants to merge 1 commit into
QuantumNous:mainfrom
avianion:feat/add-avian-channel
Closed

feat: add Avian as a new channel provider#3128
avianion wants to merge 1 commit into
QuantumNous:mainfrom
avianion:feat/add-avian-channel

Conversation

@avianion

@avianion avianion commented Mar 5, 2026

Copy link
Copy Markdown

Summary

  • Adds Avian (https://avian.io) as a new OpenAI-compatible channel type (ChannelTypeAvian = 58)
  • Maps to OpenAI API adapter (fully OpenAI-compatible endpoint)
  • Adds stream support
  • Adds frontend channel option

Changes

  • constant/channel.go — new channel type, base URL, display name
  • common/api_type.go — channel-to-API-type mapping
  • relay/common/relay_info.go — stream support
  • web/src/constants/channel.constants.js — frontend dropdown

Test plan

  • Verify Avian appears in channel type dropdown
  • Create Avian channel with API key
  • Test chat completion relay through Avian channel

Summary by CodeRabbit

  • New Features
    • Added support for Avian channel integration with OpenAI API compatibility
    • Avian channel now available in channel selection with streaming support enabled

Add Avian (https://avian.io) as a new OpenAI-compatible channel type.
Avian provides fast, affordable LLM inference.

Changes:
- Add ChannelTypeAvian (58) constant with base URL
- Map to OpenAI API type (fully OpenAI-compatible)
- Add to stream supported channels
- Add to frontend channel options
@coderabbitai

coderabbitai Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request adds support for a new Avian channel type (ID: 58) throughout the backend and frontend. It includes channel constant definition, API type mapping to OpenAI, streaming support registration, and frontend channel option configuration.

Changes

Cohort / File(s) Summary
Backend Channel Support
constant/channel.go, common/api_type.go, relay/common/relay_info.go
Introduces Avian channel type constant (58), base URL (https://api.avian.io), and maps it to OpenAI API type. Registers Avian in supported streaming channels.
Frontend Channel Options
web/src/constants/channel.constants.js
Adds Avian to CHANNEL_OPTIONS array with value 58, green color, and "Avian" label for UI display.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • add submodel.ai #1915: Modifies the same ChannelType2APIType switch statement to add channel-to-API-type mappings using identical pattern.

Suggested reviewers

  • seefs001

Poem

🐰 A new channel hops into view,
Avian joins with OpenAI too,
Streaming flows, configs align,
Frontend green with constants fine,
Another feather in our flight! 🪶✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'feat: add Avian as a new channel provider' accurately and concisely describes the main change: adding Avian as a new channel type throughout the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@avianion
avianion force-pushed the feat/add-avian-channel branch from f5f43ea to f140ce9 Compare March 5, 2026 08:45

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@web/src/constants/channel.constants.js`:
- Around line 192-196: Add Avian (value 58) to the MODEL_FETCHABLE_CHANNEL_TYPES
array so the model auto-fetch path recognizes the new channel, and update the
channel-rendering switch in the render helper by adding a case for 58 that
returns the Avian icon component (import the Avian icon if needed) so the
channel shows the correct icon in the UI; modify MODEL_FETCHABLE_CHANNEL_TYPES
and the switch in the render helper (the function handling channel icon
rendering) accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fe43ea55-7179-456d-aa88-e39022553b8c

📥 Commits

Reviewing files that changed from the base of the PR and between 887a929 and f140ce9.

📒 Files selected for processing (4)
  • common/api_type.go
  • constant/channel.go
  • relay/common/relay_info.go
  • web/src/constants/channel.constants.js

Comment on lines +192 to +196
{
value: 58,
color: 'green',
label: 'Avian',
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Complete Avian’s frontend enumeration updates.

Line 192-Line 196 adds the dropdown option, but Avian is still missing from MODEL_FETCHABLE_CHANNEL_TYPES (Line 200-Line 202), and web/src/helpers/render.jsx has no case 58 icon branch. This leads to partial UI support (no model auto-fetch path and no channel icon).

Suggested follow-up changes
// web/src/constants/channel.constants.js
 export const MODEL_FETCHABLE_CHANNEL_TYPES = new Set([
   1, 4, 14, 34, 17, 26, 27, 24, 47, 25, 20, 23, 31, 40, 42, 48, 43,
+  58,
 ]);
// web/src/helpers/render.jsx
   switch (channelType) {
     case 1: // OpenAI
     case 3: // Azure OpenAI
     case 57: // Codex
+    case 58: // Avian
       return <OpenAI size={iconSize} />;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/src/constants/channel.constants.js` around lines 192 - 196, Add Avian
(value 58) to the MODEL_FETCHABLE_CHANNEL_TYPES array so the model auto-fetch
path recognizes the new channel, and update the channel-rendering switch in the
render helper by adding a case for 58 that returns the Avian icon component
(import the Avian icon if needed) so the channel shows the correct icon in the
UI; modify MODEL_FETCHABLE_CHANNEL_TYPES and the switch in the render helper
(the function handling channel icon rendering) accordingly.

@seefs001

seefs001 commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

At present, we will only consider adding well-known AI providers; for all other providers, please use the OpenAI channel type for integration.

@seefs001 seefs001 closed this Mar 5, 2026
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.

2 participants