linshenkx/prompt-optimizer · error · RequestConfigError
Chrome built-in AI model is not downloaded. Open the model m
Error message
Chrome built-in AI model is not downloaded. Open the model manager and click download to prepare it.
What it means
createReadySession in the Chrome built-in AI adapter checks window.ai availability; when the underlying model reports 'downloadable', it means the Gemini Nano weights are not yet on the device and the adapter throws a RequestConfigError telling the user to download the model first.
Source
Thrown at packages/core/src/services/llm/adapters/chrome-built-in-adapter.ts:112
}
})
} finally {
session.destroy?.()
}
}
protected getParameterDefinitions(_modelId: string): readonly ParameterDefinition[] {
return []
}
protected getDefaultParameterValues(_modelId: string): Record<string, unknown> {
return {}
}
private async createReadySession(initialPrompts?: ChromeLanguageModelPrompt[]) {
const status = await checkChromeBuiltInAvailability()
if (status.availability === 'downloadable') {
throw new RequestConfigError('Chrome built-in AI model is not downloaded. Open the model manager and click download to prepare it.')
}
if (status.availability === 'downloading') {
throw new RequestConfigError('Chrome built-in AI model is still downloading. Please wait for the download to finish.')
}
if (status.availability !== 'available') {
throw new RequestConfigError(status.error || 'Chrome built-in AI is not available in this browser.')
}
return await createChromeBuiltInSession(initialPrompts?.length ? { initialPrompts } : {})
}
private buildPrompt(messages: Message[]): {
initialPrompts?: ChromeLanguageModelPrompt[]
prompt: ChromeLanguageModelPromptInput
} {
const normalizedMessages = messages
.map((message) => ({
role: message.role,View on GitHub (pinned to 3e677b1d9f)
Solutions
- Open the model manager (or chrome://components → 'Optimization Guide On Device Model') and trigger the download, wait for it to finish
- Ensure Chrome is up to date and the Prompt API flag is enabled
- Free disk space and restart Chrome so the component can download
- Catch RequestConfigError in the UI and show the download prompt instead of failing silently
Example fix
// before
const s = await adapter.session()
// after
try {
const s = await adapter.session()
} catch (e) {
if (e instanceof RequestConfigError && /not downloaded/.test(e.message)) {
showDownloadModelUI(); return
}
throw e
} Defensive patterns
Strategy: validation
Validate before calling
import { checkChromeBuiltInAvailability } from '...'
const status = await checkChromeBuiltInAvailability()
if (status.availability === 'downloadable') {
promptUserToDownloadModel() // instead of calling session()
} Type guard
null
Try / catch
try { const s = await adapter.session() }
catch (e) {
if (e instanceof RequestConfigError && /not downloaded/.test(e.message)) { promptDownload(); return }
throw e
} Prevention
- Check availability before showing Chrome built-in as an option
- Trigger model download on first setup of the provider
- Surface download state in provider settings UI
When it happens
Trigger: Starting a chat session (session() → createReadySession) in a Chrome/preview browser where Prompt API is exposed but the model was never downloaded; fresh browser profile; model was evicted after disk cleanup.
Common situations: Enabling chrome://flags#prompt-api-for-gemini-nano without downloading the model, using a new profile, Chrome Dev/Canary where the component is optional, insufficient disk space preventing auto-download.
Related errors
- Chrome built-in AI model is still downloading. Please wait f
- Chrome built-in AI is not available in this browser.
AI-assisted analysis of linshenkx/prompt-optimizer@3e677b1d9f (2026-08-27).
Data as JSON: /api/errors/b639f6f525bc3fbf.
Report an issue: GitHub.