foundation-models-language-model-protocol

Installation
SKILL.md

Foundation Models — Server Model LanguageModel Creation

This skill teaches you how to build the open-source Swift package that bridges a server-side inference API to Apple's Foundation Models framework. The package is the translation layer between the framework's API and your inference endpoint. App developers import the package, name your model, and call the same LanguageModelSession API they use for the on-device model — your endpoint serves the request.

After your package ships, an app developer's code looks like this:

import MyLanguageModel

let model = MyLanguageModel(name: "your-model-id", baseURL: URL(string: "https://api.example.com")!)
try await model.authenticateIfNeeded()  // OAuth — user signs into their account

let session = LanguageModelSession(model: model)
let response = try await session.respond(to: "Plan a 4-day trip to Buenos Aires…")

That's the whole developer surface. Same LanguageModelSession API as the on-device model. Your endpoint runs the inference.

What you own

Installs
2
GitHub Stars
181
First Seen
Jul 10, 2026
foundation-models-language-model-protocol — apple/foundation-models-utilities