feat(providers): add MiniMax provider (MiniMax-M2.7, M2.5, 204K context) - #15
Open
octo-patch wants to merge 1 commit into
Open
feat(providers): add MiniMax provider (MiniMax-M2.7, M2.5, 204K context)#15octo-patch wants to merge 1 commit into
octo-patch wants to merge 1 commit into
Conversation
Add providers/minimax package that configures the existing openai provider to use the MiniMax OpenAI-compatible API endpoint (https://api.minimax.io/v1). - Supports MiniMax-M2.7, M2.7-highspeed, M2.5, M2.5-highspeed models - Temperature auto-clamped to (0, 1] as required by MiniMax API - 10 unit tests + 1 live integration test - examples/minimax/main.go: minimal chat loop example - README updated to highlight the new provider
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
This PR adds a
providers/minimaxpackage that makes it easy to use MiniMax language models with the Agency library.MiniMax exposes an OpenAI-compatible REST API (
https://api.minimax.io/v1), so the new package is a thin wrapper around the existingproviders/openaipackage.What changed
providers/minimax/provider.goNew(), model constants,TextToText(),TextToStream(), temperature clampingproviders/minimax/provider_test.goproviders/minimax/provider_integration_test.goMINIMAX_API_KEYis unset)examples/minimax/main.goREADME.mdSupported models
ModelM27MiniMax-M2.7ModelM27HighSpeedMiniMax-M2.7-highspeedModelM25MiniMax-M2.5ModelM25HighSpeedMiniMax-M2.5-highspeedTemperature handling
MiniMax requires temperature to be in the range (0, 1]. The provider automatically clamps any nil/zero/negative value to
0.01and any value above1to1.0, so callers never need to worry about invalid values.Usage
Tests