diff --git a/open-sse/services/toolLimitDetector.ts b/open-sse/services/toolLimitDetector.ts index 48969fcb12..5685f26e98 100644 --- a/open-sse/services/toolLimitDetector.ts +++ b/open-sse/services/toolLimitDetector.ts @@ -6,6 +6,7 @@ const DEFAULT_LIMIT = MAX_TOOLS_LIMIT; const PROVIDER_TOOL_LIMITS: Record = { "grok-cli": 200, + "nvidia": 1536, }; const _detectedLimitsSweep = setInterval(() => { diff --git a/tests/unit/tool-limit-detector.test.ts b/tests/unit/tool-limit-detector.test.ts index d1ce4a88fd..82e89323bd 100644 --- a/tests/unit/tool-limit-detector.test.ts +++ b/tests/unit/tool-limit-detector.test.ts @@ -69,6 +69,15 @@ describe("toolLimitDetector", () => { assert.strictEqual(getEffectiveToolLimit("grok-cli"), 200); }); + it("should return proactive limit for nvidia (1536) without any detection", () => { + assert.strictEqual(getEffectiveToolLimit("nvidia"), 1536); + }); + + it("should not override nvidia proactive limit with reactive detection", () => { + setDetectedToolLimit("nvidia", 100); + assert.strictEqual(getEffectiveToolLimit("nvidia"), 1536); + }); + it("should still return default (128) for unknown providers", () => { assert.strictEqual(getEffectiveToolLimit("some-new-provider"), 128); });