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
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,
*Writer API
* Summarization API
* Rewriter API
* Proofreader API
* Prompts API
but Translator , Language Detection is not Woorking.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.