Increase FeatureDiscoverySearch AI Gateway timeout to 5 seconds

What does this MR do and why?

A timeout issue occurred on the feature discovery search prompt due to a recent change of moving from gemini 2 to 3 (we are deprecating gemini 2). version 3 of this model requires longer latency: feature_discovery_search runs on gemini_3_6_flash_vertex (google_genai, thinking_level: "low"), which takes ~3.2s to respond to this prompt — just over the previous 3s AI Gateway client timeout. That caused GitLab to hit Net::ReadTimeout before the AI Gateway's (successful) response arrived, so the "Search with AI" feature in the Feature Library modal returned 0 results even though the model matched correctly.

This MR raises ai_gateway_timeout in FeatureDiscoverySearch from 3 to 5 seconds to give headroom over the observed ~3.2s latency.

A matching change raises the AI Gateway prompt's own params.timeout from 3 to 5 seconds in a companion MR (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!7131 (merged)), so both sides agree — otherwise whichever stays at 3s becomes the new binding limit.

Related to #628327

How to set up and validate locally

  1. Ensure your local gitlab-ai-gateway checkout includes the companion timeout increase (ai-assist!7131), then restart the service.
  2. In a group/project with an active trial and the feature_discovery_gemini_search feature flag enabled, open the Feature Library modal and search using "Search with AI".
  3. Confirm results are returned instead of an empty list for queries whose model latency is close to 3s.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Kiesha Herman

Merge request reports

Loading
Loading