Skip to content

feat: add output_passthrough to ConditionalRouter for non-Jinja2 routing#11555

Open
spideyashith wants to merge 5 commits into
deepset-ai:mainfrom
spideyashith:fix/conditional-router-unsafe-routing-9355
Open

feat: add output_passthrough to ConditionalRouter for non-Jinja2 routing#11555
spideyashith wants to merge 5 commits into
deepset-ai:mainfrom
spideyashith:fix/conditional-router-unsafe-routing-9355

Conversation

@spideyashith

@spideyashith spideyashith commented Jun 9, 2026

Copy link
Copy Markdown

Proposed Changes

Adds an optional output_passthrough field to ConditionalRouter routes.
When set to True, the output field is treated as a plain variable name
instead of a Jinja2 template, passing the value directly from kwargs to the
route output. This enables routing of complex non-basic types (dataclasses,
Pydantic models) without unintended Jinja2 processing.

Closes #9355

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the contributing guidelines
  • I have added tests that prove my fix is effective or that my feature works
  • I have added/updated the docstrings for all modified components
  • New and existing unit tests pass locally with my changes
  • Release notes have been added

Note

This PR was developed with AI assistance.

@spideyashith spideyashith requested a review from a team as a code owner June 9, 2026 07:02
@spideyashith spideyashith requested review from davidsbatista and removed request for a team June 9, 2026 07:02
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

@spideyashith is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

CLAassistant commented Jun 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@davidsbatista davidsbatista self-assigned this Jun 9, 2026
@spideyashith

spideyashith commented Jun 9, 2026

Copy link
Copy Markdown
Author

I've opened a PR to address this: #11555. The implementation adds an output_passthrough field to routes that skips Jinja2 processing and passes variables directly, enabling routing of complex non-basic types.

@davidsbatista davidsbatista removed their assignment Jun 9, 2026
@davidsbatista

davidsbatista commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

I ask you in the future for upcoming PRs to stick to our PR template.

@davidsbatista

Copy link
Copy Markdown
Contributor

I've opened a PR to address this: #11555. The implementation adds an output_passthrough field to routes that skips Jinja2 processing and passes variables directly, enabling routing of complex non-basic types.

Which issue are you referring to? Is another issue introduced by opening this PR?

@spideyashith

Copy link
Copy Markdown
Author

I've opened a PR to address this: #11555. The implementation adds an output_passthrough field to routes that skips Jinja2 processing and passes variables directly, enabling routing of complex non-basic types.

Which issue are you referring to? Is another issue introduced by opening this PR?

Sorry for the confusion! I mistakenly posted that comment inside the PR instead of on the original issue. This PR addresses issue #9355 — adding a way to route complex types in ConditionalRouter without Jinja2 processing.

@spideyashith

Copy link
Copy Markdown
Author

I've opened a PR to address this: #11555. The implementation adds an output_passthrough field to routes that skips Jinja2 processing and passes variables directly, enabling routing of complex non-basic types.

Which issue are you referring to? Is another issue introduced by opening this PR?

Hi @davidsbatista, apologies for the confusion — that comment was meant for issue #9355, not this PR. I've also updated the PR description to follow the project template. Please let me know if any changes are needed, happy to update!

@spideyashith

Copy link
Copy Markdown
Author

Hi @davidsbatista, just checking in — happy to make any changes if needed. Let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add another way to specify "unsafe" type routing without jinja to ConditionalRouter

3 participants