microsoft / microsoft/agent-framework

Python: .NET: [Bug]: DevUI returning 401 code execution_error

Open
#3,975 1 comment 0 reactions 1 assignee View on GitHub

@victordibia is already working on this.

Since Feb 17, 2026.

.NET bug devui
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

Description

When running a very basic agent against a new Foundry project model I get this when running the agent from DevUI:
Image
The same agent works with devUI using Python, it also works from .NET when not using devUI

Code Sample
AIProjectClient aiProjectClient = new(new Uri(endpoint), new DefaultAzureCredential());
var chatclient = aiProjectClient.GetAzureOpenAIChatClient().AsIChatClient();

await aiProjectClient.CreateAIAgentAsync("WeatherAgent", new AgentVersionCreationOptions(new PromptAgentDefinition(model: deploymentName) { Instructions = "You are a weather expert. You provide accurate weather predications at the requested location" }));

builder.Services.AddChatClient(chatclient);

// Register sample agents with tools
builder.AddAIAgent(name: "WeatherAgent", instructions: null);

builder.Services.AddOpenAIResponses();
builder.Services.AddOpenAIConversations();
Error Messages / Stack Traces

Package Versions

Microsoft.Agents.AI, AzureAI, DevUI version 1.0.0-preview.260212.1

.NET Version

.NET 10

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.