-
Notifications
You must be signed in to change notification settings - Fork 5.9k
feat: Add GitLab Duo Agentic Chat Provider Support #7333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
|
Related PR to models.dev registry: anomalyco/models.dev#616 |
|
/review |
|
/review |
|
Closes #7455 |
|
I am not sure why PR Standards check is failing. I've created an issue and linked it to this PR. |
|
@vglafirov apologies for delay I had this open on my computer but forgot to look at it |
|
@rekram1-node You recently merged Gitlab Duo PR on models.dev, but deployment pipeline is failing. If we get models deployed on models.dev, I can remove models from https://github.com/anomalyco/opencode/pull/7333/changes#diff-b0155a9e5561043f50ba86bc54d5fd59aa528c7af7c92b2f37585d80e792cd9aR740 PR to fix deployment issues: anomalyco/models.dev#631 |
|
Just address these and I will merge tmr morn! Once again sorry for delays our issue and pr volume has exploded Feel free to DM or email me if needed |
You are not an idiot. I have no idea why, but they are not popping up in a search, for some reason 😞 Here they are: |
|
@vglafirov this is awesome — thanks for building it! |
@kamilchm This PR contains documentation update: https://github.com/anomalyco/opencode/pull/7333/changes#diff-b5d5affc6941bf7bb19805cc8f556cd1b9ae73ffd99e520120700536b166f8c0 Also check published npm packages in comment above. They providing extensive documentation how to use this integration. Feel free to provide a feedback here or on repositories behind these npm packages. We haven't tested this on self-hosted instances yet, I am highly interesting to see if it works as expected. Thanks |
|
Great, one more question: do I need snything special on the GitLab Server side? Version, features? |
If you have self-hosted Duo, then I guess nothing special is needed, if not: https://docs.gitlab.com/administration/gitlab_duo_self_hosted/ |
@rekram1-node I've fixed npmjs search problems. It was due to poor metadata. Packages are searcheble now :) |
|
Nice! let me review these packages and then I think this is basically good to go |
Follow Copilot plugin pattern by removing @gitlab/opencode-gitlab-auth and @gitlab/opencode-gitlab-plugin from package.json dependencies. Plugins are now dynamically installed via BunProc.install() when GitLab is configured, matching the established pattern for opencode-copilot-auth and opencode-anthropic-auth. Changes: - Removed plugin packages from package.json dependencies - Pinned plugin versions (1.3.0 and 1.1.0) in auto-loading logic - Updated bun.lock to reflect dynamic installation approach - Kept @gitlab/gitlab-ai-provider as it's statically imported Addresses feedback from @rekram1-node on PR #7333
- Move @gitlab/[email protected] to BUILTIN array - Make @gitlab/[email protected] opt-in (not auto-loaded) - Remove custom GitLab plugin detection logic (~33 lines) - Simplify auth to use Auth.get() instead of manual parsing (~45 lines) - Add documentation for optional GitLab tools plugin - Update test mocks to handle versioned builtin plugins Net reduction: 63 lines (-99/+36) All 660 tests passing
|
@rekram1-node Refactored plugins loading. Please take a look again 🙏 |
|
lookin |
Co-authored-by: Aiden Cline <[email protected]> Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Aiden Cline <[email protected]> Co-authored-by: Aiden Cline <[email protected]>
Upstream changes: - feat: add plan mode with enter/exit tools (anomalyco#8281) - feat: Add GitLab Duo Agentic Chat Provider Support (anomalyco#7333) - feat(desktop): Ask Question Tool Support (anomalyco#8232) - feat: add Undertale and Deltarune built-in themes (anomalyco#8240) - fix: Add Plugin Mocks to Provider Tests (anomalyco#8276) - fix: update User-Agent string to latest Chrome version in webfetch (anomalyco#8284) - fix(prompt-input): handle Shift+Enter before IME check - fix(state): delete key from recordsByKey on instance disposal - fix(mcp): close existing client before reassignment to prevent leaks Resolved conflicts: - bun.lock: regenerated with fork dependencies - global-sync.tsx: adopted upstream variable naming (question instead of request) - session/index.tsx: merged upstream workdir display with fork's ANSI terminal emulation - amazon-bedrock.test.ts: added all mock modules (fork + upstream) - vscode/package.json: kept fork branding, updated version Fork commits included: - refactor(tui): use SDK client for tool list dialog - chore: update lockfile with fork dependencies
Add GitLab Duo Provider Support
Problem
In-line with GitLab's open-core strategy, we want to officially integrate GitLab Duo with OpenCode as a supported provider, operable with both GitLab.com and self-hosted GitLab instances. To streamline our users' journey across tools and enable access to GitLab's AI capabilities including agentic chat with native tool calling, GitLab is upstreaming the required provider packages to this repository.
Solution
This PR adds GitLab as a supported provider with three agentic chat model variants (Haiku, Sonnet, Opus), enabling seamless integration with GitLab.com and self-hosted instances.
Changes
Dependencies Added
@gitlab/[email protected]- Provider implementation@gitlab/[email protected]- OAuth/PAT authentication@gitlab/[email protected]- GitLab API toolsProvider Implementation
provider.tsGITLAB_INSTANCE_URLPlugin Auto-Loading
OPENCODE_DISABLE_DEFAULT_PLUGINSflagTests
Files Changed
packages/opencode/package.json- Added 3 GitLab dependenciespackages/opencode/src/provider/provider.ts- GitLab provider implementationpackages/opencode/src/plugin/index.ts- Auto-loading logicpackages/opencode/test/provider/gitlab-duo.test.ts- New tests (8 tests)packages/docs/essentials/gitlab-duo.mdx- DocumentationUsage
Basic setup with environment variable:
Then use in config:
{ "model": "gitlab/duo-chat-sonnet-4-5" }Self-hosted GitLab:
Testing
Closes #7455