Docs: Fix AI Gateway upgrade tag and add the 19.6 upgrade note
What does this MR do?
The upgrade section tells customers to download the newest AI Gateway image, while the install section says to use the tag that matches their GitLab version. A Docker customer on GitLab 19.5 or earlier can follow the upgrade section onto an AI Gateway 19.6 image, and some flows then fail to start. A start from the UI or the REST API fails with 400 Bad request and the gateway's message 16:Forbidden by auth provider. When GitLab starts the flow itself, the flow fails. For a code review on a merge request, GitLab adds a merge request note with Error code: DCR4005.
This MR:
- Points the upgrade section at the matching tag.
- Adds a troubleshooting topic for running AI Gateway 19.6 or later with GitLab 19.5 or earlier, and links it from the upgrade section.
- Corrects the key rotation entry in
offline_deployment.md, which namedCould not obtain Duo Workflow token, a result the UI and REST API do not show. That line came from !260775 (merged).
It documents gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!7404 (merged), where @manojmj asked for it in gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!7404 (comment 4106050156). That MR merged on 3 November. The topic says 19.6 on the assumption that the 19.6 gateway release is cut after that merge.
The topic covers Docker deployments and flows. Helm chart and Docker Compose deployments are not changed here. Chat requests are fixed in GitLab 19.4.2, 19.3.4 and 19.2.8 (backports in !257901 (merged), !257903 (merged) and !257906 (merged)).
What happens when the gateway is newer than GitLab
sequenceDiagram
participant GitLab as GitLab 19.5
participant Gateway as AI Gateway 19.6
GitLab->>Gateway: Flow request signed with the Customers Portal token
alt Customers Portal URL not set
Gateway-->>GitLab: UNAUTHENTICATED, Forbidden by auth provider
Note over Gateway: logs Signature verification failed.
Note over GitLab: UI and REST API: 400 Bad request, 16:Forbidden by auth provider<br/>Code review: MR note DCR4005
else URL set to customers.gitlab.com, online license
Gateway-->>GitLab: Request accepted
endWhere each statement in the topic comes from:
- The self-hosted image turns on custom models, and the gateway then registers the Customers Portal only when its URL is set.
- Duo Workflow Service follows the same rule.
- GitLab signs a flow with the synced token when the flow uses a self-hosted model and Agents & flows does not. The fix is in 19.6, and a flow that uses the synced token needs an online license, because an offline license has none.
- The accepted branch for
https://customers.gitlab.comcomes from the same source lines. The lab showed that acceptance only with the staging portal.
How this was checked
Flow starts on a self-managed GitLab 19.5.3 instance, with an online license signed by the staging Customers Portal, went to an AI Gateway. Agents & flows used the GitLab AI vendor model and the flow used a self-hosted model. The gateways were CI images built with the self-hosted image's settings: the 7404 target branch before the change, and the 7404 merge result.
- Customers Portal URL set to the staging portal, which signed the license: the flow starts on both builds. A start from the UI (the Implement button on an issue) and a start from the REST API (
POST /api/v4/ai/duo_workflows/workflowswithstart_workflow) also succeed on the merge result. - URL not set, with 7404: the gateway does not load the Customers Portal keys and logs
Signature verification failed..- A start from the UI shows
400 Bad request - ["16:Forbidden by auth provider. debug_error_string:{UNAUTHENTICATED:Forbidden by auth provider}"]. - A start from the REST API returns HTTP 400 with the same message.
- Running the code review service on a merge request returns
Could not obtain Duo Workflow tokenand adds a note withError code: DCR4005. - An empty value fails the same way on a start from a script.
- A start from the UI shows
- URL set to
https://customers.gitlab.com, with 7404: the gateway loads the Customers Portal keys, then rejects the token, because the test license is signed by the staging portal. This shows the variable takes effect. The customers.gitlab.com request went to the 7404 build only.
Not covered: a license signed by the production portal, either variable set alone, an offline license, and a code review that completes with the URL set. Before 7404, an unset URL also fails here. That gateway loads the production portal keys by default (7 key IDs, against 5 with 7404), and those keys cannot verify the test license. A pass before 7404 needs a license signed by the production portal.
Why the workaround holds for a production license. No test used a license signed by the production portal, so the pass is not observed. The source makes the two builds equivalent:
- Before 7404, the gateway defaults to
https://customers.gitlab.comand passes that URL to its key provider. Duo Workflow Service defaults the same way. That is the key source an online-licensed instance uses today. - With both variables set to that URL, 7404 builds the same provider in the gateway and in Duo Workflow Service.
- The tests agree: 7 key IDs load with the production URL on 7404 and 7 by default before it, and the staging URL with a staging-signed license passes on both builds.
Related issues
Related to gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!7404 (merged)
Author's checklist
- Optional. Consider taking the GitLab Technical Writing Fundamentals course.
- Follow the:
- If you're adding a new page, add the product availability details under the H1 topic title.
- If you are a GitLab team member, request a review based on:
- The documentation page's metadata.
- The associated Technical Writer.
If you are a GitLab team member and only adding documentation, do not add any of the following labels:
~"frontend"~"backend"~"type::bug"~"database"
These labels cause the MR to be added to code verification QA issues.
Reviewer's checklist
Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.
If you aren't sure which tech writer to ask, use roulette or ask in the #docs Slack channel.
- If the content requires it, ensure the information is reviewed by a subject matter expert.
- Technical writer review items:
- Ensure docs metadata is present and up-to-date.
- Ensure the appropriate labels are added to this MR.
- Ensure a release milestone is set.
- If relevant to this MR, ensure content topic type principles are in use, including:
- The headings should be something you'd do a Google search for. Instead of
Default behavior, say something likeDefault behavior when you close an issue. - The headings (other than the page title) should be active. Instead of
Configuring GDK, say something likeConfigure GDK. - Any task steps should be written as a numbered list.
- If the content still needs to be edited for topic types, you can create a follow-up issue with the docs-technical-debt label.
- The headings should be something you'd do a Google search for. Instead of
- Review by assigned maintainer, who can always request/require the reviews above. Maintainer's review can occur before or after a technical writer review.
An AI coding assistant wrote this change. The assistant also checked each statement against the sources linked above, ran Vale and markdownlint-cli2 on the changed page, and ran the flow requests described above on a self-managed GitLab 19.5.3 instance on a test VM.