feat: add option to disable on-device AI model download#21
Merged
Conversation
Adds a -disable-ai-download CLI flag (default on) and a matching GUI checkbox that applies three changes when enabled: - chrome://flags/#optimization-guide-on-device-model -> Disabled - chrome://flags/#prompt-api-for-gemini-nano -> Disabled - GenAILocalFoundationalModelSettings = 1 (Enterprise policy) The chrome://flags overrides are written to each detected profile's Local State under browser.enabled_labs_experiments. The Enterprise policy is written to the platform-specific managed-policy store: - macOS: defaults write com.google.Chrome ... - Linux: /etc/opt/chrome/policies/managed/go-chrome-ai.json - Windows: HKLM\Software\Policies\Google\Chrome (REG_DWORD) GUI is reorganised into a draggable HSplit with configuration on the left and run controls plus logs on the right; CLI prints the same action breakdown before applying changes. The GitHub repository URL is now displayed in both surfaces. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-disable-ai-downloadCLI flag (default on) and a matching GUI checkbox to block Chrome from downloading Gemini Nano / on-device foundational models.chrome://flags/#optimization-guide-on-device-model-> Disabledchrome://flags/#prompt-api-for-gemini-nano-> DisabledGenAILocalFoundationalModelSettings = 1(Chrome Enterprise policy)defaults, Linux/etc/opt/chrome/policies/managed/, WindowsHKLM\Software\Policies\Google\Chrome. Chrome will then display the "managed by your organization" banner.Test plan
go test ./...— flags patcher unit tests passgo vet ./...GOOS=linux go build ./cmd/cli,GOOS=windows go build ./cmd/cligo-chrome-ai -dry-run -no-restartshows action plan and skips policy when already set/etc/opt/chrome/policies/managed/)🤖 Generated with Claude Code