Closed qoijjj closed 6 days ago
Compose, along with a few other AI features, appear to be opimization guides:
https://source.chromium.org/chromium/chromium/src/+/main:components/optimization_guide/core/model_execution/model_execution_prefs.cc;l=19;bpv=0;bpt=1
Not sure if actually disabling opimization guides would or would not cause these features to also be disabled. I'm inclined to believe that is the case based on this function:
https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.cc;l=26
It is probably best then to disable OptimizationHints
since that is what is used to disable most annoyances related to optimization guides, assuming what I think is true and it doesn't intialize any guide related features when this is disabled.
@RKNF404 I think that code is referring to an optimization guide for compose, but I'm not sure. I don't think optimization hints/guides on their own are a bad thing, they improve performance.
@qoijjj I don't think so, seems like these features are just defined under the optimization_guide namespace. Since they can be disabled via policy and the policy affects these prefs. They seem to group execution models (or AI features like compose) in with guides and hints.
Check this out:
https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/compose/compose_enabling.cc;l=190
If opt_guide == nullptr
it will not enable compose, and it gets the value of opt_guide
from:
https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/compose/compose_enabling.cc;l=174
Which calls the function I linked above which returns nullptr when optimization guides are disabled. This may be just for compose but I'm pretty all the other AI BS is also disabled with similar logic.
@RKNF404 I see, I'll look into this further in a bit. Even if that's the case though, I'm not sure that justifies removing optimizationguides altogether
I guess, doesn't seem that significant in my opinion, especially since disabling it also disables the privacy intrusive AI stuff. Depends on how noticable the performance loss could be if they are disabled?
@RKNF404 it depends on the implementation. if it's using pretrained models locally to do performance optimizations, there would be no downside. I'll need to look into this further
@RKNF404 I've been looking into this more. It looks like optimization guides are integrated with compose, but compose doesn't depend on them. It's a soft dependency:
If there is no optimization guide found, then COMPOSE_HINT_DECISION_UNSPECIFIED is returned, whereas COMPOSE_HINT_DECISION_COMPOSE_DISABLED disables compose.
so these would need to be disabled independently.
Please let me know if I'm reading that wrong though
this makes sense though because optimization guides are about page load optimizations, whereas compose is a context menu feature to do content generation
@qoijjj looking at it, you're right. It would appear compose isn't exactly disabled when it is unspecified: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/compose/compose_enabling.cc;l=297;drc=2017cd8a8925f180257662f78eaf9eb93e8e394d Disabling the feature directly makes more sense.
The more I look into that call/definition chain, the more right you are. Opt guides are integrated but not a dependency of operation, I guess.
copying some additional options to look at that @RKNF404 mentioned in discord:
"CreateThemesSettings": 2, "DevToolsGenAiSettings": 2, "GoogleSearchSidePanelEnabled": false, "HelpMeWriteSettings": 2, "TabOrganizerSettings": 2,,
for kGoogleSearchSidePanelEnabled, the policy is set to true by default. However, the functionality doesn't show up for me (when I select text, right click, and search with google, it opens in a new tab).
So I dug a bit more. the policy gets checked here:
and that function is used here:
but the call to that function isn't reached if the companion feature is disabled:
and the companion feature is disabled when GOOGLE_CHROME_BRANDING is false
So, at least for this policy no action is needed.
For HelpMeWriteSettings, the policy is mapped to kComposeEnterprisePolicyAllowed:
which is enabled by default here: https://source.chromium.org/chromium/chromium/src/+/main:components/optimization_guide/core/model_execution/model_execution_prefs.cc;l=40?q=kComposeEnterprisePolicyAllowed%20lang:cc&ss=chromium%2Fchromium%2Fsrc
So I just need to flip that flag
same for:
{ key::kCreateThemesSettings, optimization_guide::model_execution::prefs::kWallpaperSearchEnterprisePolicyAllowed,
{ key::kTabOrganizerSettings, optimization_guide::model_execution::prefs::kTabOrganizationEnterprisePolicyAllowed, base::Value::Type::INTEGER},
~for devtools it's set to allowwithoutlogging here:~
nvm, it's also allowed here: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/devtools/devtools_window.cc;l=535?q=DevToolsGenAiEnterprisePolicyValue&ss=chromium%2Fchromium%2Fsrc
https://github.com/secureblue/hardened-chromium/pull/41
leaving this issue open because there are additional ai features getting added to upstream
@qoijjj this issue can be closed right? Now that the history AI feature has been disabled.
https://source.chromium.org/chromium/chromium/src/+/main:components/compose/core/browser/compose_features.cc;l=13?q=kEnableCompose%20lang:cc&ss=chromium%2Fchromium%2Fsrc