Forward user-agent to model gateway
Problem
The user_agent
header is used in the model-gateway for logging from which extension a request originally came from (see https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/blob/main/codesuggestions/api/middleware.py#L139). Currently, this header is not being forwarded when doing code-suggestions through a Gitlab instance, which would lead us to loose valuable data.
Desired Outcome
Original value of user_agent
header can still be logged in the model-gateway
Potential solutions
- Forward the header (might be tricky if the http-client automatically overwrites it)
- Add a new header and change the model gateway to log this header instead if available.
Edited by Sebastian Rehm