Add MiniMax as alternative LLM provider for Moirai Agent#254
Open
octo-patch wants to merge 1 commit into
Open
Conversation
Introduce a provider abstraction layer (llm_provider.py) that translates between OpenAI's Responses API and the standard Chat Completions API, enabling MiniMax (M2.7/M2.5) and other OpenAI-compatible providers to power the ctx_forecast MCP agent alongside the existing OpenAI backend. Changes: - New llm_provider.py with OpenAIResponsesProvider and ChatCompletionsProvider - MCPClient now uses create_llm_provider() factory instead of direct OpenAI SDK - config.py updated with provider selection docs and MiniMax config example - README.md documents MiniMax setup with model table - 30 unit tests + 4 integration tests (text, tool calling, multi-turn)
|
Thanks for the contribution! Before we can merge this, we need @Octocat-dev to sign the Salesforce Inc. Contributor License Agreement. |
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 the ctx_forecast Moirai Agent, alongside the existing OpenAI backend.
What changed
llm_provider.py— provider abstraction that translates between OpenAI Responses API and Chat Completions API. IncludesOpenAIResponsesProviderandChatCompletionsProvider.mcp_client.py— replaced directOpenAI()client withcreate_llm_provider(config)factory. Existing OpenAI behavior fully preserved.config.py— added"provider"field documentation and MiniMax config example.README.md— documented MiniMax setup with model table.Models supported
MiniMax-M2.7MiniMax-M2.7-highspeedMiniMax-M2.5MiniMax-M2.5-highspeedTest plan