fix(web-search): allow MiniMax OAuth search credentials

Co-authored-by: 周鹤0668001310 <zhou.he3@xydigit.com>
This commit is contained in:
Peter Steinberger
2026-05-02 05:42:43 +01:00
parent 40c8ce844c
commit f2370b769c
12 changed files with 68 additions and 35 deletions

View File

@@ -1,22 +1,23 @@
---
summary: "MiniMax Search via the Coding Plan search API"
summary: "MiniMax Search via the Token Plan search API"
read_when:
- You want to use MiniMax for web_search
- You need a MiniMax Coding Plan key
- You need a MiniMax Token Plan key or OAuth token
- You want MiniMax CN/global search host guidance
title: "MiniMax search"
---
OpenClaw supports MiniMax as a `web_search` provider through the MiniMax
Coding Plan search API. It returns structured search results with titles, URLs,
Token Plan search API. It returns structured search results with titles, URLs,
snippets, and related queries.
## Get a Coding Plan key
## Get a Token Plan credential
<Steps>
<Step title="Create a key">
Create or copy a MiniMax Coding Plan key from
Create or copy a MiniMax Token Plan key from
[MiniMax Platform](https://platform.minimax.io/user-center/basic-information/interface-key).
OAuth setups can reuse `MINIMAX_OAUTH_TOKEN` instead.
</Step>
<Step title="Store the key">
Set `MINIMAX_CODE_PLAN_KEY` in the Gateway environment, or configure via:
@@ -28,8 +29,9 @@ snippets, and related queries.
</Step>
</Steps>
OpenClaw also accepts `MINIMAX_CODING_API_KEY` as an env alias. `MINIMAX_API_KEY`
is still read as a compatibility fallback when it already points at a coding-plan token.
OpenClaw also accepts `MINIMAX_CODING_API_KEY` and `MINIMAX_OAUTH_TOKEN` as env
aliases. `MINIMAX_API_KEY` is still read as a compatibility fallback when it
already points at a token-plan credential.
## Config
@@ -40,7 +42,7 @@ is still read as a compatibility fallback when it already points at a coding-pla
minimax: {
config: {
webSearch: {
apiKey: "sk-cp-...", // optional if MINIMAX_CODE_PLAN_KEY is set
apiKey: "sk-cp-...", // optional if a MiniMax Token Plan env var is set
region: "global", // or "cn"
},
},
@@ -57,7 +59,8 @@ is still read as a compatibility fallback when it already points at a coding-pla
}
```
**Environment alternative:** set `MINIMAX_CODE_PLAN_KEY` in the Gateway environment.
**Environment alternative:** set `MINIMAX_CODE_PLAN_KEY` or `MINIMAX_OAUTH_TOKEN`
in the Gateway environment.
For a gateway install, put it in `~/.openclaw/.env`.
## Region selection
@@ -80,7 +83,8 @@ automatically keeps MiniMax Search on the CN host too.
Even when you authenticated MiniMax through the OAuth `minimax-portal` path,
web search still registers as provider id `minimax`; the OAuth provider base URL
is only used as a region hint for CN/global host selection.
is used as a region hint for CN/global host selection, and `MINIMAX_OAUTH_TOKEN`
can satisfy the MiniMax Search bearer credential.
## Supported parameters

View File

@@ -79,7 +79,7 @@ local while `web_search` and `x_search` can use xAI Responses under the hood.
AI-synthesized answers with citations via Moonshot web search.
</Card>
<Card title="MiniMax Search" icon="globe" href="/tools/minimax-search">
Structured results via the MiniMax Coding Plan search API.
Structured results via the MiniMax Token Plan search API.
</Card>
<Card title="Ollama Web Search" icon="globe" href="/tools/ollama-search">
Search via a signed-in local Ollama host or the hosted Ollama API.
@@ -106,7 +106,7 @@ local while `web_search` and `x_search` can use xAI Responses under the hood.
| [Gemini](/tools/gemini-search) | AI-synthesized + citations | -- | `GEMINI_API_KEY` |
| [Grok](/tools/grok-search) | AI-synthesized + citations | -- | `XAI_API_KEY` |
| [Kimi](/tools/kimi-search) | AI-synthesized + citations | -- | `KIMI_API_KEY` / `MOONSHOT_API_KEY` |
| [MiniMax Search](/tools/minimax-search) | Structured snippets | Region (`global` / `cn`) | `MINIMAX_CODE_PLAN_KEY` / `MINIMAX_CODING_API_KEY` |
| [MiniMax Search](/tools/minimax-search) | Structured snippets | Region (`global` / `cn`) | `MINIMAX_CODE_PLAN_KEY` / `MINIMAX_CODING_API_KEY` / `MINIMAX_OAUTH_TOKEN` |
| [Ollama Web Search](/tools/ollama-search) | Structured snippets | -- | None for signed-in local hosts; `OLLAMA_API_KEY` for direct `https://ollama.com` search |
| [Perplexity](/tools/perplexity-search) | Structured snippets | Country, language, time, domains, content limits | `PERPLEXITY_API_KEY` / `OPENROUTER_API_KEY` |
| [SearXNG](/tools/searxng-search) | Structured snippets | Categories, language | None (self-hosted) |
@@ -164,7 +164,7 @@ first one that is ready:
API-backed providers first:
1. **Brave** -- `BRAVE_API_KEY` or `plugins.entries.brave.config.webSearch.apiKey` (order 10)
2. **MiniMax Search** -- `MINIMAX_CODE_PLAN_KEY` / `MINIMAX_CODING_API_KEY` or `plugins.entries.minimax.config.webSearch.apiKey` (order 15)
2. **MiniMax Search** -- `MINIMAX_CODE_PLAN_KEY` / `MINIMAX_CODING_API_KEY` / `MINIMAX_OAUTH_TOKEN` or `plugins.entries.minimax.config.webSearch.apiKey` (order 15)
3. **Gemini** -- `plugins.entries.google.config.webSearch.apiKey`, `GEMINI_API_KEY`, or `models.providers.google.apiKey` (order 20)
4. **Grok** -- `XAI_API_KEY` or `plugins.entries.xai.config.webSearch.apiKey` (order 30)
5. **Kimi** -- `KIMI_API_KEY` / `MOONSHOT_API_KEY` or `plugins.entries.moonshot.config.webSearch.apiKey` (order 40)