chore: add MiniMax provider support and update API endpoints

## CHANGES

- add MiniMax provider configuration with API endpoint updates
- implement NeedsRawMode method for MiniMax model handling
- define static MiniMax model list with M2 variants
- add Infermatic and Novita to VS Code extensions
- update test to use proper context.TODO() parameter
- configure MiniMax models as static discovery
- set ModelsURL to static:minimax for model listing
This commit is contained in:
Kayvan Sylvan 2026-01-23 22:45:54 -08:00
parent 27378c06fd
commit 8469665cab
3 changed files with 22 additions and 2 deletions

View file

@ -92,6 +92,7 @@
"horts",
"HTMLURL",
"imagetools",
"Infermatic",
"Jamba",
"jaredmontoya",
"jessevdk",
@ -132,6 +133,7 @@
"nicksnyder",
"nixpkgs",
"nometa",
"Novita",
"numpy",
"ollama",
"ollamaapi",

View file

@ -2,6 +2,7 @@ package openai
import (
"bytes"
"context"
"fmt"
"os"
"strings"
@ -587,7 +588,7 @@ func TestSendResponses_WithWarningIntegration(t *testing.T) {
}
// Call sendResponses - this will trigger the warning and potentially error
_, err := client.sendResponses(nil, msgs, opts)
_, err := client.sendResponses(context.TODO(), msgs, opts)
// Close writer and read warning output
w.Close()

View file

@ -60,6 +60,16 @@ func (c *Client) ListModels() ([]string, error) {
return c.DirectlyGetModels(context.Background())
}
// NeedsRawMode overrides the parent implementation to handle provider-specific raw mode requirements
func (c *Client) NeedsRawMode(modelName string) bool {
// MiniMax models require raw mode for proper message formatting
if c.GetName() == "MiniMax" {
return true
}
// Fall back to parent OpenAI client implementation for other providers
return c.Client.NeedsRawMode(modelName)
}
// getStaticModels returns a predefined list of models for providers that don't support model discovery
func (c *Client) getStaticModels(modelsKey string) ([]string, error) {
switch modelsKey {
@ -117,6 +127,12 @@ func (c *Client) getStaticModels(modelsKey string) ([]string, error) {
"zai-org/glm-4.5",
"zai-org/glm-4.6",
}, nil
case "static:minimax":
return []string{
"MiniMax-M2",
"MiniMax-M2.1",
"MiniMax-M2.1-lightning",
}, nil
default:
return nil, fmt.Errorf("unknown static model list: %s", modelsKey)
}
@ -172,7 +188,8 @@ var ProviderMap = map[string]ProviderConfig{
},
"MiniMax": {
Name: "MiniMax",
BaseURL: "https://api.minimaxi.com/v1",
BaseURL: "https://api.minimax.io/v1",
ModelsURL: "static:minimax",
ImplementsResponses: false,
},
"Mistral": {