Skip to content

Conversation

shellmayr
Copy link
Member

@shellmayr shellmayr commented Sep 22, 2025

  • This PR makes sure we don't record tool calls as outputs in gen_ai.chat spans in langchain when users deselect the option to include prompts / send pii

Closes TET-1181

Copy link

linear bot commented Sep 22, 2025

Copy link

codecov bot commented Sep 22, 2025

✅ All tests passed in 2567.23s

@shellmayr shellmayr marked this pull request as ready for review September 22, 2025 13:11
@shellmayr shellmayr requested a review from a team as a code owner September 22, 2025 13:11
Copy link

linear bot commented Sep 22, 2025

@alexander-alderman-webb
Copy link
Contributor

My one concern is that I have not heard tool arguments referred to as "prompts". Would users be confused if setting include_prompts=False also hides data from the tool calls?

We could consider more granular setting, especially since I am unsure how intuitive it is for tool call input and outputs to fall under the "prompt" umbrella.

But if that's more niche than we want to cater for, this looks good to go.

@shellmayr
Copy link
Member Author

My one concern is that I have not heard tool arguments referred to as "prompts". Would users be confused if setting include_prompts=False also hides data from the tool calls?

@alexander-alderman-webb My thought on this is that a tool call may include raw user input, and that raw user input is a prompt, no? And in terms of behaviour, if a user specifies that they do not want to record that type of user input in general, we should stick to it throughout the SDK. Just to be clear: we still record 1. that tool calls happen and 2. which tool is being called - just not the user input associated with it.

Copy link
Contributor

@alexander-alderman-webb alexander-alderman-webb left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for answering my questions!

Not sure if someone with more experience on the AI integrations should also approve.

Copy link
Contributor

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

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

Yes, looks good. The name include_prompts is not the best, you are right @alexander-alderman-webb but this is the name we have in other integrations. The functionality of it evolved over time. We probably should think of changing it but as this is a library we need to be careful with this to not break users code.

@shellmayr shellmayr merged commit e52c3b1 into master Sep 24, 2025
121 of 123 checks passed
@shellmayr shellmayr deleted the shellmayr/fix/langchain-tool-calls-outputs branch September 24, 2025 07:37
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.

3 participants