Repository navigation
fix(minimax): disable tool call ID sanitization for Anthropic-compatible API - #67967
sebykrueger wants to merge 1 commit into
Conversation
MiniMax generates its own tool call IDs and rejects tool results if the echoed ID does not match exactly (error 2013). The default strict sanitization rewrites IDs, breaking the roundtrip. Override buildReplayPolicy for both minimax and minimax-portal providers to set sanitizeToolCallIds: false when the API is anthropic-messages. OpenAI-compatible paths keep sanitization.
Greptile SummaryFixes tool-call round-trips against MiniMax's Anthropic-compatible API by disabling Confidence Score: 5/5Safe to merge — targeted single-provider fix with complete test coverage and no changes to shared SDK surfaces. The change is narrowly scoped to the MiniMax extension, follows the established wrapper pattern used by ollama and Anthropic providers, correctly guards the non-anthropic-messages path, and the tests cover both the fixed case and the unchanged openai-completions baseline. No P0 or P1 findings identified. No files require special attention. Reviews (1): Last reviewed commit: "minimax: disable tool call ID sanitizati..." | Re-trigger Greptile |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Keep open: current main still routes MiniMax Anthropic-compatible replay through strict tool-call ID sanitization, and this PR remains the canonical focused fix candidate. It is not merge-ready because the external PR lacks inspectable real MiniMax proof and GitHub reports the branch as conflicting with current main. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. Do we have a high-confidence way to reproduce the issue? No live high-confidence reproduction was run in this read-only review. Source inspection shows current main still sets strict MiniMax Anthropic-compatible tool-call ID sanitization, matching the reported error-2013 failure path, but the external API behavior still needs live proof. Is this the best way to solve the issue? Yes, likely: a MiniMax-owned buildReplayPolicy wrapper is the narrowest maintainable fix because runtime replay policy already delegates provider behavior to plugin hooks. A shared factory option can remain a later cleanup if more hybrid providers need the same opt-out. Security review: Security review cleared: Security review cleared: the diff only changes MiniMax provider replay-policy code and a focused test, with no dependency, workflow, lockfile, secrets, install, publishing, or generated-code changes. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 4e6933c84f18. |
|
Codex review: needs maintainer review before merge. What this changes: The PR adds a MiniMax replay-policy wrapper that disables tool-call ID sanitization for Maintainer follow-up before merge: This is an open implementation PR that appears valid and narrowly scoped; the next action is normal maintainer review, optional live MiniMax validation, and merge or requested changes rather than a new automated replacement PR. Review detailsBest possible solution: Land this PR or an equivalent MiniMax-owned replay-policy hook so MiniMax Anthropic-compatible requests echo provider-native tool-call IDs verbatim, while OpenAI-compatible MiniMax requests keep strict ID sanitization. A shared factory option can remain a later cleanup if additional providers need the same knob. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against acae48b790fa. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(minimax): disable tool call ID sanitization for Anthropic-compatible API This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Closing per ClawSweeper review verdict |
Summary
Re-opens #65371 against the current replay-hook API (the original PR was written before the
buildProviderReplayFamilyHooksfactory landed and no longer applies).hybrid-anthropic-openaireplay policy setssanitizeToolCallIds: true+toolCallIdMode: "strict", which rewrites IDs and breaks the MiniMax roundtrip. All tool use fails.MINIMAX_REPLAY_HOOKSwrapper aroundHYBRID_ANTHROPIC_OPENAI_REPLAY_HOOKSthat overridesbuildReplayPolicyto setsanitizeToolCallIds: falsewhenmodelApi === "anthropic-messages".MINIMAX_PROVIDER_HOOKSconsumes the wrapper, so both theminimaxandminimax-portalproviders inherit it through a single spread.openai-completions) keep strict sanitization. The factory API itself isn't touched (could be a follow-up to add asanitizeToolCallIdsknob tobuildProviderReplayFamilyHooksso consumers don't need the wrapper pattern).Change Type
Scope
Linked Issue/PR
Root Cause
Regression Test Plan
extensions/minimax/index.test.tsassertssanitizeToolCallIds: falsefor the minimax provider onanthropic-messages, andtruefor the minimax-portal provider onopenai-completions. Both cases covered.Verified locally
pnpm test extensions/minimax/index.test.ts— 8/8 passpnpm buildclean