feat: add MiniMax as LLM provider for film skill extraction#8
Open
octo-patch wants to merge 1 commit intoForget-C:mainfrom
Open
feat: add MiniMax as LLM provider for film skill extraction#8octo-patch wants to merge 1 commit intoForget-C:mainfrom
octo-patch wants to merge 1 commit intoForget-C:mainfrom
Conversation
Owner
|
Thank you for your submission. @octo-patch I have updated the code version, the new version is for the model supplier in the database. If convenient, please merge the code and submit again. |
- Add MiniMax chat model provider (OpenAI-compatible interface) - Register MiniMax with default base URL https://api.minimax.io/v1 - Support MiniMax-M2.7 and MiniMax-M2.7-highspeed models - Add MINIMAX_API_KEY environment variable support via existing Provider API - Add unit tests for MiniMax provider registration and model names
e141960 to
02ecfaa
Compare
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.
Summary
Add MiniMax as an alternative LLM provider for film skill extraction. MiniMax provides an OpenAI-compatible API, enabling seamless integration via
langchain-openai'sChatOpenAIwith a custombase_url.Changes
Backend (3 files):
config.py: AddMINIMAX_API_KEY,MINIMAX_BASE_URL,MINIMAX_MODEL, andLLM_PROVIDERenv varsdependencies.py: Refactorget_llm()to support provider auto-detection (OpenAI > MiniMax) and explicit selection viaLLM_PROVIDER.env.example: Add MiniMax configuration section with documentationFrontend (2 files):
constants.ts: AddPROVIDER_PRESETSwith Base URL and description for OpenAI, MiniMax, 火山引擎, 阿里百炼ProvidersTab.tsx: Auto-populate Base URL and description when selecting a preset providerTests (2 files):
test_llm_provider.py: 18 unit tests + 2 integration tests for provider resolution, config defaults, error handling, and real MiniMax API callstest_skills_integration.py: Update real LLM integration tests to supportMINIMAX_API_KEYUsage
Set in
.env:Or explicitly select the provider:
Test Plan
pytest tests/test_llm_provider.py -k "not Integration")MINIMAX_API_KEY=... pytest tests/test_llm_provider.py -m integration)