[Feature]: Bring-your-own web_search backend without a MiniMax account

Ouverte
#588 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
node.js, typescript

Piste de recherche

Start with packages/local-runtime/src/web-search/local-web-search-client.ts, packages/agent-tools/src/cloud/matrix-tools/tool-defs.ts, and the Matrix client files named in the issue to map how web_search is registered and called. Compare the custom REST response contract with the existing Matrix response handling and check how MCP tools are configured. Done means a configured custom backend returns search results without managed login, and the missing-login error explains its cause.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Product or interface

CLI - interactive TUI (also affects the Desktop app)

Use case and problem

I run MCode entirely on BYOK/custom providers (Ollama Cloud in my case) without using a MiniMax account. The built-in web_search tool is hardwired to the managed Matrix gateway (LocalWebSearchClient → callMatrixTool → POST {base}/mavis/api/v1/mcp/web_search; see packages/local-runtime/src/web-search/local-web-search-client.ts and packages/agent-tools/src/cloud/matrix-tools/tool-defs.ts).

Without a managed-login token, DesktopMatrixClient.buildHeaders throws before any request ("Matrix tools require a managed-login access token", packages/agent-tools/src/desktop/matrix-client.ts), and the tool result degrades to the opaque MATRIX_TOOL_REQUEST_FAILED: Matrix tool request failed. with no http_status in details (packages/agent-tools/src/cloud/matrix-tools/client.ts) — the cause is not diagnosable from the tool output.

There is no supported way to point the built-in web_search at my own search API. Project/profile MCP servers (.mcp.json) can add search tools but explicitly "leave built-in search unchanged" (docs/examples.md), so the failing built-in tool stays in the tool list and models keep calling it.

Desired behavior

Let users supply their own web_search backend without a MiniMax account. Any one of:

  1. Pluggable search provider config for the native tool, e.g. in config.yaml:
webSearch:
  provider: custom
  baseURL: https://ollama.com/api/web_search
  apiKey: ${OLLAMA_API_KEY}

with a minimal REST contract: request {query, max_results} → response {results: [{title, url, content}]} (the shape Ollama Cloud's web_search API and several other search APIs already use).

  1. Or extend the existing escape hatch (MATRIX_BASE_URL + MATRIX_TOKEN, packages/local-runtime/src/matrix/matrix-env.ts) to accept a simple search response shape instead of the full McpService base_resp envelope, and document the route.

  2. And/or a config switch that aliases the web_search tool binding to a configured MCP search tool, so web_search calls route to my own server.

Acceptance: with no MiniMax login (empty auth store) and a custom backend configured, a turn calling web_search returns results from that backend; with no backend and no login, the error names the cause (e.g. "not signed in") instead of the generic MATRIX_TOOL_REQUEST_FAILED.

Platform

Multiple platforms

Alternatives and additional context

Working workarounds today, each of which leaves the built-in tool broken:

  • a user skill wrapping curl https://ollama.com/api/web_search (works, but models may still pick the built-in tool);
  • an MCP server in .mcp.json wrapping a search API (docs/examples.md §5) — coexists rather than replaces;
  • agents.default.features.webSearch: false (packages/config/src/agent-capabilities.ts) disables the built-in tool, but then the web_search tool name disappears entirely instead of being backed by my own API;
  • signing in to a MiniMax account fixes the built-in tool (verified before/after login today), but I want to run MCode without a MiniMax account, the same way BYOK models do not require one.

Independent of this feature: consider putting the failure cause (missing token / HTTP status / timeout) into details so MATRIX_TOOL_REQUEST_FAILED is diagnosable.

Langage dominant
TypeScript
Étoiles
2.2k
Forks
281
Merge moyen
14 h 26 min
PR mergées (30 j)
38

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de MiniMax-AI/minimax-code

Toutes les issues de MiniMax-AI/minimax-code

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.