Skip to content

Increase max tool call and handle lm error#1952

Merged
Tatsinnit merged 2 commits intoAzure:mainfrom
bosesuneha:ca-flow-bug-fixes
Mar 4, 2026
Merged

Increase max tool call and handle lm error#1952
Tatsinnit merged 2 commits intoAzure:mainfrom
bosesuneha:ca-flow-bug-fixes

Conversation

@bosesuneha
Copy link
Copy Markdown
Member

  • Fix LM tool-calling loop to gracefully produce output when max rounds are exhausted instead of failing
  • Add error handling to skip workflow generation when deployment files (Dockerfile/manifests) fail to generate
  • Refactor LMClient for readability: extract stream helpers, parallelize tool execution

@Tatsinnit Tatsinnit added bug Something isn't working enhancement 🚀 New feature or request or improvements on existing code. labels Mar 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Container Assist Language Model (LM) integration to be more resilient and configurable when using tool-calling, and adjusts the command orchestration so workflow generation depends on having deployment artifacts available.

Changes:

  • Increase the default/max configured tool-calling rounds and, when rounds are exhausted, issue a final LM request without tools to force a textual output.
  • Refactor LMClient response consumption into helper methods and execute tool calls concurrently.
  • Update the “both actions selected” flow to run deployment generation first and skip workflow generation when Dockerfile/manifests aren’t present.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/commands/aksContainerAssist/lmClient.ts Raises tool-round limit, adds final “no-tools” request on exhaustion, and refactors streaming/tool execution helpers.
src/commands/aksContainerAssist/containerAssistService.ts Introduces MAX_TOOL_ROUNDS and passes it into LM tool-calling requests for Dockerfile/manifests generation.
src/commands/aksContainerAssist/aksContainerAssist.ts Reworks action sequencing: deployment first when both actions are selected; conditionally proceeds to workflow generation based on artifact existence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/commands/aksContainerAssist/aksContainerAssist.ts
Comment thread src/commands/aksContainerAssist/aksContainerAssist.ts
Comment thread src/commands/aksContainerAssist/containerAssistService.ts Outdated
Comment thread src/commands/aksContainerAssist/containerAssistService.ts Outdated
davidgamero
davidgamero previously approved these changes Mar 4, 2026
Copy link
Copy Markdown
Collaborator

@davidgamero davidgamero left a comment

Choose a reason for hiding this comment

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

lgtm

@Tatsinnit Tatsinnit merged commit d6eb78a into Azure:main Mar 4, 2026
11 checks passed
@Tatsinnit Tatsinnit mentioned this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement 🚀 New feature or request or improvements on existing code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants