← Back to release summary

Prompt API Thinking Mode

Category
Miscellaneous
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Enables developers to control the reasoning effort and receive thoughts from the built-in AI Prompt API (window.LanguageModel). Developers opt in by passing `thinkingEffort` when creating a session and/or prompting the model (e.g., `{ thinkingEffort: "high", expectedOutputs: [{ type: "text", languages: ["en"] }, { type: "thought" }] }`). High-level semantic effort tiers ("none", "low", "medium", "high") map to underlying configs (e.g. token budgets). Ephemeral reasoning tokens are automatically stripped from the persistent session context, and only surfaced to API clients when requested via `{ type: "thought" }` in `expectedOutputs`, for flexible response ergonomics. This feature is an enhancement of the Prompt API (https://chromestatus.com/feature/5134603979063296).

Motivation

Current generation on-device language models (such as Gemma 4) are commonly trained as reasoners. By utilizing an internal scratchpad of intermediate thinking tokens prior to producing the final response, these models can achieve significantly higher accuracy on math, code generation, logical deduction, and multi-step planning tasks including those involving tool calling. Today, however, the Prompt API offers no API surface to configure or observe thinking mode, preventing web developers from leveraging a core capability of the model already present on the user's device. Developer opt-in is critical, since reasoning chains can increase token generation by 5× to 20× compared to visible answers, directly impacting latency and battery consumption on resource-constrained client devices. Major LLM APIs (e.g. Gemini, OpenAI, and Anthropic) have converged on exposing explicit reasoning control surfaces. Adding thinking options to the Prompt API unblocks reasoning-heavy web applications while giving developers fine-grained control over when to pay the compute cost of thinking (`thinkingEffort`) and whether to stream the intermediate reasoning steps to their UI (`expectedOutputs: [..., { type: "thought" }]`).

Standards & signals

Ecosystem

Explainers: https://github.com/webmachinelearning/prompt-api/blob/main/README.md#thinking-mode

View on chromestatus.com