Skip to content

fix(streaming): preserve array indexes in progressive tool arguments - #1155

Open
KevinAndrewDong wants to merge 1 commit into
google:mainfrom
KevinAndrewDong:fix/vertex-progressive-array-args
Open

KevinAndrewDong wants to merge 1 commit into
google:mainfrom
KevinAndrewDong:fix/vertex-progressive-array-args

Conversation

@KevinAndrewDong

Copy link
Copy Markdown
Contributor

Link to Issue or Description of Change

Problem: In opt-in Vertex progressive streaming, indexed argument paths are accumulated as numeric-key objects and can fail a real FunctionTool array parameter.

Solution: Distinguish unquoted array indexes from quoted numeric member names before JSONPath parsing, accumulate ordinary objects, and project only contiguous indexed containers when finalizing arguments.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Frozen cloud evidence at f882b34ad57d24e911324dcda124499cfb726381: baseline 136 passed / 10 failed / 0 skipped; fixed 146 passed / 0 failed / 0 skipped. The 18 new cases are included in 146; independent reruns repeat those cases and are not additional coverage. Counts from other fixes are not added.

Fresh Mac validation (Node 22.23.2, one worker, same scoped files): unmodified production source 136 passed / 10 failed / 0 skipped; this fix 146 passed / 0 failed / 0 skipped. The expected failures occur only in the supplied new regression files; no test-name filter was used.

Scoped Mac command:

CI=1 ./node_modules/.bin/vitest run --project unit:core core/test/models/progressive_array_arguments_test.ts core/test/utils/streaming_utils_test.ts core/test/models/google_llm_test.ts core/test/features/feature_registry_test.ts core/test/tools/function_tool_test.ts --maxWorkers=1

Mac core build, workspace declaration preparation, root/sample type checks, changed-file ESLint/Prettier, diff/title checks and normal Husky/lint-staged commit checks passed. An independent read-only review covered these exact frozen source/test bytes. Cloud and Mac executions are separate evidence, not additive coverage.

Manual End-to-End (E2E) Tests:

Not performed in this Mac preparation. Full workspace build/suite, coverage, live provider/API, browser/manual E2E and full platform matrices are not established.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

Experimental Vertex progressive mode remains default-off; this is not default Gemini API, full RFC9535 or provider integration coverage. Conflicting path forms and complete RFC9535 semantics are outside this change.

Prepared with Codex.

@KevinAndrewDong
KevinAndrewDong marked this pull request as ready for review October 25, 2026 05:28
@Varun-S10 Varun-S10 self-assigned this Oct 27, 2026
@Varun-S10

Copy link
Copy Markdown
Contributor

Hi @KevinAndrewDong, thank you for raising the PR to fix the issue. We have reviewed the code changes and it does resolve the issue. I will escalate the PR to the team to review, thank you for your patience and understanding.
Hi @kalenkevich, could you please take a look?

@Varun-S10 Varun-S10 added the needs review [Status] The PR/issue is awaiting review from the maintainer label Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review [Status] The PR/issue is awaiting review from the maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants