Files
Anthony Tseng 1666370521 Reland #35004 "Replace kLocalAIModels with upstream kHistoryEmbeddings" (#35250)
Use chromium's existing kHistoryEmbeddings feature flag instead of
maintaining a separate kLocalAIModels flag. Replace all kLocalAIModels
references with history_embeddings::kHistoryEmbeddings and remove
kLocalAIModels.

- Re-expose the upstream history-embeddings flag entry in about:flags
  (the upstream entry expired at M145)
- Override IsHistoryEmbeddingsEnabledForProfile() to bypass upstream's
  per-profile OptimizationGuide pref check
  (ShouldFeatureBeCurrentlyEnabledForUser(kHistorySearch)), which
  Brave doesn't set up.

No need to override IsHistoryEmbeddingsFeatureEnabled(): upstream's
implementation only auto-enables the feature for us-en-US profiles
when kLaunchedHistoryEmbeddings is enabled, and we already force
kLaunchedHistoryEmbeddings to FEATURE_DISABLED_BY_DEFAULT (pre-existing
override). That kills upstream's auto-launch fallback, leaving
kHistoryEmbeddings as the sole gate for Brave.
2026-04-22 05:59:36 +01:00
..