Repository navigation
refactor!: drop isAvailable in favor of getModelInfo - #370
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ML Kit has no synchronous status check, so isAvailable() answered from a cached status or a guess, and it counted a downloading model as available where apple and ADK don't. getModelInfo() reports the exact state. Builds on #367. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t use Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removes isAvailable() from the provider, the transcription model and the AppleTranscription module, matching the Android provider. getModelInfo() reports availability and why the model is unavailable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
grabbou
force-pushed
the
refactor/android-drop-is-available
branch
from
November 1, 2026 09:17
e4f03c4 to
a905da6
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #367.
isAvailable()isn't an AI SDK API, and providers disagree on what it means mid-download: apple's language model saysfalse, ADK saysfalsewhile downloading buttruewhen downloadable, and Android saidtruefor both. ML Kit also has no synchronous status check, so Android's version answered from a cached status or from whether AICore is installed, which reports true on a Pixel 9 Pro where the Nano 4 preview and en-US speech recognition are unavailable.I removed
isAvailable()from the Android and Apple providers, their language and transcription models, andAppleTranscription, along with Android's status cache and AICore package query.getModelInfo()reports the exact state, which an app needs anyway to show a download or explain why the model is unavailable. Apple's transcription info keeps itsisAvailablefield. ADK is left alone since #368 removes it.The example app now checks availability asynchronously through
getModelInfo().Breaking changes
apple.isAvailable(),apple.transcriptionModel().isAvailable()andAppleTranscription.isAvailable()are gone; usegetModelInfo(), which rejects withUNSUPPORTED_OSbefore iOS 26.Test plan
bun test(22 pass), typecheck, lint and the Kotlin compile pass.isAvailable().🤖 Generated with Claude Code