Skip to content

Conversation

ViveliDuCh
Copy link
Member

@ViveliDuCh ViveliDuCh commented Sep 25, 2025

Fixes #6331

Restore standard global HTTP client resilience configuration in ServiceDefaults/Program.cs, removing Ollama-specific timeouts and settings. Apply extended timeouts and custom resilience handlers only to chat_httpClient and embeddings_httpClient in Web/Program.cs using RemoveAllResilienceHandlers and AddStandardResilienceHandler. Scope Ollama configuration to the web project to prevent unintended global changes and align with .NET Aspire template conventions.

Microsoft Reviewers: Open in CodeFlow

@ViveliDuCh ViveliDuCh requested a review from jozkee September 25, 2025 14:56
@ViveliDuCh ViveliDuCh self-assigned this Sep 25, 2025
@ViveliDuCh ViveliDuCh added area-ai Microsoft.Extensions.AI libraries area-ai-templates Microsoft.Extensions.AI.Templates and removed area-ai Microsoft.Extensions.AI libraries labels Sep 25, 2025
@ViveliDuCh ViveliDuCh requested a review from jozkee September 29, 2025 22:08
@ViveliDuCh ViveliDuCh marked this pull request as ready for review September 29, 2025 22:48
@ViveliDuCh ViveliDuCh requested a review from a team as a code owner September 29, 2025 22:48
@Copilot Copilot AI review requested due to automatic review settings September 29, 2025 22:48
Copy link
Contributor

@Copilot 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 scopes Ollama-specific HTTP resilience settings to the web project only, restoring standard global HTTP client configuration in ServiceDefaults. The change prevents unintended global configuration changes and aligns with .NET Aspire template conventions by keeping Ollama-specific timeouts isolated to where they're needed.

Key changes:

  • Moved Ollama-specific resilience configuration from ServiceDefaults to Web project
  • Created dedicated extension method for Ollama HTTP client resilience settings
  • Updated template configuration to conditionally include the new extension file

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
Program.Aspire.cs Adds conditional call to Ollama-specific HTTP resilience configuration
AspireOllamaResilienceHandlerExtensions.cs New extension method containing Ollama-specific HTTP client resilience settings
Extensions.cs Removes Ollama-specific configuration, restores standard resilience handler
template.json Updates template configuration to conditionally include new extension file

…ndler settings instead of the hardcoded calls in Web/Program.cs
Copy link
Contributor

@Copilot 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

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@ViveliDuCh ViveliDuCh merged commit 588babc into dotnet:main Sep 30, 2025
6 checks passed
@ViveliDuCh ViveliDuCh deleted the ollama-issue branch September 30, 2025 21:32
jeffhandley pushed a commit to jeffhandley/extensions that referenced this pull request Oct 1, 2025
…eDefaults (dotnet#6850)

Move Ollama-specific HTTP client resiliency configuration out of Extensions.cs in ServiceDefaults to an extension method called later in Web/Program.cs.
jeffhandley pushed a commit that referenced this pull request Oct 2, 2025
…eDefaults (#6850)

Move Ollama-specific HTTP client resiliency configuration out of Extensions.cs in ServiceDefaults to an extension method called later in Web/Program.cs.
This was referenced Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-ai-templates Microsoft.Extensions.AI.Templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI Chat Template - Ollama resiliency modification should be in web app, not service defaults

5 participants