Skip to content

Conversation

pyek-bot
Copy link
Collaborator

@pyek-bot pyek-bot commented Aug 27, 2025

Description

Fixes the following issues:

  1. When the LLM responds with empty content, then there is no actual string to be processed. This by default falls back to tool use, however in tool use block we do a .getFirst().get() assuming there is a tool use block in the response. This PR adds a simple check to avoid such NPEs. Look at [BUG] ChatAgent fails while parsing LLMOutput #4136 for more details. There is another issue where the LLM responds with tool_use but no tool use block, for this we need to raise a ticket to the bedrock team.
  2. When steps returned by LLM contains a , the parsing breaks. This is due to a double conversion of json array to string and string to array. This has been fixed in this PR by directly returning the original json.
  3. When tool parameters contain nested json, the extractInputParameters method fails due to expecting a Map<String, String> . This has been fixed and the exception made clearer as we fall back to string by default.

For more details look at the issues mentioned below

Related Issues

Resolves #4135
Resolves #4137
Partially resolves #4136

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval August 27, 2025 00:48 — with GitHub Actions Inactive
@pyek-bot pyek-bot deployed to ml-commons-cicd-env-require-approval August 27, 2025 00:48 — with GitHub Actions Active
@pyek-bot pyek-bot had a problem deploying to ml-commons-cicd-env-require-approval August 27, 2025 00:48 — with GitHub Actions Error
@pyek-bot pyek-bot had a problem deploying to ml-commons-cicd-env-require-approval August 27, 2025 00:48 — with GitHub Actions Failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant