Skip to content

Conversation

@igorwwwwwwwwwwwwwwwwwwww
Copy link

@igorwwwwwwwwwwwwwwwwwwww igorwwwwwwwwwwwwwwwwwwww commented Jan 15, 2026

Uses @gitlab/gitlab-ai-provider for native tool calling via GitLab's Anthropic proxy. Supports Claude Opus 4.5, Sonnet 4.5, and Haiku 4.5 models.

  • Add gitlab-duo API type and provider
  • Add duo-chat, duo-chat-opus-4-5, duo-chat-sonnet-4-5, duo-chat-haiku-4-5 models
  • Support GITLAB_TOKEN and GITLAB_DUO_TOKEN env vars
  • Add streaming support for text, reasoning, and tool calls

This is based on the opencode implementation: anomalyco/opencode#7333. I tried to use @gitlab/opencode-gitlab-auth directly, but it takes a dep on @opencode-ai/plugin and I didn't want to drag in all of those transitive deps.

If needed I can talk to the maintainers to get the auth stuff extracted and made independent of opencode, so we can pull it in here. Let me know if that's an approach you'd prefer.

Uses @gitlab/gitlab-ai-provider for native tool calling via GitLab's
Anthropic proxy. Supports Claude Opus 4.5, Sonnet 4.5, and Haiku 4.5
models with automatic OAuth token management.

- Add gitlab-duo API type and provider
- Add duo-chat, duo-chat-opus-4-5, duo-chat-sonnet-4-5, duo-chat-haiku-4-5 models
- Support GITLAB_TOKEN and GITLAB_DUO_TOKEN env vars
- Support self-hosted GitLab via instanceUrl option
- Add streaming support for text, reasoning, and tool calls
Track processed tool call IDs to prevent emitting the same tool call
twice - once from streaming events and again from the final tool-call
event.
- Add loginGitLabDuo and refreshGitLabDuoToken functions
- Add gitlab-duo to OAuth provider list
- Update CLI to handle gitlab-duo login flow
- Support self-hosted GitLab via GITLAB_INSTANCE_URL env var
- Update documentation with OAuth instructions
Use the opencode-gitlab-auth client ID which is registered with
http://127.0.0.1:8080/callback redirect URI. Implements a lightweight
callback server using Node's http module.

The bundled VS Code extension client ID only supports vscode:// scheme
redirects which don't work for CLI applications.
@igorwwwwwwwwwwwwwwwwwwww igorwwwwwwwwwwwwwwwwwwww changed the title Gitlab duo provider GitLab Duo provider Jan 15, 2026
@badlogic
Copy link
Owner

Please have your agent rwad AGENTS.md to understand what tests need to be added for new providers.

@badlogic
Copy link
Owner

Send a new PR with the requested fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants