Increase max tool call and handle lm error#1952
Merged
Tatsinnit merged 2 commits intoAzure:mainfrom Mar 4, 2026
Merged
Conversation
Member
bosesuneha
commented
Mar 3, 2026
- 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
Contributor
There was a problem hiding this comment.
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
LMClientresponse 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.
Tatsinnit
reviewed
Mar 3, 2026
Tatsinnit
approved these changes
Mar 4, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.