From 2830ea919c05d6e37221c8c200a818c17e80d100 Mon Sep 17 00:00:00 2001 From: Kai Tao <69313318+vanzue@users.noreply.github.com> Date: Mon, 24 Nov 2025 09:51:27 +0800 Subject: [PATCH] Advanced Paste: Adjust model parameter to make the result longer (#43768) ## Summary of the Pull Request Adjust model parameter to make the result longer ## PR Checklist - [ ] Closes: #xxx - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --- src/common/LanguageModelProvider/FoundryLocalModelProvider.cs | 2 +- .../Services/CustomActions/FoundryLocalPasteProvider.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/LanguageModelProvider/FoundryLocalModelProvider.cs b/src/common/LanguageModelProvider/FoundryLocalModelProvider.cs index e7cc30c288..5158e4334e 100644 --- a/src/common/LanguageModelProvider/FoundryLocalModelProvider.cs +++ b/src/common/LanguageModelProvider/FoundryLocalModelProvider.cs @@ -64,7 +64,7 @@ public sealed class FoundryLocalModelProvider : ILanguageModelProvider return new OpenAIClient( new ApiKeyCredential("none"), - new OpenAIClientOptions { Endpoint = endpointUri }) + new OpenAIClientOptions { Endpoint = endpointUri, NetworkTimeout = TimeSpan.FromMinutes(5) }) .GetChatClient(modelId) .AsIChatClient(); } diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Services/CustomActions/FoundryLocalPasteProvider.cs b/src/modules/AdvancedPaste/AdvancedPaste/Services/CustomActions/FoundryLocalPasteProvider.cs index 43481eddae..8b57baae74 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/Services/CustomActions/FoundryLocalPasteProvider.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/Services/CustomActions/FoundryLocalPasteProvider.cs @@ -146,6 +146,7 @@ public sealed class FoundryLocalPasteProvider : IPasteAIProvider var options = new ChatOptions { ModelId = modelReference, + MaxOutputTokens = 2048, }; if (!string.IsNullOrWhiteSpace(systemPrompt))