fix: add DeepSeek, Z.ai, MiniMax, Moonshot, SambaNova to PLATFORM_ALIAS_MAPPING (fixes #1578, #1556)#1675
Open
carlosjarenom wants to merge 1 commit into
Conversation
…AS_MAPPING (fixes eigent-ai#1578, eigent-ai#1556) These providers use OpenAI-compatible APIs but were missing from the backend alias mapping, causing BYOK validation to fail when users configured them through the UI. Changes: - Add 'deepseek' -> 'openai-compatible-model' (fixes eigent-ai#1578) - Change 'z.ai' from 'zhipu' to 'openai-compatible-model' (fixes eigent-ai#1556) - Add 'minimax', 'moonshot', 'samba-nova' -> 'openai-compatible-model' - Update tests to reflect new mappings All these providers expose OpenAI-compatible endpoints according to their API documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users configuring DeepSeek, Z.ai, MiniMax, Moonshot, or SambaNova as custom API keys through the BYOK UI would encounter validation failures. The backend's
PLATFORM_ALIAS_MAPPINGwas missing these providers.Related issues: #1578 (DeepSeek), #1556 (Z.ai)
Root Cause
The frontend (
src/lib/llm.ts) lists these providers as BYOK options, but the backend alias mapping didn't include entries for them, so they were passed directly to CAMEL which couldn't recognize them.Additionally,
z.aiwas incorrectly mapped to"zhipu"instead of"openai-compatible-model".Fix
Updated
backend/app/model/model_platform.py:deepseek→openai-compatible-model(new)z.ai→openai-compatible-model(was incorrectlyzhipu)minimax→openai-compatible-model(new)moonshot→openai-compatible-model(new)samba-nova→openai-compatible-model(new)All these providers expose OpenAI-compatible API endpoints.
Also updated the test file to cover the new mappings.
Files Changed
backend/app/model/model_platform.py- Added missing provider aliasesbackend/tests/app/model/test_model_platform.py- Updated tests