Skip to content

feat: add option to disable on-device AI model download#21

Merged
itamaker merged 2 commits into
mainfrom
feat/disable-ai-download
May 19, 2026
Merged

feat: add option to disable on-device AI model download#21
itamaker merged 2 commits into
mainfrom
feat/disable-ai-download

Conversation

@itamaker

Copy link
Copy Markdown
Owner

Summary

  • Adds -disable-ai-download CLI flag (default on) and a matching GUI checkbox to block Chrome from downloading Gemini Nano / on-device foundational models.
  • When enabled, applies three changes per detected profile / host:
    • chrome://flags/#optimization-guide-on-device-model -> Disabled
    • chrome://flags/#prompt-api-for-gemini-nano -> Disabled
    • GenAILocalFoundationalModelSettings = 1 (Chrome Enterprise policy)
  • The Enterprise policy is written to the OS-native managed-policy store: macOS defaults, Linux /etc/opt/chrome/policies/managed/, Windows HKLM\Software\Policies\Google\Chrome. Chrome will then display the "managed by your organization" banner.
  • GUI: reorganised into a draggable HSplit (configuration on the left, run controls + logs on the right) and now shows the GitHub repository URL.
  • CLI: prints the action breakdown (grouped into "Local flag overrides" and "Enterprise policy" sections) before running.

Test plan

  • go test ./... — flags patcher unit tests pass
  • go vet ./...
  • Cross-build: GOOS=linux go build ./cmd/cli, GOOS=windows go build ./cmd/cli
  • macOS dry-run: go-chrome-ai -dry-run -no-restart shows action plan and skips policy when already set
  • GUI smoke-tested on macOS (Stable Chrome detected, divider draggable, log output)
  • Linux runtime verification (deferred — needs sudo for /etc/opt/chrome/policies/managed/)
  • Windows runtime verification (deferred — needs admin shell to write HKLM)

🤖 Generated with Claude Code

itamaker and others added 2 commits May 19, 2026 10:55
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>
@itamaker
itamaker merged commit 0be9308 into main May 19, 2026
1 check passed
@itamaker
itamaker deleted the feat/disable-ai-download branch May 19, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant