Skip to content

fix: pass Secret values through in ComponentTool - #13771

Closed
adityav1709 wants to merge 3 commits into
deepset-ai:mainfrom
adityav1709:fix/13684-component-tool-secret
Closed

adityav1709 wants to merge 3 commits into
deepset-ai:mainfrom
adityav1709:fix/13684-component-tool-secret

Conversation

@adityav1709

Copy link
Copy Markdown

A ComponentTool fails at invocation when a parameter filled through inputs_from_state is typed with Secret (for example access_token: str | Secret). The parameter is correctly hidden from the tool schema, but _convert_param still runs the injected value through TypeAdapter, and Pydantic cannot build a schema for Secret, so it raises PydanticSchemaGenerationError. This happens whether the state value is a plain string or a Secret.

A value typed as Secret (or a union including one) is now passed through unchanged, instead of going through Pydantic. The value reaches the component run as is, which is the expected behavior.

Fixes #13684. Includes a release note and regression tests.

Signed-off-by: adityav1709 adityav170920@gmail.com

Co-authored-by: Muse (Aurora)

@adityav1709
adityav1709 requested a review from a team as a code owner November 16, 2026 11:13
@adityav1709
adityav1709 requested review from davidsbatista and removed request for a team November 16, 2026 11:13
@vercel

vercel Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

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

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the P1 High priority, add to the next sprint label Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi @adityav1709, thank you so much for taking the time to work on this! 🙏

Issue #13684 is one our team is handling internally, as noted at the end of its description, so it isn't open for external contributions. To avoid you spending more effort on work that we can't merge, we're closing this PR.

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

Labels

P1 High priority, add to the next sprint topic:tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Secret as a State type passed to ComponentTool via inputs_from_state

1 participant