gitlab-ai-provider weekly downloads statistics
By GitLab CI/CD (2 listings) · npm · AI SDKs
GitLab Duo provider for Vercel AI SDK
gitlab-ai-provider has 165,171 recorded weekly downloads on npm, a decrease of 34.4% over the past 30 days, ranking #415 of 2,322 tracked listings.
About gitlab-ai-provider
GitLab AI Provider
A comprehensive TypeScript provider for integrating GitLab Duo AI capabilities with the Vercel AI SDK. This package enables seamless access to GitLab's AI-powered features including chat, agentic workflows, and tool calling through a unified interface.
🌟 Features
- 🤖 Multi-Provider Agentic Chat: Native tool calling support via GitLab's AI Gateway (Anthropic & OpenAI)
- 🔄 Duo Workflow Service: Server-side agentic loop with WebSocket streaming and dynamic model discovery
- 🔐 Multiple Authentication: Support for OAuth, Personal Access Tokens, and OpenCode auth
- 🌐 Self-Hosted Support: Works with both GitLab.com and self-hosted instances
- 🔧 Tool Support: Native tool calling via Vercel AI SDK and MCP tools for workflows
- 🔍 Project Detection: Automatic GitLab project detection from git remotes
- 💾 Smart Caching: Project, token, and model discovery caching for optimal performance
- 🎯 Type-Safe: Complete TypeScript definitions with Zod validation
📦 Installation
npm install gitlab-ai-provider
Peer Dependencies
npm install @ai-sdk/provider @ai-sdk/provider-utils
🚀 Quick Start
Basic Chat
import { createGitLab } from 'gitlab-ai-provider';
import { generateText } from 'ai';
const gitlab = createGitLab({
apiKey: process.env.GITLAB_TOKEN,
instanceUrl: 'https://gitlab.com', // optional, defaults to gitlab.com
});
// All equivalent ways to create a chat model:
const model = gitlab('duo-chat'); // callable provider
const model2 = gitlab.chat('duo-chat'); // .chat() alias (recommended)
const model3 = gitlab.languageModel('duo-chat'); // explicit method
const { text } = await generateText({
model: gitlab.chat('duo-chat'),
prompt: 'Explain how to create a merge request in GitLab',
});
console.log(text);
Agentic Chat with Tool Calling
import { createGitLab } from 'gitlab-ai-provider';
import { generateText } from 'ai';
const gitlab = createGitLab({
apiKey: process.env.GITLAB_TOKEN,
});
// Use agentic model for native tool calling support
const model = gitlab.agenticChat('duo-chat', {
anthropicModel: 'claude-sonnet-4-20250514',
maxTokens: 8192,
});
const { text } = await generateText({
model,
prompt: 'List all open merge requests in my project',
tools: {
// Your custom tools here
},
});
Model Variants
The provider automatically maps specific model IDs to their corresponding provider models (Anthropic or OpenAI) and routes requests to the appropriate AI Gateway proxy:
import { createGitLab } from 'gitlab-ai-provider';
import { generateText } from 'ai';
const gitlab = createGitLab({
apiKey: process.env.GITLAB_TOKEN,
});
// Anthropic Models (Claude)
const opusModel = gitlab.agenticChat('duo-chat-opus-4-5');
// Automatically uses: claude-opus-4-5-20251101
const sonnetModel = gitlab.agenticChat('duo-chat-sonnet-4-5');
// Automatically uses: claude-sonnet-4-5-20250929
const haikuModel = gitlab.agenticChat('duo-chat-haiku-4-5');
// Automatically uses: claude-haiku-4-5-20251001
// OpenAI Models (GPT-5)
const gpt5Model = gitlab.agenticChat('duo-chat-gpt-5-4');
// Automatically uses: gpt-5.4-2026-03-05
const gpt5MiniModel = gitlab.agenticChat('duo-chat-gpt-5-4-mini');
// Automatically uses: gpt-5.4-mini
const gpt5NanoModel = gitlab.agenticChat('duo-chat-gpt-5-4-nano');
// Automatically uses: gpt-5.4-nano
const codexModel = gitlab.agenticChat('duo-chat-gpt-5-codex');
// Automatically uses: gpt-5-codex
// You can still override with explicit providerModel option
const customModel = gitlab.agenticChat('duo-chat-opus-4-5', {
providerModel: 'claude-sonnet-4-5-20250929', // Override mapping
});
Available Model Mappings:…
Description from the npm listing.
- ai
- gitlab
- gitlab-duo
- duo
- language-model
- llm
- vercel-ai-sdk
- ai-sdk
- chat
- chatbot
- agentic
- tool-calling
- anthropic
- claude
- code-generation
- code-completion
- developer-tools
- devops
- typescript
- ml
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (122)Similar npm AI SDKs plugins
All 20 gitlab-ai-provider alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/gitlab-ai-provider. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.