Fix #1315: [Bug] Topic Judge 100% failure rate - MiniMax API returns 404 for topic-judge ca#1972
Open
Memtensor-AI wants to merge 1 commit into
Open
Fix #1315: [Bug] Topic Judge 100% failure rate - MiniMax API returns 404 for topic-judge ca#1972Memtensor-AI wants to merge 1 commit into
Memtensor-AI wants to merge 1 commit into
Conversation
…ock MiniMax (#1315) judgeNewTopicOpenAI and arbitrateTopicSplitOpenAI were sending max_tokens: 10. MiniMax's gateway (api.minimaxi.com) rejects requests with that small a ceiling by returning an HTML 404 page before the request ever reaches the model, producing 100% failure rate on topic boundary detection for users on MiniMax-backed openai_compatible setups. Other summarizer calls in the same file (summarize, summarizeTask, filterRelevant, judgeDedup, classifyTopic) work fine because they use larger max_tokens (or none at all). classifyTopicOpenAI already uses 60 against the same MiniMax endpoint successfully, so 60 is adopted as the new minimum for the two affected helpers. Includes regression test that stubs global fetch and asserts both helpers send max_tokens >= 60 while leaving the existing limits of the healthy callers untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes issue #1315: Topic Judge 100% failure rate against MiniMax. Root cause is that
judgeNewTopicOpenAIandarbitrateTopicSplitOpenAIinapps/memos-local-openclaw/src/ingest/providers/openai.tssendmax_tokens: 10. MiniMax's gateway (api.minimaxi.com) rejects requests with that small a ceiling by returning an HTML 404 page before the request reaches the model. Every other summarizer call in the same file works because they request largermax_tokens(200–4096) or none at all;classifyTopicOpenAIin the same file already uses 60 successfully against MiniMax.The fix raises
max_tokensfrom 10 to 60 in both helpers, with an inline code comment referencing issue #1315 so future contributors know not to lower it again. 60 is enough for the single-wordNEW/SAMEreply plus any reasoning preamble MiniMax-M models may emit, and is a no-op for the OpenAI / Anthropic / Gemini / Bedrock providers since each has its own per-provider helper.Verified with a new regression test
apps/memos-local-openclaw/tests/topic-judge-minimax-1315.test.tsthat stubsglobal.fetch, captures the request body, and asserts both helpers sendmax_tokens >= 60while the other healthy callers keep their existing limits. All 5 new tests pass. Broader runs acrosstests/integration.test.ts(26/26) andtests/openclaw-fallback.test.tsare green;tsc --noEmitpasses. The handful of failures that remain in the full suite (task-processorsession-boundary,accuracysemantic precision,skill-auto-install,update-install) reproduce on the unmodified base branch and are unrelated to this fix.Commit
88f7622donbugfix/autodev-1315is pushed to origin; spec archive committed tomemos-autodev-specsmain.Related Issue (Required): Fixes #1315
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Automated tests are pending.
Checklist
@MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller please review this PR.
Reviewer Checklist