Consolidate 'anthropic_proxy' UP usage and ensure service mapping for relevant UPs
To proceed with the Refactor AiGateway.headers to accept unit_primitive and use pass it to Tokens.get issue, we need to ensure that every Unit Primitive that is explicitly used from permission checks has corresponding service with the same name (either defined explicitly in CC library config or virtually through AvailableServicesGenerator).
We tackle this in steps.
This issue is dedicated to UPs used in anthropic_proxy service/endpoint. Vertex issue is here.
Currently, anthropic_proxy service lists these UPs:
| Unit Primitive name | In use? | Appears in AI GW logs? | References | Action |
|---|---|---|---|---|
|
|
|
N |
|
Shinya told that it's no longer used through proxy. We can remove it from service yml defintion (not blocking): |
|
|
Y |
Y 16 uses over 2w |
|
|
|
|
Y | N |
|
|
|
|
Y | N |
Team told me it no longer uses Anthropic proxy - we can remove it from service yml (not blocking): |
|
|
|
Y |
Y 4 uses over 2w |
|
|
|
|
Y |
Y by far most used 14k uses over 2w |
|
|
|
|
Y |
Y 1 use over 2w |
|
|
|
|
Y | N |
Team told me it no longer uses Anthropic proxy - we can remove it from service yml (not blocking): |
|
|
|
Y | N |
Team told me it no longer uses Anthropic proxy - we can remove it from service yml (not blocking): |
|
|
|
Y | N |
|
We need to carefully review the usage of the listed UPs and for each of them:
- Either remove it entirely from the linked yml
- Or, if they are still used, remove them from https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector/-/blob/main/src/ruby/lib/gitlab/cloud_connector/available_services_generator.rb#L11
IGNORE_UNIT_PRIMITIVESto make sure we have 1:1 mapping with the service
We should grep the codebase and use the logs from AI GW - https://log.gprd.gitlab.net/app/r/s/jRNVG - to understand the usage.
For safety, we need to wait until 18.2 final version is released before bumping the library (as it can be picked up by renovate and we can introduce the regression if there is a problem with the change).
We will use the table to receive approval from stakeholders and for transparency during the rollout.