GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(embedding): join sibling multimodal batches after failure by coderbruis · Pull Request #4039 · agentscope-ai/agentscope

Conversation

@coderbruis

@coderbruis coderbruis commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #4025

Gemini and DashScope multimodal calls can raise a batch error while sibling batches keep running, allowing later retries or cache writes after the caller has handled the failure. Their overrides bypass the cancel-and-join behavior added to the base class in #3148.

Extract the existing base batch runner into _call_batches and use it from both content-aware overrides. Keep splitting, retry policies, parameter forwarding, response order and merging unchanged. Make the helper's batch argument positional-only so a provider's batches= keyword still passes through.

Regression tests cover first/last batch failure, retry exhaustion, waiting for asynchronous sibling cleanup, and preventing late cache stores through the real provider wrappers. A base regression covers batches= forwarding. Existing base tests continue to cover parent/child cancellation and repeated cancellation during cleanup.

Validation

  • Python 3.11.6: all six embedding test files passed — 82 tests, 79 subtests.
  • pre-commit run --all-files: all applicable hooks passed.
  • The new keyword-forwarding test fails with the non-positional helper and passes with this fix. Provider regressions were also checked against the former bare-gather dispatch and fail as expected.
  • Full-project tests were not completed locally: an earlier attempt stopped during collection with 30 development-dependency errors. Linux/Windows execution remains for CI; provider endpoints are mocked.

Cancellation joins owned coroutines; it cannot terminate an already-running asyncio.to_thread SDK worker, retract a remote request, or roll back completed cache writes.

AgentScope version: 2.0.12dev

AI assistance was used for implementation and local validation; the patch received an independent cross-review before submission.

Checklist

  • An issue has been created for this PR.
  • I have read CONTRIBUTING.md.
  • Docstrings follow the project's style.
  • Documentation impact assessed: internal lifecycle fix with inline documentation; no new public API or configuration.
  • Code is ready for review.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@coderbruis
fix(embedding): join sibling multimodal batches after failure
e39de4b
@github-actions github-actions Bot added the pr/awaiting-review Waiting for maintainers to review this PR label Nov 15, 2026
qbc2016
qbc2016 approved these changes Nov 16, 2026
View reviewed changes

@qbc2016 qbc2016 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@qbc2016
qbc2016 merged commit 33d2108 into agentscope-ai:main Nov 16, 2026
9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the pr/awaiting-review Waiting for maintainers to review this PR label Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@qbc2016 qbc2016 qbc2016 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Gemini and DashScope multimodal batches continue after a sibling fails

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@coderbruis @qbc2016
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.