From 0aab3ae762551b638aeda49cbf0d0b39ef7a73c1 Mon Sep 17 00:00:00 2001 From: octo-patch <266937838+octo-patch@users.noreply.github.com> Date: Thu, 30 Jul 2026 04:57:56 +0000 Subject: [PATCH] Add MiniMax provider routing to the PRICE API judge Register the minimax-m3 and minimax-m2.7 judge aliases, map them to a new minimax provider with the global OpenAI-compatible default endpoint, and declare their official model ids. The mainland China endpoint is selectable through the existing per-provider base_url override. Reuses the existing OpenAI-compatible chat client and multimodal message builder. Documentation and the example env are updated to match. --- evaluation/image_gen/PRICE/README.md | 7 +++++++ evaluation/image_gen/PRICE/env.example.toml | 9 +++++++-- evaluation/image_gen/PRICE/scripts/eval_imgs.py | 9 +++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/evaluation/image_gen/PRICE/README.md b/evaluation/image_gen/PRICE/README.md index c2c1881..7fdbafc 100644 --- a/evaluation/image_gen/PRICE/README.md +++ b/evaluation/image_gen/PRICE/README.md @@ -118,6 +118,9 @@ api_key = "YOUR_GEMINI_API_KEY" [doubao] api_key = "YOUR_DOUBAO_API_KEY" + +[minimax] +api_key = "YOUR_MINIMAX_API_KEY" ``` The supported API judge aliases are: @@ -127,6 +130,10 @@ The supported API judge aliases are: | `gemini3.1` | Gemini official API or AiHubMix fallback | | `gpt5.4` | OpenAI official API or AiHubMix fallback | | `doubao2.0` | Doubao official API or AiHubMix fallback | +| `minimax-m3` | MiniMax official API or AiHubMix fallback | +| `minimax-m2.7` | MiniMax official API or AiHubMix fallback | + +The MiniMax provider defaults to the global endpoint (`https://api.minimax.io/v1`). To use the mainland China site instead, set `base_url = "https://api.minimaxi.com/v1"` under `[minimax]` in `env.toml`. If an official provider key is unavailable, configure the optional fallback: diff --git a/evaluation/image_gen/PRICE/env.example.toml b/evaluation/image_gen/PRICE/env.example.toml index 88af88e..29390d5 100644 --- a/evaluation/image_gen/PRICE/env.example.toml +++ b/evaluation/image_gen/PRICE/env.example.toml @@ -1,6 +1,6 @@ # Recommended: official provider APIs. Fill in whichever providers you plan -# to use — gemini3.1 -> [gemini], gpt5.4 -> [openai], doubao2.0 -> [doubao]. -# You don't need all three. +# to use — gemini3.1 -> [gemini], gpt5.4 -> [openai], doubao2.0 -> [doubao], +# minimax-m3 / minimax-m2.7 -> [minimax]. You don't need all of them. [openai] api_key = "YOUR_OPENAI_API_KEY" @@ -15,6 +15,11 @@ api_key = "YOUR_DOUBAO_API_KEY" # base_url = "https://ark.cn-beijing.volces.com/api/v3" # optional override # endpoint_id = "ep-xxxxxxxxxxxx" # optional: use an Ark inference endpoint id instead of a model name +[minimax] +api_key = "YOUR_MINIMAX_API_KEY" +# base_url = "https://api.minimax.io/v1" # optional override (global/international default) +# base_url = "https://api.minimaxi.com/v1" # use this for the mainland China site instead + # Fallback: any judge whose provider table above isn't filled in (or whose # api_key is left as the placeholder) uses this aggregator instead. A single # key here is the simplest way to get started without official provider keys. diff --git a/evaluation/image_gen/PRICE/scripts/eval_imgs.py b/evaluation/image_gen/PRICE/scripts/eval_imgs.py index 2122bb9..8df2948 100644 --- a/evaluation/image_gen/PRICE/scripts/eval_imgs.py +++ b/evaluation/image_gen/PRICE/scripts/eval_imgs.py @@ -33,6 +33,8 @@ "gemini3.1": "gemini-3.1-pro-preview", "gpt5.4": "gpt-5.4-high", "doubao2.0": "doubao-seed-2-0-pro", + "minimax-m3": "MiniMax-M3", + "minimax-m2.7": "MiniMax-M2.7", } # Optional direct-to-provider routing (see docs/PUBLIC_OFFICIAL_API_JUDGES_PLAN_zh.md). @@ -42,6 +44,8 @@ "gemini3.1": "gemini", "gpt5.4": "openai", "doubao2.0": "doubao", + "minimax-m3": "minimax", + "minimax-m2.7": "minimax", } # NOTE: these base URLs are the providers' publicly documented endpoints, but the @@ -51,6 +55,9 @@ "openai": "https://api.openai.com/v1", "gemini": "https://generativelanguage.googleapis.com/v1beta/openai/", "doubao": "https://ark.cn-beijing.volces.com/api/v3", + # Global (international) OpenAI-compatible endpoint. For the mainland China + # site set base_url = "https://api.minimaxi.com/v1" under [minimax] in env.toml. + "minimax": "https://api.minimax.io/v1", } # NOTE: unverified best-effort defaults, reusing the aggregator's alias strings (a @@ -60,6 +67,8 @@ "gemini3.1": "gemini-3.1-pro-preview", "gpt5.4": "gpt-5.4-high", "doubao2.0": "doubao-seed-2-0-pro", + "minimax-m3": "MiniMax-M3", + "minimax-m2.7": "MiniMax-M2.7", } PROVIDER_MODE_CHOICES = ("auto", "official", "aihubmix")