Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(AI Agent Node): Preserve intermediateSteps when using output parser with non-tool agent #11363

Conversation

OlegIvaniv
Copy link
Contributor

Summary

This PR fixes an issue where intermediateSteps are discarded when using an output parser with a non-tool agent.
This happenes because we would re-assign the response as the output of the parsers, effectively removing intermediateSteps. To fix this, we only re-assign response.output to the parsed output. It also fixes double-wrapping of the output as output.output but only for the latest version of the node to preserve backward compatibility.

Agent Node v1.7
CleanShot 2024-10-23 at 11 22 03
Agent Node v1.6 with fix but preserved output.output wrapping
CleanShot 2024-10-23 at 11 21 55

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Oct 23, 2024
Copy link

cypress bot commented Oct 23, 2024

n8n    Run #7535

Run Properties:  status check passed Passed #7535  •  git commit e61a8535aa: 🌳 master 🖥️ browsers:node18.12.0-chrome107 🤖 PR User 🗃️ e2e/*
Project n8n
Branch Review master
Run status status check passed Passed #7535
Run duration 04m 25s
Commit git commit e61a8535aa: 🌳 master 🖥️ browsers:node18.12.0-chrome107 🤖 PR User 🗃️ e2e/*
Committer oleg
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 458
View all changes introduced in this branch ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@OlegIvaniv OlegIvaniv merged commit e61a853 into master Oct 23, 2024
33 checks passed
@OlegIvaniv OlegIvaniv deleted the ai-411-intermediate-steps-are-discarded-when-using-output-parser branch October 23, 2024 14:48
@github-actions github-actions bot mentioned this pull request Oct 24, 2024
@janober
Copy link
Member

janober commented Oct 24, 2024

Got released with n8n@1.65.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants