Skip to content

Conversation

@atdrendel
Copy link
Contributor

Before making these changes, the tests would crash when targeting my macOS 15 computer in Xcode 26.2.

AnyLanguageModel - macOS Sequoia - Xcode 26 2 - Before Changes

After the changes, the tests are correctly skipped and the test suite passes.

AnyLanguageModel - macOS Sequoia - Xcode 26 2 - After Changes

Copilot AI review requested due to automatic review settings February 2, 2026 16:31
Copy link

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 adjusts the availability checks for SystemLanguageModel-based tests so that on macOS 15 / Xcode 26.2 the tests are correctly skipped instead of crashing.

Changes:

  • Introduced file-scoped helper booleans that check SystemLanguageModel.default.isAvailable only within an if #available(macOS 26.0, *) guard.
  • Updated the @Test annotations in the affected test files to use these helper booleans for their .enabled(if:) conditions.

Reviewed changes

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

File Description
Tests/AnyLanguageModelTests/APICompatibilityFoundationModelsTests.swift Adds a guarded isFoundationModelsSystemLanguageModelAvailable helper and uses it to conditionally enable the FoundationModels drop-in compatibility test.
Tests/AnyLanguageModelTests/APICompatibilityAnyLanguageModelTests.swift Adds a guarded isSystemLanguageModelAvailable helper and uses it to conditionally enable the AnyLanguageModel drop-in compatibility test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Owner

@mattt mattt left a comment

Choose a reason for hiding this comment

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

Perfect. Thank you, @atdrendel!

@mattt mattt merged commit 78641fc into mattt:main Feb 3, 2026
8 of 9 checks passed
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.

2 participants