Skip to content

Update to .NET 10 / Aspire 13.4, modernize AI stack (MAF + MCP), refresh slides#28

Open
codebytes wants to merge 6 commits into
mainfrom
codebytes-update-to-latest-versions
Open

Update to .NET 10 / Aspire 13.4, modernize AI stack (MAF + MCP), refresh slides#28
codebytes wants to merge 6 commits into
mainfrom
codebytes-update-to-latest-versions

Conversation

@codebytes

Copy link
Copy Markdown
Owner

Overview

Modernizes the demo to the latest .NET 10 / Aspire 13.4.6 stack, overhauls the AI provider routing and tooling to use the Microsoft Agent Framework (MAF) + Model Context Protocol (MCP), and refreshes the slide deck with current information.

Changes

Platform & packages

  • Update to .NET 10 and latest package versions.
  • Migrate Aspire.Hosting.Azure.AIFoundryAspire.Hosting.Foundry (13.4.6-preview) and drop the redundant Aspire.Hosting.AppHost package.
  • Add aspire.config.json (AppHost pointer for aspire run) and pin nuget.org via nuget.config with package source mapping.

AI provider routing & models

  • Fix routing between Ollama, GitHub, Foundry, and Azure OpenAI.
  • Upgrade the model catalog — cloud defaults gpt-5 / gpt-5-mini, Foundry Local default qwen2.5-1.5b (tool-capable).

MAF + MCP

  • Align ChatService with the MAF ChatClientAgent pattern (tools passed at construction) and strip the qwen/Hermes <tool_call> template leak from responses.
  • Add TextTools and modernize MCP server tool registration; /debug/tools now enumerates DI-registered McpServerTool instances.

Slides

  • Refresh slides/Slides.md: Aspire 13.4 what's-new, GPT-5 / Qwen2.5 models, MAF GA, and a new Model Context Protocol slide.
  • Validate every slide renders within the 1280×720 frame (bare Marp template, measured scrollHeight vs clientHeight) — 0 overflowing slides.

Validation

  • Build clean (0 warnings / 0 errors), 137 tests pass.
  • qwen2.5-1.5b local tool-calling verified clean end-to-end.
  • All 41 rendered slide sections fit the frame.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

codebytes and others added 6 commits July 8, 2026 20:04
Upgrade the entire solution from .NET 9 / Aspire 9.5.2 to .NET 10 /
Aspire 13.4.6 and bump all packages to their latest versions.

Framework & tooling:
- global.json SDK -> 10.0.0; all projects -> net10.0
- launch.json, devcontainer image (dotnet:10.0), README prereq -> .NET 10

Key package updates:
- Aspire hosting/testing -> 13.4.6 (AI previews 13.4.6-preview)
- MCP SDK -> 1.4.0; Agent Framework -> 1.13.0; Extensions.AI -> 10.7.0
- EF Core / ASP.NET / STJ -> 10.0.9; Http.Resilience/ServiceDiscovery -> 10.7.0
- OpenTelemetry -> 1.16.0; bUnit -> 2.7.2 (dropped merged bunit.web)
- Scalar, Azure.Identity, Foundry.Local, CommunityToolkit, Markdig,
  AngleSharp, coverlet, Test.Sdk

Breaking-change fixes:
- ChatClientAgentOptions.Instructions removed -> use ChatClientAgent
  (client, instructions:, name:) constructor
- .WithOpenApi() deprecated in .NET 10 (ASPDEPR002) -> removed all calls
- Extensions.AI 10.7 middleware options now nullable -> null guard (CS8602)
- Foundry.Local 1.2.3 forces a RID -> portable RuntimeIdentifier on
  ApiService and its test project

Hardening & cleanup:
- Pin transitive Microsoft.OpenApi -> 2.10.0 (fixes GHSA-v5pm-xwqc-g5wc)
- Remove now-redundant framework refs shipped in-box on net10 (NU1510)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…odel catalog

Register Foundry Local and GitHub Models via AddAzureChatCompletionsClient (Azure AI Inference) instead of the Azure OpenAI client, fixing the /openai/deployments 404 on chat submit. Migrate the AppHost off the deprecated Aspire.Hosting.Azure.AIFoundry package to Aspire.Hosting.Foundry (AddAzureAIFoundry -> AddFoundry).

Add a hybrid model catalog: strongly-typed FoundryModel/GitHubModel defaults per provider, with a string override honored when AI:Model is explicitly configured. Upgrade defaults to Azure OpenAI gpt-5, GitHub openai/gpt-5-mini, Foundry cloud gpt-5-mini, and Foundry Local qwen2.5-1.5b (tool-capable). Update provider-default tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add a new TextTools tool set (including transformCase with a reverse mode) and register it with the MCP server. Rework the /debug/tools endpoint to enumerate the DI-registered McpServerTool instances instead of a hardcoded list, so it stays accurate as tools change. Refresh Math/System/Weather tool annotations and logging to match the latest MCP SDK conventions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… leak

Construct ChatClientAgent with the MCP tools supplied at construction time and let the agent apply the function-invocation middleware, removing the hand-rolled tool-injection pipeline (matches the official MAF agent pattern). Add a model-agnostic server-side sanitizer that strips the qwen2.5/Hermes <tool_call>...</tool_call> template that Foundry Local echoes into the text channel, using source-generated regexes; structured tool_calls and MCP execution are untouched. Add ChatServiceSanitizeTests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add aspire.config.json so 'aspire run' resolves the AppHost without arguments, and add nuget.config pinning nuget.org as the sole restore source with package source mapping for reproducible restores.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refresh the deck with current stack details and add a Model Context
Protocol slide. Validate every slide renders within the 1280x720 frame
(bare Marp template) and trim content so no slide overflows.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant