Description
GitLab Duo workflow models do not work correctly with a self-managed GitLab instance.
I found two issues while testing this:
- Duo workflow models need the current working directory and GitLab project/namespace context.
- If the stored GitLab OAuth token is expired and the refresh fails, provider initialization throws and can prevent OpenCode from starting.
I reproduced the OAuth failure with an expired credential where the refresh endpoint returned invalid_grant.
Plugins
None
OpenCode version
0.0.0-dev-202609112115
Steps to reproduce
-
Configure OpenCode to use a self-managed GitLab instance:
$env:GITLAB_INSTANCE_URL = "https://gitlab.example.com"
$env:GITLAB_HOST = "https://gitlab.example.com"
-
Authenticate OpenCode with GitLab OAuth and configure GitLab Duo.
-
Start OpenCode using the GitLab Duo workflow model:
opencode -m gitlab/duo-workflow`
-
On a self-managed GitLab instance, start a GitLab Duo workflow and observe that the workflow does not receive the working directory and project/namespace context required for the current repository.
-
Let the stored GitLab OAuth credentials expire or make the refresh token invalid/revoked, then start OpenCode again.
-
OpenCode attempts to refresh the expired GitLab OAuth token. If GitLab returns invalid_grant, provider initialization throws and OpenCode can fail to start.
-
Removing the expired GitLab entries from auth.json allows OpenCode to start again. Re-authenticating restores GitLab access.
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal / PowerShell 7
Description
GitLab Duo workflow models do not work correctly with a self-managed GitLab instance.
I found two issues while testing this:
I reproduced the OAuth failure with an expired credential where the refresh endpoint returned
invalid_grant.Plugins
None
OpenCode version
0.0.0-dev-202609112115
Steps to reproduce
Configure OpenCode to use a self-managed GitLab instance:
Authenticate OpenCode with GitLab OAuth and configure GitLab Duo.
Start OpenCode using the GitLab Duo workflow model:
On a self-managed GitLab instance, start a GitLab Duo workflow and observe that the workflow does not receive the working directory and project/namespace context required for the current repository.
Let the stored GitLab OAuth credentials expire or make the refresh token invalid/revoked, then start OpenCode again.
OpenCode attempts to refresh the expired GitLab OAuth token. If GitLab returns
invalid_grant, provider initialization throws and OpenCode can fail to start.Removing the expired GitLab entries from
auth.jsonallows OpenCode to start again. Re-authenticating restores GitLab access.Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal / PowerShell 7