-
Notifications
You must be signed in to change notification settings - Fork 633
Add MiniMax LLM adapter #2156
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
Closed
octo-patch
wants to merge
4
commits into
Zipstack:main
from
octo-patch:octo/20260706-provider-add-recvozNE1fKYRA
Closed
Add MiniMax LLM adapter #2156
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| from typing import Any | ||
|
|
||
| from unstract.sdk1.adapters.base1 import BaseAdapter, MiniMaxLLMParameters | ||
| from unstract.sdk1.adapters.enums import AdapterTypes | ||
|
|
||
| DESCRIPTION = ( | ||
| "Adapter for MiniMax's OpenAI-compatible API. " | ||
| "Supply a model name and your MiniMax API key; the endpoint is preconfigured." | ||
| ) | ||
|
|
||
|
|
||
| class MiniMaxLLMAdapter(MiniMaxLLMParameters, BaseAdapter): | ||
| @staticmethod | ||
| def get_id() -> str: | ||
| return "minimax|4f0e4241-2430-4921-81bf-8b2c6040d8d2" | ||
|
|
||
| @staticmethod | ||
| def get_metadata() -> dict[str, Any]: | ||
| return { | ||
| "name": "MiniMax", | ||
| "version": "1.0.0", | ||
| "adapter": MiniMaxLLMAdapter, | ||
| "description": DESCRIPTION, | ||
| "is_active": True, | ||
| } | ||
|
|
||
| @staticmethod | ||
| def get_name() -> str: | ||
| return "MiniMax" | ||
|
|
||
| @staticmethod | ||
| def get_description() -> str: | ||
| return DESCRIPTION | ||
|
|
||
| @staticmethod | ||
| def get_provider() -> str: | ||
| return "minimax" | ||
|
|
||
| @staticmethod | ||
| def get_icon() -> str: | ||
| return "/icons/adapter-icons/MiniMax.png" | ||
|
|
||
| @staticmethod | ||
| def get_adapter_type() -> AdapterTypes: | ||
| return AdapterTypes.LLM | ||
70 changes: 70 additions & 0 deletions
70
unstract/sdk1/src/unstract/sdk1/adapters/llm1/static/minimax.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| { | ||
| "title": "MiniMax", | ||
| "type": "object", | ||
| "required": [ | ||
| "adapter_name", | ||
| "api_key", | ||
| "model" | ||
| ], | ||
| "properties": { | ||
| "adapter_name": { | ||
| "type": "string", | ||
| "title": "Name", | ||
| "default": "", | ||
| "description": "Provide a unique name for this adapter instance. Example: minimax-1" | ||
| }, | ||
| "api_key": { | ||
| "type": "string", | ||
| "title": "API Key", | ||
| "format": "password", | ||
| "description": "Your MiniMax API key from [platform.minimax.io](https://platform.minimax.io)." | ||
| }, | ||
| "model": { | ||
| "type": "string", | ||
| "title": "Model", | ||
| "default": "MiniMax-M3", | ||
| "examples": [ | ||
| "MiniMax-M3", | ||
| "MiniMax-M2.7" | ||
| ], | ||
| "description": "MiniMax-M3 supports a 1,000,000-token context window and multimodal input. MiniMax-M2.7 supports a 204,800-token context window and text input." | ||
| }, | ||
| "api_base": { | ||
| "type": "string", | ||
| "format": "url", | ||
| "title": "API Base", | ||
| "default": "https://api.minimax.io/v1", | ||
| "description": "MiniMax OpenAI-compatible endpoint. The default is for global accounts; use https://api.minimaxi.com/v1 for China accounts." | ||
| }, | ||
| "max_tokens": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "multipleOf": 1, | ||
| "title": "Maximum Output Tokens", | ||
| "default": 4096, | ||
| "description": "Maximum number of output tokens to limit LLM replies. Leave it empty to use the provider default." | ||
| }, | ||
| "max_retries": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "multipleOf": 1, | ||
| "title": "Max Retries", | ||
| "default": 5, | ||
| "description": "The maximum number of times to retry a request if it fails." | ||
| }, | ||
| "timeout": { | ||
| "type": "number", | ||
| "minimum": 0, | ||
| "multipleOf": 1, | ||
| "title": "Timeout", | ||
| "default": 900, | ||
| "description": "Timeout in seconds." | ||
| }, | ||
| "enable_thinking": { | ||
| "type": "boolean", | ||
| "title": "Enable Thinking", | ||
| "default": true, | ||
| "description": "Enable adaptive thinking for MiniMax-M3. MiniMax-M2.7 always keeps thinking enabled." | ||
| } | ||
| } | ||
| } |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shipped
MiniMax.pngis the OpenRouter logo.frontend/public/icons/adapter-icons/MiniMax.pngis byte-for-byte identical toOpenRouter.png:Both 29953 bytes. Rendering it confirms it's the OpenRouter fork-arrow mark.
NvidiaBuild.pngdiffers, so this isn't a shared-placeholder convention — it looks like the icon was copied along with the adapter template and never swapped.Users would see OpenRouter's branding on the MiniMax card in the adapter picker. Needs the real MiniMax logo.