Skip to content

fix(search): map output sensitivity to content filter exit code - #256

Open
renaissance04 wants to merge 2 commits into
MiniMax-AI:mainfrom
renaissance04:fix/search-output-sensitive
Open

fix(search): map output sensitivity to content filter exit code#256
renaissance04 wants to merge 2 commits into
MiniMax-AI:mainfrom
renaissance04:fix/search-output-sensitive

Conversation

@renaissance04

@renaissance04 renaissance04 commented Sep 5, 2026

Copy link
Copy Markdown

Search requests that return HTTP 200 with status_msg: "output new_sensitive"
were falling through to the generic "API error" path (exit code 1), so a
moderation block looked like an API/CLI failure.

mapApiError now detects output-side sensitivity and maps it to
ExitCode.CONTENT_FILTER (10) with a clear message.

Added a test case in test/errors/api.test.ts.

Fixes #234


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@renaissance04

Copy link
Copy Markdown
Author

Follow-up: also detect the documented MiniMax status_code 1027
(output content sensitive), not just the "new_sensitive" text from
the report. The numeric code stays stable if the API changes the
message wording.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mmx search query returns output new_sensitive for a benign YouGov payment query

1 participant