Colin Mummery
unread,Jan 7, 2026, 3:56:30 AMJan 7Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chrome Built-in AI Early Preview Program Discussions, Kenji Baheux, Chrome Built-in AI Early Preview Program Discussions
Thanks for the reply Keni, I actually deleted that post shortly after I created it because I wasn't able to get the 'downloading' state consistently. Sometimes my startup code would get the status 'available'. In the end, I solved this inconsistency by dealing with both states using the following code:
aiInstalled = false;
if (status === 'available') {
aiInstalled = true;
console.log("[init] aiInstalled set to true without needing create.");
} else if (status === 'downloading') {
const session = await modelFactory.create();
session.destroy();
aiInstalled = true;
console.log("[init] aiInstalled set to true after successful create.");
} else {
console.log("[init] aiInstalled remains false (model needs download or is restricted).");
}
This sets my global boolean aiInstalled correctly every time and the create() seems to ensure the model becomes ready to use. I'll do some more experimentation and when I'm certain there's something strange going on, I'll file a report.