Skip to content

Conversation

@owaiskazi19
Copy link
Member

Description

During tool creation, only mlAgent.getParameters() was being passed to tools but QPT has a special case since it uses the same model as the agent llm. Fixed this by parsing agent llm in the params and checked on QPT side if there's no model_id in the params then use the agent llm as model id.

Related Issues

Resolves #4424

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.

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

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

Change makes sense to me

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
@owaiskazi19 owaiskazi19 added the v3.4.0 Issues targeting release v3.4.0 label Nov 20, 2025
@owaiskazi19 owaiskazi19 had a problem deploying to ml-commons-cicd-env-require-approval November 20, 2025 00:52 — with GitHub Actions Error
@owaiskazi19 owaiskazi19 had a problem deploying to ml-commons-cicd-env-require-approval November 20, 2025 00:52 — with GitHub Actions Failure
@owaiskazi19 owaiskazi19 had a problem deploying to ml-commons-cicd-env-require-approval November 20, 2025 00:52 — with GitHub Actions Error
@owaiskazi19 owaiskazi19 had a problem deploying to ml-commons-cicd-env-require-approval November 20, 2025 00:52 — with GitHub Actions Failure
Comment on lines +424 to +427
// Use agent's Agent model_id if tool doesn't have its own model_id
if (!params.containsKey(MODEL_ID_FIELD) && params.containsKey(AGENT_LLM_MODEL_ID)) {
params.put(MODEL_ID_FIELD, params.get(AGENT_LLM_MODEL_ID));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

When creating the Query Planner tool, during the registration of the agent, we are adding the agent's LLM Model ID as the model ID for QPT. But I believe this approach is a much cleaner way of doing things.

Can we also clean up this code in register Agent?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@rithin-pullela-aws earlier, you had a PR that check if it's query planning tool then you passed over the model id to query planning tool and that's specific for queryPlanningTool.I wanted something more generic to tools and I like this PR's approach to handle model id for all tool execution.

Can you try find out that PR and then we can revert that commit and take this one.

Copy link
Member Author

@owaiskazi19 owaiskazi19 Nov 21, 2025

Choose a reason for hiding this comment

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

This is the PR but it has some other changes as well. I will leave that to @rithin-pullela-aws

@pyek-bot
Copy link
Collaborator

@owaiskazi19 are these changes for 3.4?

@owaiskazi19
Copy link
Member Author

@owaiskazi19 are these changes for 3.4?

Yes, any version aware settings I need to look into?

@pyek-bot
Copy link
Collaborator

@owaiskazi19 are these changes for 3.4?

Yes, any version aware settings I need to look into?

Looks fine to me

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

Labels

backport 3.3 v3.4.0 Issues targeting release v3.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Updating conversational agents causes agentic search to fail

5 participants