On-Device LanguageDetector.availability() returns 'available', not 'readily' on macOS (Apple M4)

61 views
Skip to first unread message

Suraj Rana

unread,
Oct 11, 2025, 6:12:42 AM10/11/25
to Chrome Built-in AI Early Preview Program Discussions

1. Description of the issue:

  The on-device LanguageDetector API model does not seem to become fully

   operational. Calling LanguageDetector.availability() consistently

  returns a status of 'available' instead of the expected 'readily'.

  This prevents the use of the API, as it never reaches a ready state.

  The issue occurs on compatible hardware (Apple M4) with all necessary

  feature flags enabled. Other on-device APIs like Summarizer and

  LanguageModel are working correctly, indicating the issue is specific

  to the LanguageDetector component's lifecycle.


  2. Steps to Reproduce:

   1. On a compatible macOS machine, enable the following flags:

      #optimization-guide-on-device-model, #prompt-api-for-gemini-nano,

      #summarization-api-for-gemini-nano, #translation-api, and

      #language-detection-api.

   2. Relaunch the browser and wait for components to download.

   3. Open the DevTools console.

   4. Execute the following JavaScript code:

   1    await LanguageDetector.availability();


  3. Expected Behavior:

  The await LanguageDetector.availability() call should eventually

  return the string 'readily'.


  4. Actual Behavior:

  The call consistently returns the string 'available', and never seems

  to progress to 'readily'.


  5. Environment:

   * Browser: Google Chrome v143

   * OS: macOS 26

   * Hardware: iMac with Apple M4 Chip

Screenshot 2025-10-11 at 3.41.51 PM.png

Ezequiel Cicala

unread,
Oct 11, 2025, 7:52:20 PM10/11/25
to Chrome Built-in AI Early Preview Program Discussions, Suraj Rana

The `availability` function returns `available`, `downloadable`, `downloading`  and `unavailable`, but not `readily`. I don't think the OS type makes any difference.

Ezequiel Cicala

unread,
Oct 11, 2025, 7:55:47 PM10/11/25
to Chrome Built-in AI Early Preview Program Discussions, Ezequiel Cicala, Suraj Rana
From your screenshot, it seems you have a bug in your background.js, where although the translator is available, it displays a "not ready" error.

Suraj Rana

unread,
Oct 12, 2025, 12:27:26 AM10/12/25
to Chrome Built-in AI Early Preview Program Discussions, Ezequiel Cicala, Suraj Rana

Hi Team,


  I've been investigating the issue where our on-device translation

  feature consistently fails and falls back to the cloud API.


  After some debugging, we've identified that the root cause is likely

  missing Origin Trial tokens for the Translator and LanguageDetector

  APIs in our manifest.json file.


  Currently, the manifest includes tokens for WriterAPI,

  SummarizationAPI, and RewriterAPI, which are working as expected.

  However, the absence of tokens for the translation-related APIs would

  cause the browser to block access to those on-device models,

  explaining the consistent fallback to the cloud.


  To fix this, we need to register our extension for the Translation API

   and/or Language Detection API origin trials and add the new tokens to

   the trial_tokens array in manifest.json.


  This should enable the on-device translation feature and allow it to

  function correctly.


  Best,

Suraj Rana

unread,
Oct 12, 2025, 12:28:53 AM10/12/25
to Chrome Built-in AI Early Preview Program Discussions, Suraj Rana, Ezequiel Cicala
these are working on on-device-ai "

     *Writer API

   * Summarization API

   * Rewriter API

   * Proofreader API

   * Prompts API

but Translator , Language Detection is not Woorking.
Screenshot 2025-10-12 at 9.47.32 AM.png

Ezequiel Cicala

unread,
Oct 12, 2025, 9:50:00 AM10/12/25
to Suraj Rana, Chrome Built-in AI Early Preview Program Discussions

Summarize, Translator and Language Detector are available sin Chrome 138 and don't require Origin Trials access. See https://developer.chrome.com/docs/ai/built-in-apis.

El 12/10/25 a las 01:27, Suraj Rana escribió:
Reply all
Reply to author
Forward
0 new messages