Chrome’s Decisions API: On-Device Classification & Gemma 4

Chrome landed the Decisions API in Chromium between 6 and 8 October 2026 for desktop users. The API enables on-device verification and classification of unstructured data using engines like Gemma 4 and EmbeddingGemma. (unstructured data: information that does not have a pre-defined data model or organized format.) (on-device: processing that happens locally on a user's hardware rather than on a remote server.) Web developers can now use this to answer closed questions—such as yes/no, multiple-choice, or ratings—directly on the visitor’s device.

Is this for you?

Desktop users can access on-device data classification via the Decisions API, but mobile users are excluded due to binary size constraints.

  • If you are a mobile-first developer, the current exclusion of Android means you cannot use the native Chrome implementation.
  • If you are a web developer, the Decisions API allows you to answer closed questions directly on the visitor's device.
  • If you run a travel site like Ingrid's, the API can identify features like pet-friendly status locally on a desktop CPU.
  • Skip this if you need to process image or audio input, as the Chrome API does not support these media types.

What you can do now

  1. If you use Chrome, check the chrome://flags#decisions-api flag to enable the feature before it expires at milestone 160.
  2. If you use the Decisions API, check your JSON schema to ensure it includes the specific labels and descriptions required by the DecisionModel.

Key figures

Release Date
6 to 8 October 2026
Model Performance
9.6 seconds for 8 questions (3,000 tokens)
Input Limit
113,000 characters
Expiry Milestone
Chrome milestone 160
Model Temperature
0.05 softmax temperature
GPU Support
Restricted to CPU only

The Chrome Decisions API (DecisionModel) Overview

The Decisions API functions as a local inference engine where the browser processes a visitor’s text against a developer-defined schema. (inference engine: software that uses a trained model to make predictions or produce outputs based on new input.) Developers provide a schema to map out closed questions and options, and the model returns a probability for every possible answer. Implementation of this API requires a “language-model” Permissions Policy, which shares the same requirements as the Prompt API.

Users can enable the API via the flag chrome

Users can enable the API via the flag chrome://flags#decisions-api, though the feature is scheduled to expire at Chrome milestone 160. The API is currently restricted to desktop environments because Google excluded Android to avoid a binary size increase. This exclusion means mobile-first developers cannot yet use the native Chrome implementation for their workflows.

Gemma 4 and EmbeddingGemma Engines

Gemma 4 serves as the primary prompt-based classification engine within the API. The system prompt instructs the model to treat the input only as data and reply with a single letter corresponding to the best option. The model does not write out a full sentence; instead, Chrome reads the probability of each letter as the next token to determine the result.

EmbeddingGemma provides an alternative approach using cosine similarity

EmbeddingGemma provides an alternative approach using cosine similarity—a measure of similarity between two non-zero vectors, used by the EmbeddingGemma engine to compare query and answer passages. Each answer becomes a passage, and the engine calculates the similarity between the query passage and all answer passages. These similarities are converted into probabilities using a softmax—a function used to convert similarity scores into probabilities with a specific temperature—set at 0.05.

Hardware Limits and 113,000 Character Cap

Gemma 4 is restricted to CPU-only execution because scoring options on the GPU “returns wrong scores or crashes the model service.” The API prioritizes stability over GPU acceleration for this specific model. Performance metrics from Jaewon Lee indicate that Gemma 4 on CPU takes about 9.6 seconds for 8 questions on an input of about 3,000 tokens.

Input limits are strictly enforced to prevent service crashes, with a 113,000-character limit that is refused in about 30 ms. The model also operates under a 10,107 token quota. For complex tasks involving 16 questions with 26 options each, the execution time can reach approximately 46 seconds on the CPU.

Code Review Findings: Position Bias and Latency

Code reviews revealed that smaller models like TinyGemma suffer from severe position bias, where the model frequently selects the first option (A). (position bias: a phenomenon where a model frequently selects the first option regardless of the actual content.) While Gemma 4 E2B showed a much smaller impact (accuracy moves by 1.3 points or less), Google remains aware of the discrepancy between letter scoring and the goal of “Order Independence.”

Reviewers identified and fixed a session handling bug where later options

Reviewers identified and fixed a session handling bug where later options were scored as if earlier answers were already in the conversation. Each option is now scored on its own copy of the session to ensure independence. Developers should also note that the model now ignores leading spaces in answer keys, which previously caused the model to return nearly zero probability for the correct answer.

Comparing Chrome API to MediaPipe DecisionMaker

Google’s MediaPipe DecisionMaker provides a broader range of features than the native Chrome Decisions API. MediaPipe includes a temperature-per-question option, a “normalize prior” switch, and the ability to process batch evaluations. MediaPipe also supports image and audio input, which the current Chrome API does not support.

Confidence scoring represents a major functional difference between the two tools.

Confidence scoring represents a major functional difference between the two tools. MediaPipe DecisionMaker provides a confidence measure that is separate from the top probability, whereas Chrome’s API only returns the probability. In some tests, a top probability of 0.40 in MediaPipe resulted in a confidence score of only 0.010. Chrome’s implementation currently lacks this granular confidence data.

Implementation Rules and User Gestures

Model downloads for the Decisions API require a user gesture before they can begin. Because the models are multi-GB files, Chrome requires interaction to prevent sites from starting massive downloads automatically. Developers should monitor the Chrome milestone 160 deadline to plan for potential migration of these features.

Application Use Cases for DecisionModel

The Decisions API offers several practical applications for developers moving toward on-device intelligence:

  • Determine if a user’s query contains specific prohibited terms on-device (for moderation engineers).
  • Categorize user-provided text into a fixed list of categories without a server (for product developers).
  • Measure how closely a user’s input matches a specific description using similarity (for data engineers).
  • Perform rapid rating of text snippets, such as a 1-5 star scale (for UX designers).
  • Optimize for Position Bias in on-device classification (for ML engineers).

Replacing Server-Side Classifiers

The Decisions API reduces the need for server-side classification APIs and the now-dropped Classifier API. By moving the computation to the visitor’s device, developers can reduce server costs and reduce network latency for the end user. This transition also improves privacy, as user data remains on the local machine during the classification process.

Ingrid’s Travel Site: A DecisionModel Walkthrough

Ingrid runs a travel site and wants to let users filter results by “pet-friendly” status without querying her database for every user input. She implements the Decisions API using the Gemma 4 engine and defines a schema with a “pet-friendly” question. When a user enters a description of a resort, the API runs the model on the user’s desktop CPU and identifies the resort as pet-friendly locally in roughly 9.6 seconds.

The decision to use the Decisions API holds as long as the target audience

The decision to use the Decisions API holds as long as the target audience uses desktop browsers. If Ingrid’s user base shifted primarily to Android, the API would be unavailable to them due to the binary size constraints, and she would need to switch to MediaPipe or a server-side solution. Using the Decisions API correctly saves on server costs, but choosing it for a high-latency requirement might be a mistake; if the 9.6-second wait is too slow for the UX, she must reconsider the model size or move to a cloud-based solution.

Key terms
Cosine Similarity
A measure of similarity between two non-zero vectors, used by the EmbeddingGemma engine to compare query and answer passages.
Softmax
A function used to convert similarity scores into probabilities with a specific temperature.

Decisions API: what to check, compare and watch

JSON schema
The Decisions API requires a developer-defined schema to map out the closed questions and options for the model to process. Web developers building client-side AI features: update the JSON schema to include the specific labels and descriptions required by the DecisionModel.
OpenAI API
Developers must choose between the on-device Decisions API and cloud-based alternatives like the OpenAI API for classification tasks. Web developers building client-side AI features: compare the local inference speed of the Decisions API against the network latency of the OpenAI API.
Firebase ML Kit
If the on-device Decisions API does not meet requirements, developers might switch to Firebase ML Kit for mobile-ready AI. Web developers building client-side AI features: evaluate Firebase ML Kit as a fallback if the Decisions API limitations are too restrictive.
Same-Origin Policy
The shared cache for the Decisions API must comply with the Same-Origin Policy to prevent cross-origin timing signals. Browser architecture engineers: audit the cache implementation to ensure it complies with standard browser security policies.
Chrome Canary
The Decisions API can be tested early by enabling experimental features in the Chrome Canary browser. Version: 157. Browser architecture engineers: check the Decisions API behavior in the latest Chrome Canary build.
Npm package @mediapipe/tasks-decision
AI deployment specialists can use the MediaPipe npm package to deploy the DecisionMaker logic in non-browser environments. AI deployment specialists: install the @mediapipe/tasks-decision package to test the DecisionMaker logic in a Node.js environment.

Decisions API: questions the original report leaves open

Does it cost anything?
The original report did not say if there is a cost.
How much does the Chrome Decisions API cost to use?
The original report did not say how much the API costs to use.

Reported by DEJAN on 8 October 2026: Chrome Decisions API: the prompts, limits, engines and code reviews behind DecisionModel.

Scroll to Top