Skip to content

feat: add MiniMax provider support for PicoOraClaw#138

Open
octo-patch wants to merge 1 commit into
oracle-devrel:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax provider support for PicoOraClaw#138
octo-patch wants to merge 1 commit into
oracle-devrel:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

Copy link
Copy Markdown

Summary

Add MiniMax as a new LLM provider for PicoOraClaw, using the OpenAI-compatible API.

Changes

  • Provider integration: Add MiniMax to the provider factory (CreateProvider) with support for both explicit provider name (minimax/MiniMax) and auto-detection from model name
  • Temperature handling: Clamp temperature to the valid range (0.0, 1.0] as required by the MiniMax API
  • Model prefix stripping: Support minimax/model-name prefix format
  • Configuration: Add minimax section to ProvidersConfig, config.example.json, and .env.example
  • Documentation: Update README with provider table entry and configuration example
  • Tests: Add 9 comprehensive unit tests covering chat, streaming, tool calling, temperature clamping, model prefix stripping, and provider creation

Supported Models

Model Description
MiniMax-M2.7 Peak Performance. Ultimate Value. Master the Complex
MiniMax-M2.7-highspeed Same performance, faster and more agile

Configuration

{
  "agents": {
    "defaults": {
      "provider": "minimax",
      "model": "MiniMax-M2.7"
    }
  },
  "providers": {
    "minimax": {
      "api_key": "your-key",
      "api_base": "https://api.minimax.io/v1"
    }
  }
}

API Reference

Test Results

All 9 new tests pass, and all 100 existing provider tests continue to pass with no regressions.

=== RUN   TestMiniMaxProvider_ChatRoundTrip          --- PASS
=== RUN   TestMiniMaxProvider_TemperatureClamp       --- PASS (5 sub-tests)
=== RUN   TestMiniMaxProvider_ModelPrefixStripping   --- PASS
=== RUN   TestMiniMaxProvider_ToolCalling            --- PASS
=== RUN   TestMiniMaxProvider_DefaultBaseURL          --- PASS
=== RUN   TestMiniMaxProvider_Streaming              --- PASS
=== RUN   TestCreateProvider_MiniMax                 --- PASS
=== RUN   TestCreateProvider_MiniMaxDefaultBaseURL   --- PASS
=== RUN   TestCreateProvider_MiniMaxAlias            --- PASS

- Add MiniMax as a new LLM provider using OpenAI-compatible API
- Support models: MiniMax-M2.7 and MiniMax-M2.7-highspeed
- Handle temperature constraint (must be in (0.0, 1.0])
- Support provider name aliases: "minimax" and "MiniMax"
- Support model prefix stripping for minimax/ prefix
- Add MINIMAX_API_KEY environment variable
- Add comprehensive unit tests (9 test cases)
- Update README with provider documentation and config example

API docs:
- Chat (OpenAI Compatible): https://platform.minimax.io/docs/api-reference/text-openai-api

Signed-off-by: octo-patch <octo-patch@github.com>
@oracle-contributor-agreement

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label May 13, 2026
@jasperan

Copy link
Copy Markdown
Member

hey @octo-patch, could you please sign the Oracle Contributor Agreement please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants