opencode icon indicating copy to clipboard operation
opencode copied to clipboard

docs: update GitLab integration to use GitLab Duo provider

Open vglafirov opened this issue 2 weeks ago • 4 comments

Replace Anthropic provider with native GitLab Duo integration:

  • Configure GitLab Duo provider with CI_JOB_TOKEN authentication
  • Add @gitlab/opencode-gitlab-plugin for GitLab API tools
  • Remove all custom CI/CD variables (ANTHROPIC_API_KEY, GITLAB_HOST, GITLAB_TOKEN_OPENCODE)
  • Use GitLab predefined variables (CI_JOB_TOKEN, CI_SERVER_HOST, CI_PROJECT_PATH)
  • Remove glab CLI dependency - plugin provides direct API access
  • Add 'Using GitLab Tools' section with practical examples
  • Update documentation link to opencode-gitlab-plugin
  • Simplify setup - zero custom configuration required

The configuration now uses only GitLab's built-in CI/CD variables and provides native integration with GitLab Duo for AI-powered assistance.

vglafirov avatar Jan 13 '26 22:01 vglafirov

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

github-actions[bot] avatar Jan 13 '26 22:01 github-actions[bot]

cc: @nagyv Hi Viktor 👋 Don't you mind reviewing this? This is related to my recent PR: https://github.com/anomalyco/opencode/pull/7333

vglafirov avatar Jan 13 '26 22:01 vglafirov

lgtm but if yall have ur own process ill wait for Viktor to approve as well

rekram1-node avatar Jan 13 '26 22:01 rekram1-node

@rekram1-node I would double check with @nagyv before the merge, since it was his contribution. :)

vglafirov avatar Jan 13 '26 22:01 vglafirov

@vglafirov While I understand that GitLab would like to push its GitLab Duo models and I think #7333 is a great addition to OpenCode, I consider this documentation change a step back to everyone who is not a GitLab Duo subscriber.

My recommendation: write the documentation so that both GitLab Duo users and non-users can use it. Thus the instructions should work not be exclusionary. More specifics in separate comments.

nagyv avatar Jan 14 '26 06:01 nagyv

Btw, is my understanding correct that with #7333 merged,

once a GITLAB_TOKEN (possible =CI_JOB_TOKEN) env is set:

  • @gitlab/[email protected] - Provider implementation - need GitLab Duo subscription
  • @gitlab/[email protected] - OAuth/PAT authentication - valuable only if used with @gitlab/gitlab-ai-provider
  • @gitlab/[email protected] - GitLab API tools - the GITLAB_TOKEN will work for tool calls even if I don't use a Duo model (but go directly to Anthropic)

Thus except for the model selection the value of #7333 works without a GitLab Duo subscription too. Is this correct?

nagyv avatar Jan 14 '26 07:01 nagyv