Semantic code (ActiveContext Code) search indexing does not work
### Summary When enabling semantic code search (ActiveContext Code) in Admin -> Search -> Semantic search, the indexing fails with the error `Unauthorized to access generate_embeddings_codebase` in `active_context.log`. ### Steps to reproduce Enable semantic code search, trigger the semantic code search through the MCP for a project, check the errors in `active_context.log`. ### Example Project - ### What is the current *bug* behavior? Indexing fails with `Unauthorized to access generate_embeddings_codebase`, and the indexing status in the DB hangs on indexing. ### What is the expected *correct* behavior? That the indexing works. ### Relevant logs and/or screenshots ``` {"severity":"WARN","time":"2026-01-29T20:53:03.026Z","meta.caller_id":"Ai::ActiveContext::BulkProcessWorker","correlation_id":"08228a36f392052c90d8cf9e41d795ab","meta.root_caller_id":"Cronjob","meta.feature_category":"global_search","meta.client_id":"ip/","value_klass":"HTTParty::Response","message":"Invalid type for status","class":"Gitlab::Llm::VertexAi::Client","ai_event_name":"invalid_type","ai_component":"logging"} {"severity":"ERROR","time":"2026-01-29T20:53:03.027Z","meta.caller_id":"Ai::ActiveContext::BulkProcessWorker","correlation_id":"08228a36f392052c90d8cf9e41d795ab","meta.root_caller_id":"Cronjob","meta.feature_category":"global_search","meta.client_id":"ip/","unit_primitive":"generate_embeddings_codebase","status":{"detail":"Unauthorized to access generate_embeddings_codebase"},"message":"Failed response from Vertex","class":"Gitlab::Llm::VertexAi::Client","ai_event_name":"failed_response_received","ai_component":"abstraction_layer"} ``` #### Results of GitLab environment info Duo core, no Pro or Enterprise. GitLab Self-Managed Premium. https://docs.gitlab.com/user/gitlab_duo/semantic_code_search/ says it should work. <details> <summary>Expand for output related to GitLab environment info</summary> <pre> GitLab information Version: 18.8.2-ee Revision: 75b6aa72896 </pre> </details> #### Results of GitLab application Check <!-- Input any relevant GitLab application check information if needed. --> <details> <summary>Expand for output related to the GitLab application check</summary> <pre> Everything OK. </pre> </details> ### Possible fixes - ### Patch release information for backports - #### High-severity bug remediation -
issue