Skip to content

Demonstrate API compatibility#5

Merged
mattt merged 4 commits intomainfrom
mattt/api-compatibility
Oct 28, 2025
Merged

Demonstrate API compatibility#5
mattt merged 4 commits intomainfrom
mattt/api-compatibility

Conversation

@mattt
Copy link
Owner

@mattt mattt commented Oct 28, 2025

This PR updates the README to show how you can switch from the Foundation Models framework to AnyLanguageModel just by changing the import statement. It also adds test coverage to verify this.

@mattt mattt requested a review from Copilot October 28, 2025 10:24
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 demonstrates API compatibility between AnyLanguageModel and Apple's Foundation Models framework by adding test coverage and updating the README with clear migration examples.

Key changes:

  • Added parallel test files verifying identical API usage between FoundationModels and AnyLanguageModel imports
  • Updated README to emphasize drop-in replacement capability with a diff-style import change example
  • Restructured README to show compatibility first, then comprehensive provider examples

Reviewed Changes

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

File Description
Tests/AnyLanguageModelTests/APICompatibilityFoundationModelsTests.swift New test file verifying FoundationModels API compatibility with standard framework usage
Tests/AnyLanguageModelTests/APICompatibilityAnyLanguageModelTests.swift New test file demonstrating identical API using AnyLanguageModel import instead
README.md Updated to show drop-in replacement capability first, reorganized example code to emphasize compatibility

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

@mattt mattt merged commit b530376 into main Oct 28, 2025
2 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