-
Notifications
You must be signed in to change notification settings - Fork 839
Scope Ollama resilience settings to Web/Program.cs and restore ServiceDefaults #6850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nsions.cs in ServiceDefaults
...tensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/Program.Aspire.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 |
...es/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/OllamaResilienceHandlerExtensions.cs
Show resolved
Hide resolved
443c258
to
b473e1e
Compare
…ndler settings instead of the hardcoded calls in Web/Program.cs
b473e1e
to
3c3ebe6
Compare
There was a problem hiding this 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.
...ates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/.template.config/template.json
Outdated
Show resolved
Hide resolved
...es/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/OllamaResilienceHandlerExtensions.cs
Show resolved
Hide resolved
.../ChatWithCustomData/ChatWithCustomData-CSharp.Web/AspireOllamaResilienceHandlerExtensions.cs
Outdated
Show resolved
Hide resolved
…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.
…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.
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 tochat_httpClient
andembeddings_httpClient
inWeb/Program.cs
usingRemoveAllResilienceHandlers
andAddStandardResilienceHandler
. Scope Ollama configuration to the web project to prevent unintended global changes and align with .NET Aspire template conventions.Microsoft Reviewers: Open in CodeFlow