Skip to content

.NET: Issues/3195 investigation [WIP]#3678

Draft
rogerbarreto wants to merge 3 commits intomicrosoft:mainfrom
rogerbarreto:issues/3195-investigation
Draft

.NET: Issues/3195 investigation [WIP]#3678
rogerbarreto wants to merge 3 commits intomicrosoft:mainfrom
rogerbarreto:issues/3195-investigation

Conversation

@rogerbarreto
Copy link
Member

@rogerbarreto rogerbarreto commented Feb 4, 2026

Motivation and Context

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI and others added 3 commits February 3, 2026 16:36
…nt responses

This fix addresses the issue where hosted MCP agents (like AgentWithHostedMCP)
fail with "ID cannot be null or empty (Parameter 'id')" error when deployed
to Azure AI Foundry.

Changes:
- Add CreateAgentReference helper method in AzureAIProjectChatClient that defaults
  empty version to "latest"
- Update CreateChatClientAgentOptions to generate a fallback ID from name and version
  when AgentVersion.Id is null or empty
- Add GetAgentVersionResponseJsonWithEmptyVersion and GetAgentResponseJsonWithEmptyVersion
  test data methods
- Add unit tests for empty version handling scenarios

Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
@github-actions github-actions bot changed the title .Net: Issues/3195 investigation [WIP] .NET: Issues/3195 investigation [WIP] Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: AgentWithHostedMCP chat fails: ErrorHTTP 404 (: 404) Resource not found

3 participants