Add MiniMax as a first-class LLM provider#696
Open
octo-patch wants to merge 1 commit intocrmne:mainfrom
Open
Conversation
MiniMax offers an OpenAI-compatible API with high-performance language models. This adds MiniMax as a built-in provider following the same patterns as DeepSeek and Perplexity (extending OpenAI). Provider implementation: - MiniMax class extending OpenAI with custom api_base and headers - Temperature module clamping values to [0.0, 1.0] range - Capabilities module with model metadata and pricing - Static Models module (MiniMax has no /v1/models endpoint) - Models: MiniMax-M2.7, M2.7-highspeed, M2.5, M2.5-highspeed Configuration: - minimax_api_key (required) - minimax_api_base (optional, defaults to https://api.minimax.io/v1) Tests: - Provider spec (api_base, headers, configuration, slug) - Capabilities spec (context windows, pricing, model families) - Temperature spec (clamping, nil handling, edge cases) - Models spec (static model list, metadata) - Chat spec (role formatting)
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
Adds MiniMax as a built-in LLM provider, following the same OpenAI-compatible pattern used by DeepSeek and Perplexity.
MiniMax offers high-performance language models with up to 1M token context windows through an OpenAI-compatible API.
Changes
Provider implementation (5 new files)
providers/minimax.rb— Main provider class extendingOpenAI, customapi_baseandheadersproviders/minimax/chat.rb— Role formattingproviders/minimax/capabilities.rb— Model metadata, pricing, and feature flagsproviders/minimax/models.rb— Static model listing (MiniMax has no/v1/modelsendpoint)providers/minimax/temperature.rb— Clamps temperature to[0.0, 1.0]with debug loggingModels supported
MiniMax-M2.7MiniMax-M2.7-highspeedMiniMax-M2.5MiniMax-M2.5-highspeedConfiguration
Tests (5 spec files, 48 examples, 0 failures)
minimax_spec.rb— Provider initialization, API base, headers, configuration, slugminimax/capabilities_spec.rb— Context windows, model families, pricing, featuresminimax/temperature_spec.rb— Clamping, nil handling, edge casesminimax/models_spec.rb— Static model list, metadata, provider slugminimax/chat_spec.rb— Role formattingOther changes
lib/ruby_llm.rbwith Zeitwerk inflection.env.example,README.md, configuration docs, test support filesTest plan
provider_spec.rbtests pass (configuration schema validation)