[go: up one dir, main page]

Skip to content

Refactor AiGateway.headers to accept unit_primitive and use pass it to Tokens.get

We should refactor Gitlab::AiGateway.headers to exclusively use CloudConnector::Tokens.get for token retrieval.

As a prerequisite, we should establish the mapping of Unit Primitive name to corresponding service name. That means that we pass Unit Primitive name (symbol), but further down the road in the method implementation, we can use it as a service name.

This allows us to move in smaller steps and to defer refactoring of the:

  • Gitlab::AiGateway.public_headers (accepts service_name)
  • and, transitively, User#allowed_to_use (also currently expects service_name)
Edited by Aleksei Lipniagov