Skip to content

fix(ui): accept builder tool streams without an index - #572

Open
pcbeingused333 wants to merge 2 commits into
OpenBMB:mainfrom
pcbeingused333:fix/c2054-builder-tool-index
Open

pcbeingused333 wants to merge 2 commits into
OpenBMB:mainfrom
pcbeingused333:fix/c2054-builder-tool-index

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

The builder agent rejects streamed tool-call fragments without an index with “Model requested too many tool calls”. A Gemini OpenAI compatibility report includes an example missing this field with a nonempty ID ("0"). This is evidence of the response shape, not a live Gemini reproduction. Streams with empty IDs still fail the existing identifier validation; this change does not address those streams.

When an index is omitted, start a new slot for a nonempty ID different from the previous call, otherwise continue that call. Avoid concatenating repeated IDs. Keep explicit-index validation and the maximum call count. This assembles sequential unindexed calls without merging their names or JSON arguments; interleaved unindexed fragments without identifying information cannot be disambiguated.

The builder-agent suite covers complete and fragmented unindexed calls, repeated IDs, call-count limits, and invalid explicit indices. Against main, 3 tests fail and 27 pass; all 30 pass with the fix. Ruff checks and formatting pass.

This change was prepared with AI assistance (Codex).

This branch has not been deployed

No deployments
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.

1 participant