Skip to content

Add Featherless AI provider (access to 10,000+ open source models) #8277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

DarinVerheijke
Copy link

@DarinVerheijke DarinVerheijke commented Jun 27, 2025

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

Adds Featherless AI as a provider giving access to over 10,000+ open-weight models

📝 补充信息 | Additional Information

Logo needs to be added
Currently added only the popular well known base models, by request I can add more that are available on the list here https://featherless.ai/models

Summary by Sourcery

Add Featherless AI as a new LLM provider to grant access to over 10,000 open-weight models in LobeChat

New Features:

  • Integrate Featherless AI provider card and runtime into LLM configuration, provider lists, and runtime map
  • Add environment variables, config schema entries, and key vault support for Featherless AI API
  • Include a curated default set of popular Featherless AI chat models and register them in the AI models registry

Build:

  • Update Dockerfiles to expose FEATHERLESS_API_KEY and FEATHERLESS_MODEL_LIST environment variables

Documentation:

  • Add English and Chinese usage guides for configuring and using Featherless AI in LobeChat

Copy link

vercel bot commented Jun 27, 2025

@DarinVerheijke is attempting to deploy a commit to the LobeHub OSS Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Contributor

sourcery-ai bot commented Jun 27, 2025

Reviewer's Guide

This PR integrates Featherless AI as a new model provider by extending configuration schemas and environment variables, registering the provider and its models in the application and settings UI, implementing the runtime adapter, adding Docker support, and providing usage documentation in both English and Chinese.

Entity relationship diagram for Featherless AI models and provider

erDiagram
    FEATHERLESSAI_PROVIDER ||--o{ FEATHERLESSAI_MODEL : provides
    FEATHERLESSAI_MODEL {
      string id
      string displayName
      string description
      int contextWindowTokens
      bool enabled
      object pricing
      string type
    }
    FEATHERLESSAI_PROVIDER {
      string id
      string name
      string description
      string url
    }
Loading

Class diagram for Featherless AI provider integration

classDiagram
    class ModelProviderCard {
      +chatModels: ChatModelCard[]
      +checkModel: string
      +description: string
      +disableBrowserRequest: boolean
      +id: string
      +modelsUrl: string
      +name: string
      +settings: object
      +url: string
    }
    class FeatherlessAIProviderCard {
      <<implements>> ModelProviderCard
    }
    class LobeFeatherlessAI {
      +baseURL: string
      +debug: object
      +provider: ModelProvider
    }
    class ModelProvider {
      <<enum>>
      +FeatherlessAI
    }
    class UserKeyVaults {
      +featherlessai?: OpenAICompatibleKeyVault
    }
    ModelProviderCard <|.. FeatherlessAIProviderCard
    ModelProvider <|-- LobeFeatherlessAI
    UserKeyVaults --> OpenAICompatibleKeyVault
Loading

File-Level Changes

Change Details Files
Environment and configuration schema extensions
  • Added ENABLED_FEATHERLESSAI and FEATHERLESSAI_API_KEY to llm config with zod schema
  • Introduced FEATHERLESS_API_KEY and FEATHERLESS_MODEL_LIST env vars in Dockerfile
  • Extended ModelProvider enum and UserKeyVaults type to include featherlessai
src/config/llm.ts
Dockerfile
src/libs/model-runtime/types/type.ts
src/types/user/settings/keyVaults.ts
Provider registration and UI integration
  • Registered FeatherlessAIProvider in default and LOBE model provider lists
  • Exported FeatherlessAIProviderCard and imported it in settings UI
  • Added featherlessai to aiModels index for default model list
src/config/modelProviders/index.ts
src/config/modelProviders/featherlessai.ts
src/config/aiModels/index.ts
src/app/[variants]/(main)/settings/llm/ProviderList/providers.tsx
Runtime adapter implementation
  • Extended providerRuntimeMap with LobeFeatherlessAI
  • Implemented LobeFeatherlessAI using openAICompatibleFactory
src/libs/model-runtime/runtimeMap.ts
src/libs/model-runtime/featherlessai/index.ts
Model definition for Featherless AI
  • Created featherlessai.ts with initial list of popular open-weight chat models
  • Exported allModels array from the new module
src/config/aiModels/featherlessai.ts
Usage documentation in English and Chinese
  • Added docs/usage/providers/featherlessai.mdx
  • Added docs/usage/providers/featherlessai.zh-CN.mdx
docs/usage/providers/featherlessai.mdx
docs/usage/providers/featherlessai.zh-CN.mdx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 27, 2025
Copy link
Contributor

gru-agent bot commented Jun 27, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 50416ad 🚫 Skipped No files need to be tested {"Dockerfile":"File path does not match include patterns.","Dockerfile.database":"File path does not match include patterns.","Dockerfile.pglite":"File path does not match include patterns.","docs/usage/providers/featherlessai.mdx":"File path does not match include patterns.","docs/usage/providers/featherlessai.zh-CN.mdx":"File path does not match include patterns.","src/app/[variants]/(main)/settings/llm/ProviderList/providers.tsx":"File path does not match include patterns.","src/config/aiModels/featherlessai.ts":"File path does not match include patterns.","src/config/aiModels/index.ts":"File path does not match include patterns.","src/config/llm.ts":"File path does not match include patterns.","src/config/modelProviders/featherlessai.ts":"File path does not match include patterns.","src/config/modelProviders/index.ts":"File path does not match include patterns.","src/libs/model-runtime/featherlessai/index.ts":"File path does not match include patterns.","…

History Assignment

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@lobehubbot
Copy link
Member

👍 @DarinVerheijke

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@dosubot dosubot bot added the Model Provider 模型服务商 label Jun 27, 2025
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @DarinVerheijke - I've reviewed your changes - here's some feedback:

  • The checkModel value (Qwen/Qwen2.5-32B-Instruct) isn’t present in your static model list—please reconcile or update it to avoid runtime lookup failures.
  • The Dockerfile env vars (FEATHERLESS_API_KEY / FEATHERLESS_MODEL_LIST) don’t match the code’s FEATHERLESSAI_API_KEY naming—please align these with other providers for consistency.
  • Maintaining 150+ static model entries will become hard to keep in sync—consider fetching the available Featherless AI model list dynamically instead.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `checkModel` value (`Qwen/Qwen2.5-32B-Instruct`) isn’t present in your static model list—please reconcile or update it to avoid runtime lookup failures.
- The Dockerfile env vars (`FEATHERLESS_API_KEY` / `FEATHERLESS_MODEL_LIST`) don’t match the code’s `FEATHERLESSAI_API_KEY` naming—please align these with other providers for consistency.
- Maintaining 150+ static model entries will become hard to keep in sync—consider fetching the available Featherless AI model list dynamically instead.

## Individual Comments

### Comment 1
<location> `src/config/modelProviders/featherlessai.ts:5` </location>
<code_context>
+
+const FeatherlessAI: ModelProviderCard = {
+  chatModels: [],
+  checkModel: 'Qwen/Qwen2.5-32B-Instruct',
+  description: 'Featherless AI 通过单一 API 提供对超过 10,000 个开源模型的访问,并采用订阅式定价。',
+  disableBrowserRequest: true,
</code_context>

<issue_to_address>
The checkModel value does not match any model in the FeatherlessAI model list.

'Qwen/Qwen2.5-32B-Instruct' is not present in src/config/aiModels/featherlessai.ts. Please update checkModel to use a valid model ID from the FeatherlessAI model list to avoid potential verification or health check issues.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.


const FeatherlessAI: ModelProviderCard = {
chatModels: [],
checkModel: 'Qwen/Qwen2.5-32B-Instruct',
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): The checkModel value does not match any model in the FeatherlessAI model list.

'Qwen/Qwen2.5-32B-Instruct' is not present in src/config/aiModels/featherlessai.ts. Please update checkModel to use a valid model ID from the FeatherlessAI model list to avoid potential verification or health check issues.

@arvinxx
Copy link
Member

arvinxx commented Aug 7, 2025

@DarinVerheijke Hi please rebase the main, and the left is lgtm

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Aug 7, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Aug 7, 2025
@DarinVerheijke
Copy link
Author

DarinVerheijke commented Aug 7, 2025

@DarinVerheijke Hi please rebase the main, and the left is lgtm

Done and added the new oss open-ai one to model list @arvinxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Model Provider 模型服务商 size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants