Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(chat): treat MiniMax's API like Venice's — no tool-count limit

koeria101bdc104ac9
diff --git a/server/tool-count-limit.test.ts b/server/tool-count-limit.test.ts
index 4de8ff225a..2ef05ef3f4 100644
--- a/server/tool-count-limit.test.ts
+++ b/server/tool-count-limit.test.ts
@@ -72,8 +72,10 @@ describe("a learned limit", () => {
});
describe("a chat provider's tool limit", () => {
- it("is none for Venice, whose API takes any number of tools, and the common 128 elsewhere", () => {
+ it("is none for Venice and MiniMax, whose APIs take any number of tools, and the common 128 elsewhere", () => {
expect(chatToolLimitFor("https://api.venice.ai/api/v1", "venice-uncensored")).toBeNull();
+ expect(chatToolLimitFor("https://api.minimax.io/v1", "MiniMax-M3.1-Flash")).toBeNull();
+ expect(chatToolLimitFor("https://api.minimaxi.com/v1", "MiniMax-M2.7-highspeed")).toBeNull();
expect(chatToolLimitFor("https://openrouter.ai/api/v1", "openai/gpt-5")).toBe(128);
expect(chatToolLimitFor("https://api.openai.com/v1", "gpt-5")).toBe(128);
expect(chatToolLimitFor("https://notvenice.ai.example.com/v1", "m")).toBe(128);
diff --git a/server/tool-count-limit.ts b/server/tool-count-limit.ts
index c26ff5b532..9a9e9f5e0a 100644
--- a/server/tool-count-limit.ts
+++ b/server/tool-count-limit.ts
@@ -120,8 +120,10 @@ export function mcpToolBudget(limit: number | undefined, engineTools: number): n
}
/** Providers whose API takes any number of tools. Venice serves its models through vLLM, which sets no count, and its
- * chat completions reference names none (https://docs.venice.ai/api-reference/endpoint/chat/completions, read 2026-11-06). */
-const UNCOUNTED_HOSTS = /(?:^|\.)venice\.ai$/;
+ * chat completions reference names none (https://docs.venice.ai/api-reference/endpoint/chat/completions, read 2026-11-06).
+ * MiniMax's API sets no count either (only image/video counts and a request-body size, https://platform.minimax.io/docs,
+ * read 2026-11-29): the international api.minimax.io and the CN-region api.minimaxi.com. */
+const UNCOUNTED_HOSTS = /(?:^|\.)(?:venice\.ai|minimax\.io|minimaxi\.com)$/;
/** The most tools one Chat Completions request to `apiUrl` carries for `model`: the limit a refusal taught, else the
* provider's own, else the common 128. Null when the provider sets none. */