Repository navigation
Advanced Paste additional customizations and PhiSilica provider - #46727
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.Unrecognized words (1)SCL Some files were automatically ignored 🙈These sample patterns would exclude them: You should consider adding them to: File matching is via Perl regular expressions. To check these files, more of their words need to be in the dictionary than not. You can use To accept these unrecognized words as correct and update file exclusions, you could run the following commands... in a clone of the git@github.com:microsoft/PowerToys.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/27480011503/attempts/1' &&
git commit -m 'Update check-spelling metadata'OR To have the bot accept them for you, comment in the PR quoting the following line: Forbidden patterns 🙅 (1)In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves. These forbidden patterns matched content: Should be
|
| ❌ Errors and Warnings | Count |
|---|---|
| 1 | |
| 2 | |
| ❌ forbidden-pattern | 1 |
| 1 |
See ❌ Event descriptions for more information.
If the flagged items are 🤯 false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it,
try adding it to thepatterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
_SECURE_SCL is still present in deps/vcpkg-overlays/spdlog/msvc-14.51-stdext-checked-array-iterator.patch, so dropping SCL from expect.txt made check-spelling fail on the unrecognized word. Restore the entry. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Muyuan Li (MuyuanMS)
left a comment
There was a problem hiding this comment.
Review findings for the current head. Two comments include directly applicable suggestions.
|
Muyuan Li (@MuyuanMS) thanks for a review 😊 |
#49840) …roviders PR #46727 added `ReasoningEffort = "minimal"` to OpenAIPromptExecutionSettings in SemanticKernelPasteProvider.CreateExecutionSettings(). The value is not user-configurable, so every OpenAI/Azure OpenAI request now fails on models that don't accept 'minimal': HTTP 400 (invalid_request_error: unsupported_value) Parameter: reasoning_effort Unsupported value: 'reasoning_effort' does not support 'minimal' with this model. Supported values are: 'medium'. This is the same class of regression PR #43766 previously fixed by removing hardcoded Temperature/tuning properties. Remove the property so the service default applies, and add a comment to prevent it being reintroduced. <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
#49840) …roviders PR #46727 added `ReasoningEffort = "minimal"` to OpenAIPromptExecutionSettings in SemanticKernelPasteProvider.CreateExecutionSettings(). The value is not user-configurable, so every OpenAI/Azure OpenAI request now fails on models that don't accept 'minimal': HTTP 400 (invalid_request_error: unsupported_value) Parameter: reasoning_effort Unsupported value: 'reasoning_effort' does not support 'minimal' with this model. Supported values are: 'medium'. This is the same class of regression PR #43766 previously fixed by removing hardcoded Temperature/tuning properties. Remove the property so the service default applies, and add a comment to prevent it being reintroduced. <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **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 <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b3fb20d-6e9d-4fef-a5cd-f8921d28c220
## Summary of the Pull Request Adds a regression test guarding against re-introduction of a hardcoded `ReasoningEffort` value in `SemanticKernelPasteProvider.CreateExecutionSettings()`. This value previously broke every OpenAI/Azure OpenAI custom paste action for models that don't support `reasoning_effort: minimal`, causing HTTP 400 errors (see #49838). The underlying fix already exists on `main` — `CreateExecutionSettings()` no longer sets `ReasoningEffort`, and the Phi Silica on-device provider has since been split into its own `PhiSilicaPasteProvider` class. This PR does not modify provider logic; it adds test coverage to prevent this specific regression from being reintroduced. ## PR Checklist - [x] Closes: #xxx _(Not applicable — this PR does not close #49838, since the underlying fix already landed separately. Filed to add regression coverage only.)_ - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected _(Not yet discussed with core contributors — flagging that this is a test-only addition in response to already-observed regression risk, and happy to adjust scope/approach based on maintainer feedback.)_ - [x] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized _(N/A — no user-facing strings changed.)_ - [x] **Dev docs:** Added/updated _(N/A — internal test-only change, no dev docs affected.)_ - [x] **New binaries:** Added on the required places _(N/A — no new binaries introduced.)_ - [x] **Documentation updated:** If checked, please file a pull request on our docs repo and link it here: #xxx _(N/A — no user-facing documentation changes.)_ ## Detailed Description of the Pull Request / Additional comments Issue #49838 reported that Advanced Paste custom actions fail with HTTP 400 for OpenAI/Azure OpenAI models that don't support `reasoning_effort: minimal`, a value that was hardcoded in `SemanticKernelPasteProvider.CreateExecutionSettings()` (originally introduced in #46727 alongside the Phi Silica on-device provider). By the time this was investigated, the hardcoded value had already been removed from `main`, and the code now includes an explicit comment warning against reintroducing model-specific tuning properties in this shared method. However, there was no test enforcing that guarantee — meaning a future change could silently reintroduce the same class of bug (this is the second time this exact pattern has caused a regression; see #43766 for the first). This PR adds a unit test in `AdvancedPaste.UnitTests` that constructs an OpenAI-configured `SemanticKernelPasteProvider` and asserts that `CreateExecutionSettings()` returns an `OpenAIPromptExecutionSettings` object with `ReasoningEffort` left unset. No production code is modified. ## Validation Steps Performed - Added the new unit test to `AdvancedPaste.UnitTests`. - Ran the test locally against the current `main` branch and confirmed it passes. - Confirmed no other tests in the `AdvancedPaste.UnitTests` project were affected by this change. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
## Summary of the Pull Request Adds a regression test guarding against re-introduction of a hardcoded `ReasoningEffort` value in `SemanticKernelPasteProvider.CreateExecutionSettings()`. This value previously broke every OpenAI/Azure OpenAI custom paste action for models that don't support `reasoning_effort: minimal`, causing HTTP 400 errors (see #49838). The underlying fix already exists on `main` — `CreateExecutionSettings()` no longer sets `ReasoningEffort`, and the Phi Silica on-device provider has since been split into its own `PhiSilicaPasteProvider` class. This PR does not modify provider logic; it adds test coverage to prevent this specific regression from being reintroduced. ## PR Checklist - [x] Closes: #xxx _(Not applicable — this PR does not close #49838, since the underlying fix already landed separately. Filed to add regression coverage only.)_ - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected _(Not yet discussed with core contributors — flagging that this is a test-only addition in response to already-observed regression risk, and happy to adjust scope/approach based on maintainer feedback.)_ - [x] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized _(N/A — no user-facing strings changed.)_ - [x] **Dev docs:** Added/updated _(N/A — internal test-only change, no dev docs affected.)_ - [x] **New binaries:** Added on the required places _(N/A — no new binaries introduced.)_ - [x] **Documentation updated:** If checked, please file a pull request on our docs repo and link it here: #xxx _(N/A — no user-facing documentation changes.)_ ## Detailed Description of the Pull Request / Additional comments Issue #49838 reported that Advanced Paste custom actions fail with HTTP 400 for OpenAI/Azure OpenAI models that don't support `reasoning_effort: minimal`, a value that was hardcoded in `SemanticKernelPasteProvider.CreateExecutionSettings()` (originally introduced in #46727 alongside the Phi Silica on-device provider). By the time this was investigated, the hardcoded value had already been removed from `main`, and the code now includes an explicit comment warning against reintroducing model-specific tuning properties in this shared method. However, there was no test enforcing that guarantee — meaning a future change could silently reintroduce the same class of bug (this is the second time this exact pattern has caused a regression; see #43766 for the first). This PR adds a unit test in `AdvancedPaste.UnitTests` that constructs an OpenAI-configured `SemanticKernelPasteProvider` and asserts that `CreateExecutionSettings()` returns an `OpenAIPromptExecutionSettings` object with `ReasoningEffort` left unset. No production code is modified. ## Validation Steps Performed - Added the new unit test to `AdvancedPaste.UnitTests`. - Ran the test locally against the current `main` branch and confirmed it passes. - Confirmed no other tests in the `AdvancedPaste.UnitTests` project were affected by this change. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b3fb20d-6e9d-4fef-a5cd-f8921d28c220
Summary
Adds an on-device Phi Silica (Windows AI) paste provider to Advanced Paste and richer
per-action customization, plus the package-identity plumbing that lets the unpackaged
Advanced Paste app use Windows AI APIs.
Advanced Paste features
CustomActions/PhiSilicaPasteProvider.cs): an on-deviceAI provider backed by the Windows AI Phi Silica language model — no cloud endpoint or API
key required. Registered as a new
AIServiceTypeviaPasteAIProviderFactory/AIServiceTypeRegistry.AdvancedPasteAdditionalAction): user-defined actions withtheir own prompt, system prompt, AI provider, and shortcut — plus an optional "coaching"
prompt/system-prompt/provider/shortcut and shortcut-conflict detection.
AdvancedPasteDefaultPrompts) and updates toAdvancedPasteCustomAction,PasteFormat(s),OptionsViewModel, andPasteFormatExecutorto support per-action provider selection and system prompts.AdvancedPastePage.xaml/.xaml.cs,Resources.resw): configure thePhi Silica provider, choose a provider per action, edit system/coaching prompts, and a
Phi Silica availability/readiness experience — Settings queries the Advanced Paste
executable via
--check-phi-silica, and a "Download model" action triggers--prepare-phi-silicato fetch the model and then re-probes.Package identity for Windows AI (replaces the MSIX-install approach)
with a registered package identity. Advanced Paste runs unpackaged, so it obtains
identity from the existing
Microsoft.PowerToys.SparseAppsparse package(
src/PackageIdentity/): a new<Application Id="PowerToys.AdvancedPasteUI">entry inAppxManifest.xmlmaps it toPowerToys.AdvancedPaste.exe, with matching updates toBuildSparsePackage.ps1.PhiSilicaLafHelper.cs. The token/attestation are baked atbuild time by the
GeneratePhiSilicaLafCredentialsMSBuild target intoPhiSilicaLafCredentials.g.cs— local dev defaults live insrc/PhiSilicaLaf.props(imported from
Directory.Build.props) and the production secret is injected via/p:in the release pipeline.AdvancedPaste.dev.manifest/AdvancedPaste.prod.manifestapplication manifests(selected by
CIBuild) declaring full-trust and the system AI models capability.Build & pipeline
2.2.0line and addedMicrosoft.WindowsAppSDK.AI2.2.3(the Phi Silica APIs). Foundation2.1.0carries thesparse-identity PRI fix, and the stable AI build matches the OS Windows AI runtime.
src/modules/AdvancedPaste/custom.props,XES one-store versioning,
AdvancedPasteVersion). Asteps-setup-versioning.ymlstep isadded for Advanced Paste in
job-build-project.yml, ordered before CmdPal to avoid aversion-collision installer failure (WIX0103).
release.ymlpassesPhiSilicaLafToken/PhiSilicaLafAttestationinto the main build;spell-check allow-list/patterns updated.
Microsoft.Windows.Compatibilityreference and theCommon.UI"force matching DLL versions" hack.Video clip internal
Build internal