Skip to content

feat: add Avian as AI provider#11447

Merged
sanket-a11y merged 10 commits intoactivepieces:mainfrom
avianion:add-avian-ai-provider
Apr 30, 2026
Merged

feat: add Avian as AI provider#11447
sanket-a11y merged 10 commits intoactivepieces:mainfrom
avianion:add-avian-ai-provider

Conversation

@avianion
Copy link
Copy Markdown
Contributor

Summary

  • Adds Avian as a first-class AI provider in Activepieces
  • Avian provides an OpenAI-compatible API (chat completions, streaming, function calling) at https://api.avian.io/v1
  • Available models include DeepSeek-V3.2, Kimi-K2.5, GLM-5, and MiniMax-M2.5
  • Auth via Bearer token (Authorization: Bearer <AVIAN_API_KEY>)

Changes

File Change
packages/shared/.../ai-providers/index.ts Add AVIAN to AIProviderName enum, auth config, provider config, and discriminated union types
packages/server/.../providers/avian-provider.ts New provider strategy -- validates connection via GET /v1/models, lists available models dynamically
packages/server/.../providers/index.ts Register avianProvider in the providers record
packages/pieces/.../ai-sdk.ts Add AIProviderName.AVIAN case using @ai-sdk/openai-compatible for chat completions
packages/web/.../ai-providers.ts Add Avian to the UI provider list with setup instructions
packages/web/.../ai-model/hooks.ts Add 'avian' to the Provider type union

Notes

  • The logo URL (https://cdn.activepieces.com/pieces/avian.png) will need the Avian logo uploaded to the CDN by maintainers. Happy to provide the logo file.
  • Follows the same pattern as other OpenAI-compatible providers (OpenRouter, custom). Uses @ai-sdk/openai-compatible for the AI SDK integration.
  • No database migration needed -- the provider enum is stored as a string column.

Test plan

  • Verify TypeScript compilation passes with the new enum value and types
  • Add Avian as an AI provider from the admin console with a valid API key
  • Confirm connection validation succeeds (calls GET /v1/models)
  • Create a flow using the Universal AI piece, select Avian as provider
  • Verify model list populates correctly
  • Run a chat completion and confirm response is returned

cc @abuaboud @AbdulTheActivePiecer

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 27, 2026

CLA assistant check
All committers have signed the CLA.

@avianion
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@avianion
Copy link
Copy Markdown
Contributor Author

recheck

@avianion
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@avianion
Copy link
Copy Markdown
Contributor Author

recheck

1 similar comment
@avianion
Copy link
Copy Markdown
Contributor Author

recheck

@avianion
Copy link
Copy Markdown
Contributor Author

Hey @abuaboud, would love your review on this when you get a chance. Happy to address any feedback!

@avianion
Copy link
Copy Markdown
Contributor 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 @abuaboud

@avianion
Copy link
Copy Markdown
Contributor 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 @abuaboud

@avianion
Copy link
Copy Markdown
Contributor Author

avianion commented Mar 5, 2026

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

Add Avian (https://avian.io) as a first-class AI provider. Avian
offers an OpenAI-compatible API with models including DeepSeek-V3.2,
Kimi-K2.5, GLM-5, and MiniMax-M2.5.

Changes:
- Add AVIAN to AIProviderName enum and shared type definitions
- Create avian-provider.ts server strategy (validates via /v1/models)
- Register provider in server providers index
- Add AI SDK integration using @ai-sdk/openai-compatible
- Add provider entry in web UI with setup instructions
@avianion avianion force-pushed the add-avian-ai-provider branch from 6006bce to b9e36d4 Compare March 6, 2026 21:11
@kishanprmr
Copy link
Copy Markdown
Collaborator

kishanprmr commented Mar 31, 2026

Thanks for the contribution! A piece would be the best fit for Avian here. Could you convert this to a piece? We'd love to review it!

@avianion
Copy link
Copy Markdown
Contributor Author

Thanks for the feedback! Happy to convert this to a piece. To make sure I get the implementation right — should the Avian piece live alongside the existing AI providers (keeping the current changes), or should I remove the AI provider approach entirely and replace it with a standalone piece under packages/pieces/community/avian/?

I'm looking at existing pieces like OpenAI and Azure OpenAI as references. Would a simple piece with a send-prompt (chat completion) action be the right scope to start with?

@avianion
Copy link
Copy Markdown
Contributor Author

avianion commented Apr 7, 2026

Addressed feedback: switched to createOpenAI from @ai-sdk/openai

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 7, 2026

Confidence Score: 5/5

Safe to merge; all findings are P2 quality/style suggestions with no blocking defects

No P0 or P1 issues found. The auth endpoint mismatch and count-based history pruning are worth addressing but neither causes immediate breakage under normal usage patterns.

packages/pieces/community/avian/src/lib/auth.ts — verify /balance endpoint is stable and publicly documented for Avian

Important Files Changed

Filename Overview
packages/pieces/community/avian/src/lib/actions/ask-avian.ts Main action for Avian chat completions with memory support; count-based history pruning (50 msg) can still exceed context windows for long messages
packages/pieces/community/avian/src/lib/auth.ts API key auth with validation; uses /balance endpoint instead of the standard /models endpoint used by every other OpenAI-compatible piece
packages/pieces/community/avian/src/lib/common/common.ts Exports baseUrl and an unauthorizedMessage constant that is never referenced anywhere in the piece
packages/pieces/community/avian/src/index.ts Piece registration with correct category, auth, and action references; minor double-space in description string
packages/pieces/community/avian/package.json Standard piece package structure; dependency versions (openai 4.67.1, zod 4.3.6) match the existing OpenAI piece
tsconfig.base.json Adds @activepieces/piece-avian path alias — correct and minimal change

Reviews (8): Last reviewed commit: "fix: piece version" | Re-trigger Greptile

Comment thread packages/pieces/community/ai/src/lib/common/ai-sdk.ts
@avianion
Copy link
Copy Markdown
Contributor Author

Addressed feedback: removed unreachable isImage branch from AVIAN case since all Avian models are text-only.

@kishanprmr
Copy link
Copy Markdown
Collaborator

@avianion You can create a standalone piece for Avian in the packages/pieces/community/avian folder. You can refer to the openai or anthropic pieces for reference.

@avianion
Copy link
Copy Markdown
Contributor Author

@kishanprmr Addressed feedback: created a standalone Avian piece at packages/pieces/community/avian/, modeled on the existing deepseek piece (same OpenAI-compatible pattern). The piece exposes an Ask Avian action with dynamic model loading, memory key support, and the standard generation parameters. Path alias added to tsconfig.base.json. Let me know if you'd also like the original AI-provider integration removed, or if keeping both is preferred.

@kishanprmr
Copy link
Copy Markdown
Collaborator

@avianion Thanks ! please remove Avian as AI provider integration.

@avianion
Copy link
Copy Markdown
Contributor Author

Addressed feedback: removed Avian as AI provider integration, keeping only the standalone piece.

Comment thread packages/pieces/community/avian/src/lib/actions/ask-avian.ts
@avianion
Copy link
Copy Markdown
Contributor Author

Addressed feedback: added memory history cap (50 messages) to prevent unbounded growth that could exceed context window limits. Oldest messages are dropped when the cap is reached.

@kishanprmr kishanprmr requested a review from sanket-a11y April 30, 2026 10:04
@kishanprmr kishanprmr removed the blocked: waiting-response waiting a response from the user label Apr 30, 2026
@sanket-a11y sanket-a11y merged commit 35581c8 into activepieces:main Apr 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants