Skip to content

feat: Support multiple models per BYOK platform#1500

Open
dev-miro26 wants to merge 8 commits intoeigent-ai:mainfrom
dev-miro26:feat/byok-multiple-models-per-platform
Open

feat: Support multiple models per BYOK platform#1500
dev-miro26 wants to merge 8 commits intoeigent-ai:mainfrom
dev-miro26:feat/byok-multiple-models-per-platform

Conversation

@dev-miro26
Copy link
Contributor

@dev-miro26 dev-miro26 commented Mar 16, 2026

Related Issue:

Closes #1399

Description

Previously, BYOK required users to specify only one model name per platform. Switching between models (e.g., Claude Opus vs Sonnet vs Haiku on Anthropic) required manually editing the model name each time, which is tedious given that most LLM platforms offer several models with different prices and capabilities.
This PR adds support for saving and managing multiple model names per BYOK platform:

  • Database: New model_types JSON column on the provider table (with migration and backfill of existing model_type values).
  • Server: Provider, ProviderIn, and ProviderOut models updated. Create/update endpoints ensure model_types stays in sync with the active model_type.
  • Frontend – Models settings: The single model-type text input is replaced with a multi-model chip UI. Users can add models from a suggestions dropdown (pre-populated per platform) or type custom names. Clicking a chip sets it as the active model; each chip has an X to remove it. The active model is highlighted with a star icon and green border.
  • Frontend – Add Worker: When assigning a custom model to an agent, the model type field now shows a dropdown of the user's saved models for the selected platform instead of a free-text input.
  • Suggested models: Added commonly used model identifiers for OpenAI, Anthropic, Gemini, DeepSeek, Mistral, Grok, Qwen, Z.ai, Moonshot, and Ernie to help users discover models without external research.
  • Backward compatible: model_type remains the "active" model used by chatStore and the backend agent system. No changes to the task execution flow.

Testing Evidence (REQUIRED)

  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

eigent-1399

@dev-miro26
Copy link
Contributor Author

Hi, @4pmtong
Could you please check this PR and left comment kinldy?

@4pmtong
Copy link
Collaborator

4pmtong commented Mar 17, 2026

Thanks @dev-miro26 for contribution! Could @fengju0213 @a7m-1st help review it?

@4pmtong 4pmtong requested review from a7m-1st and fengju0213 March 17, 2026 11:13
Copy link
Collaborator

@fengju0213 fengju0213 left a comment

Choose a reason for hiding this comment

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

Image seems like some ui bug

@dev-miro26
Copy link
Contributor Author

@fengju0213
Let me check and fix.

@fengju0213
Copy link
Collaborator

The changes were not persisted to the provider, and even when the model was modified, the old model was still being used.

description: 'OpenAI model configuration.',
is_valid: false,
model_type: '',
suggestedModels: [
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think hardcode suggestedModels may not a good approach?i think we already fetch the model from camel side?

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will fix all issues soon!

Copy link
Collaborator

@bytecii bytecii left a comment

Choose a reason for hiding this comment

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

IMO we shouldn't store these model selection candidates in the database

@dev-miro26
Copy link
Contributor Author

IMO we shouldn't store these model selection candidates in the database

@dev-miro26 dev-miro26 closed this Mar 18, 2026
@dev-miro26 dev-miro26 reopened this Mar 18, 2026
@dev-miro26
Copy link
Contributor Author

@4pmtong @fengju0213 @bytecii

I’ve updated the code. The suggestedModels (model selection candidates) are currently hardcoded because fetching model_type values requires an API key for each model_provider.

Example: If we want to get the models from OpenAI, we need an OpenAI API key:

curl https://api.openai.com/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "OpenAI-Organization: $ORGANIZATION_ID" \
  -H "OpenAI-Project: $PROJECT_ID"

So, to retrieve the models for each BYOK provider and populate suggestedModels, we would need the corresponding API key for each provider.

Could you please review it again and kindly leave any feedback?

@dev-miro26
Copy link
Contributor Author

Hi, @fengju0213
Could you please review this PR again?

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.

[Feature Request] BYOK - Save & Support Multiple Models Per Platform

4 participants