Skip to content

[release/0.7] RSPEED-3958 Fix Vertex AI failures with parallel tool calls - #3293

Merged
tisnik merged 1 commit into
lightspeed-core:release/0.7from
owtaylor:backport-ogx-6775-0.7
Nov 19, 2026
Merged

tisnik merged 1 commit into
lightspeed-core:release/0.7from
owtaylor:backport-ogx-6775-0.7

Conversation

@owtaylor

Copy link
Copy Markdown
Contributor

Description

Equivalent of #3186 for release/0.7 (ogx 1.2.5).

Multiple tool calls returned from the Google Vertex API in different chunks get squashed together into a single call with invalid JSON arguments, because of a bug in ogx's handling of streamed tool calls (ogx-ai/ogx#6774).

This adds patch/ogx/001-vertexai-number-streamed-tool-calls.patch, which applies the fix from ogx-ai/ogx#6775 in the builder stage of the Containerfile, using the patch/ mechanism introduced in #3186. Since ogx-ai/ogx#6775 was written against ogx main, which shares this code with 1.2.5, the patch is the upstream diff unchanged except for line offsets.

Type of change

  • Bug fix

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: Claude
  • Generated by: Claude

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • In an ogx v1.2.5 checkout, the regression test from fix(vertexai): keep streamed tool-call indices unique across chunks ogx-ai/ogx#6775 fails without the fix; with the fix it passes, along with all existing Vertex AI unit tests (288).
  • Built an aarch64 image from this branch (the patch applies at --fuzz=0 during the build) and tested it against live Vertex AI (gemini-2.5-flash) with a scripted request known to produce parallel tool calls: 30 tries, 13 with parallel calls, 45 tool calls, none malformed. The same image with the unpatched vertexai.py mounted over the patched one produced merged calls (arguments '{}{}{}') within 5 tries.
  • The same image also passed checks for the other fixes already on release/0.7 that our Goose use case depends on: stateless /v1/responses requests with more than 20 input items, and request bodies above the previous 128 KiB limit, now up to 1 MiB.

🤖 Generated with Claude Code

Multiple tool calls returned from the Vertex api in different
chunks would be squashed together resulting in invalid JSON.

Add a top-level patch/ directory for fixes to bundled Python
packages that can't wait for an upstream release: patches in
patch/<package>/NNN-*.patch are applied in order to the installed
package in the builder stage of the Containerfile.

Add patch/ogx/001-vertexai-number-streamed-tool-calls.patch,
a backport of ogx-ai/ogx#6775 to ogx 1.2.

(Equivalent of lightspeed-core#3186 for release/0.6.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@tisnik tisnik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tisnik
tisnik merged commit 8fc8c84 into lightspeed-core:release/0.7 Nov 19, 2026
45 of 47 checks passed
@fullsend-ai-retro

fullsend-ai-retro Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 4:40 PM UTC · Completed 4:51 PM UTC

Commit: 5e326b3 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.56

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #3293 — backport of Vertex AI parallel tool calls fix to release/0.7

No new proposals. All findings from this retro are covered by existing open issues.

What happened

PR #3293 is a human-authored backport (by owtaylor, with Claude co-authorship) of the Vertex AI parallel tool calls fix from PR #3186 to the release/0.7 branch. The changes add a container-build-time patch mechanism and apply an upstream ogx fix. Two human reviewers (tisnik, asimurka) approved within 4 minutes; the PR merged 34 minutes after creation.

No fullsend agents were involved — no code, review, fix, or triage agents ran. CodeRabbit also skipped (auto-reviews disabled on non-default branches). This retro dispatched on merge, making it the second consecutive retro on this same fix (the first ran on PR #3186) with no agent workflow to analyze.

Evidence for existing open issues

Assessment

The workflow outcome was appropriate — quick human approval of a clean backport of an already-reviewed fix is reasonable. The only inefficiency is that retro dispatched at all. Once fullsend-ai/fullsend#939 (or the consolidated design from #5817) ships, this class of unnecessary retro run will be eliminated.

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.

3 participants