Skip to content

feat: add MiniMax provider instrumentation - #735

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

feat: add MiniMax provider instrumentation#735
octo-patch wants to merge 1 commit into
JudgmentLabs:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

@octo-patch octo-patch commented Apr 8, 2026

Copy link
Copy Markdown

Summary

  • Adds MiniMax chat model provider instrumentation using the OpenAI-compatible API (api.minimax.io)
  • Detects MiniMax clients by inspecting the base_url of an OpenAI client before falling through to the standard OpenAI path
  • Introduces ProviderType.MINIMAX and tags all spans as MINIMAX_API_CALL with model names prefixed as minimax/<model>
  • Supports sync/async clients and both streaming and non-streaming calls
  • Adds 14 unit tests covering: client detection, span creation, span kind, model name prefix, token usage, error handling, and return value passthrough

Usage

from openai import OpenAI
from judgeval import Tracer, wrap

Tracer.init(project_name="my-project")

client = wrap(OpenAI(
    api_key="MINIMAX_API_KEY",
    base_url="https://api.minimax.io/v1",
))

response = client.chat.completions.create(
    model="MiniMax-M2.7",
    messages=[{"role": "user", "content": "Hello!"}],
    temperature=1.0,
)

Spans will appear in your Judgment dashboard tagged as MINIMAX_API_CALL with model minimax/MiniMax-M2.7.

Supported models

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

API reference


Open with Devin

- Add MiniMax chat model provider using OpenAI-compatible API
- Detect MiniMax clients by checking base_url for api.minimax.io
- Add ProviderType.MINIMAX enum value (checked before OPENAI to intercept correctly)
- Tag spans as MINIMAX_API_CALL with minimax/<model> prefix in model name
- Support sync/async clients and streaming/non-streaming calls
- Add MINIMAX_API_KEY environment variable support via OpenAI SDK
- Add 14 unit tests covering detection, span creation, token usage, and error handling

Supported models: MiniMax-M2.7, MiniMax-M2.7-highspeed
API reference: https://platform.minimax.io/docs/api-reference/text-openai-api

@propel-code-bot propel-code-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review found no issues; MiniMax instrumentation appears well-covered and ready to merge.

Status: No Issues Found | Risk: Low

Review Details

📁 10 files reviewed | 💬 0 comments

@propel-code-bot

Copy link
Copy Markdown

✔️ Propel has finished reviewing this change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant