Skip to content

fix: clarify Windows AI API unavailable messaging - #630

Merged
Hao Liu (haoliuu) merged 1 commit into
mainfrom
haoliu/winai-api-unavailable-messaging
Oct 10, 2026
Merged

Hao Liu (haoliuu) merged 1 commit into
mainfrom
haoliu/winai-api-unavailable-messaging

Conversation

@haoliuu

Copy link
Copy Markdown
Collaborator

Summary

This PR addresses misleading Windows AI API availability messaging reported on RTX Spark devices.

The existing unavailable screen showed "This device isn't supported" followed by a hardware requirement such as "A Copilot+ PC is required." This can make the unavailability of a particular API or model look like a problem with the device's Copilot+ PC status.

The updated messaging improves the experience on RTX Spark and other devices by describing API availability rather than device branding. It does not enable additional APIs or models, or bypass readiness checks.

What changed

  • For NotSupportedOnCurrentSystem, show "Windows AI API unavailable" with the default message "This Windows AI API is currently unavailable on this device.", without the hardware-requirement prefix.
  • Apply the messaging to all devices reaching this state, including RTX Spark; no device-specific detection is added.
  • Set the unavailable-state title and description together, and clear them on the existing exception path to avoid stale messaging.
  • Preserve Ready / NotReady handling, other state descriptions, Limited Access Feature diagnostics, and Windows Insider guidance.
  • Keep hardware requirements on the model download and download-error screens, along with the existing Learn more links.
  • Add regression coverage and update the sample documentation.

Tests

  • Debug x64 application and test-project build passed.
  • All 19 Windows AI API configuration tests passed, covering neutral messaging, unchanged readiness behavior, disabled/unknown states, readiness-check exceptions, LAF/Insider guidance, and hardware requirements.
  • Manually verified the updated unavailable-state UI on RTX Spark device.

Use neutral messaging for NotSupportedOnCurrentSystem while preserving readiness checks, model preparation, hardware requirements, and existing diagnostics. Add focused regression tests and document the availability behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 10, 2026 03:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The messaging changes are consistent with the stated scope and adequately covered by focused tests.

0 open findings

What changed in this PR

Clarifies Windows AI API availability messaging without changing compatibility checks or hardware requirements.

Changes:

  • Adds neutral unavailable-state titles and descriptions.
  • Prevents stale messaging after exceptions.
  • Adds regression tests and documentation.
File Description
docs/​AddingSamples.md Documents availability messaging behavior.
AIDevGallery/​Samples/​Definitions/​WcrApis/​WcrApiHelpers.cs Adds neutral unavailable descriptions.
AIDevGallery/​Models/​ModelCompatibility.cs Selects state-specific titles and descriptions.
AIDevGallery/​Controls/​WcrModelUnavailable.xaml.cs Shares the default issue title.
AIDevGallery/​Controls/​SampleContainer.xaml.cs Applies and resets availability messaging.
AIDevGallery.Tests/​UnitTests/​WcrApiConfigurationTests.cs Adds regression coverage for compatibility states.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@haoliuu
Hao Liu (haoliuu) enabled auto-merge (squash) October 10, 2026 03:24
@haoliuu
Hao Liu (haoliuu) merged commit f2eeef4 into main Oct 10, 2026
9 checks passed
@haoliuu
Hao Liu (haoliuu) deleted the haoliu/winai-api-unavailable-messaging branch October 10, 2026 03:26
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.

3 participants