Skip to content

fix(flows): stop after final preprocessing responses - #6869

Open
sylvesterkaczmarek wants to merge 1 commit into
google:mainfrom
sylvesterkaczmarek:fix/preprocess-final-response
Open

fix(flows): stop after final preprocessing responses#6869
sylvesterkaczmarek wants to merge 1 commit into
google:mainfrom
sylvesterkaczmarek:fix/preprocess-final-response

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

Auth and tool-confirmation resume processors can re-execute a paused tool during request preprocessing. When that tool response sets skip_summarization, the response is already final, but _run_one_step_async continued into another model call. The unwanted model response then replaced the tool response as the last event.

This change records whether preprocessing emitted a final response and returns after preprocessing completes. Non-final preprocessing events continue through the normal model path.

Testing Plan

  • Added a regression test that yields a resumed function response with skip_summarization=True and fails if the model is called.
  • Ran pytest -q tests/unittests/flows/llm_flows/test_base_llm_flow.py tests/unittests/flows/llm_flows/test_request_confirmation.py tests/unittests/auth/test_auth_preprocessor.py.
  • Result: 129 passed.
  • Ran all pre-commit hooks on the changed files.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my code.
  • I have added a test that proves the fix.
  • New and existing relevant unit tests pass locally.
  • Formatting, linting, and repository compliance checks pass.

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.

Auth/confirmation resume ignores skip_summarization on re-executed tool response

2 participants