Repository navigation
fix(agents): sanitize Minimax tool-call IDs to prevent midstream errors - #24599
Closed
2undvierzig wants to merge 3 commits into
Closed
2undvierzig wants to merge 3 commits into
2undvierzig wants to merge 3 commits into
Conversation
Replace .claude/settings.json with .claude/ to cover the entire directory. Add architektur.md and claude-code-optimierung.md as local-only documentation files. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Minimax models (via OpenRouter) generate tool-call IDs with underscores (e.g. call_function_759rbkpbamq8_1) that cause mismatches after the OpenRouter proxy translates between formats. This resulted in: - 'tool result tool id not found' midstream errors - Subsequent 'Invalid Input' rejections from corrupted session history Add isMinimaxModel() detection (direct provider + model ID hint) and include Minimax in sanitizeToolCallIds so IDs are rewritten to strict alphanumeric format before being sent to the API.
Move personal config entries (.claude/, architektur.md, etc.) out of repo .gitignore — these belong in ~/.gitignore_global. Co-Authored-By: Claude Opus 4.6 <[email protected]>
LalithaMV
approved these changes
Feb 24, 2026
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
This was referenced Apr 12, 2026
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.
Summary
call_function_759rbkpbamq8_1) that cause mismatches after the OpenRouter proxy translates between formatsisMinimaxModel()detection (direct provider + model ID hint) and include Minimax insanitizeToolCallIdsTest plan
openrouter/minimax/minimax-m2.5model in production (hotfix already deployed and working)🤖 Generated with Claude Code
Greptile Summary
Fixed tool-call ID mismatch errors for Minimax models by adding ID sanitization. Minimax (via OpenRouter or direct) generates tool-call IDs with underscores like
call_function_759rbkpbamq8_1that cause "tool result tool id not found" errors after format translation. The fix addsisMinimaxModel()detection and includes Minimax in the existingsanitizeToolCallIdslogic (strips non-alphanumeric characters) to match the pattern used for Google, Mistral, and Anthropic models.Key changes:
isMinimaxModel()helper matching existingisMistralModel()pattern - checks provider (minimax,minimax-cn) or model ID hints (minimax)sanitizeToolCallIdsandtoolCallIdMode: "strict"for Minimax models inresolveTranscriptPolicy().gitignoreadditions for Claude Code local config and documentation filesConfidence Score: 5/5
isMistralModel()), adds comprehensive test coverage for all three Minimax provider variants, and addresses a concrete production issue (hotfix already deployed). The logic is straightforward - adding Minimax to the existing tool-call ID sanitization that already works for Google/Mistral/Anthropic. The.gitignorechanges are innocuous local development artifacts.Last reviewed commit: 122564d
(2/5) Greptile learns from your feedback when you react with thumbs up/down!