Repository navigation
fix(cursor): guard non-array tool_calls in request translator - #12691
Merged
diegosouzapw merged 1 commit intoSep 6, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
diegosouzapw
merged commit Sep 6, 2026
2b2d34e
into
cheaper-inference:release/v3.8.51
3 checks passed
alvinveroy
added a commit
to alvinveroy/OmniRoute
that referenced
this pull request
Sep 6, 2026
- take upstream useSyncExternalStore combos usage-guide (cheaper-inference#12671) over our queueMicrotask lint defuse (supersedes it; suppression already dropped) - file-size baseline: combos/page.tsx 5066 (upstream shape); keep both _rebaseline entries (bounded-abort/tls-ladder + 12671 external store) - upstream additions folded in: cheaper-inference#12682 sqlite cleanup, cheaper-inference#12691 tool_calls guard, cheaper-inference#12834 codex compression re-enable, cheaper-inference#12707 continuation, cheaper-inference#12710 video-transcript redaction, cheaper-inference#12699 npmrc shipping, docker/deps/docs
This was referenced Sep 6, 2026
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 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
A chat request whose assistant message carries a non-array truthy
tool_callscrashed the cursor request translator with a rawTypeError(firstis not iterable, then.map is not a functionone loop down), surfacing as HTTP 500. Both loops now require an array, matching the sibling kiro translator. The changelog fragment is included per repo convention.How to test
buildCursorRequestwithmessages: [{ role: "assistant", tool_calls: 5 }](also tried an object and a string).TypeError.node --import tsx/esm --test tests/unit/translator-openai-to-cursor.test.ts. All 7 tests pass, including the new#12689regression test (red without the fix, green with it).Related issues
Fixes #12689