Published on: May 18, 2026
4 min read
Copilot's BYOK offers flexibility, but true enterprise governance requires more. GitLab Duo CLI provides auditable, controlled CI/CD automation for AI agents.

GitHub recently announced that Copilot CLI now supports bring-your-own-key (BYOK) and locally running models. Developers can route CLI requests through their own model provider or run a local model entirely offline.
But model selection is a starting point, not a destination. The harder problem is what happens when AI starts taking actions across your software delivery pipeline. Triggering builds. Interacting with your CI/CD configuration. That's where the architectural choices underneath a CLI tool start to matter.
GitHub's announcement extends what Copilot can do at the developer's individual workstation. There is no organization-level control that enforces which model a team uses or produces an auditable record of what the agent did and why. For teams running AI in automated workflows, it's a meaningful gap.
GitLab Duo CLI starts from a different premise. Built on GitLab Duo Agent Platform, it's designed for both the developer sitting at a terminal and teams with their agents automating security, verification, compliance and deployment workflows across many projects, each with many release cycles. To further improve end-to-end automation, GitLab Duo CLI supports headless mode: non-interactive, scriptable, and built to run inside CI/CD pipelines. With Duo CLI, governance controls apply through to the pipeline execution.
The first generation of AI coding tools was optimized for the interactive session: a developer asking questions, reviewing suggestions, accepting or rejecting completions. The security model for that use case is relatively straightforward because a human is in the loop at every step.
Agentic AI in automated workflows is a different challenge. When an agent can run tests, modify configurations, and take multi-step actions across your software delivery lifecycle without a human reviewing each step, the security requirements change significantly. The questions that matter are no longer just "which model is this?" They become: what can this agent access? What is it authorized to do? What actions did it take and can I prove it?
GitLab Duo CLI addresses these uniformly at the platform level. In interactive mode, no action is taken without human-in-the-loop approval. Prompt injection detection, which prevents malicious inputs from hijacking agent behavior mid-workflow, is built into the GitLab Duo Agent Platform. Composite identity scopes what the agent can access to only what it has been explicitly authorized to use, making every AI-driven action auditable. Custom instruction files like AGENTS.md and SKILL.md let teams define precisely which tasks and actions their agents are permitted to take.
The workflows where CLI-based AI can create real leverage include debugging broken pipelines at the end of a sprint, and running multi-step development tasks.
These are also the workflows where per-developer configuration and platform-level governance diverge most sharply. When an agent is running inside a pipeline, there's no developer available to approve a prompt injection attempt or notice that the model behaved unexpectedly. Instead, the security controls have to be in the platform, and they have to be consistent across every workflow and every environment.
Before committing to any AI tooling at the platform level, it's worth asking: Does the implementation require enterprise-level control? And, should the security model hold when no human is watching?
Model flexibility and offline support for CLI tools are critical for teams to gain more control over which AI models. The governance architecture underneath such model selection is what determines whether a capability can be deployed in production.
GitLab Duo CLI powered by Duo Agent Platform supports a mix of self-hosted and GitLab-hosted models, meaning teams can keep their most sensitive workloads on infrastructure they control while using GitLab-hosted models for everything else. That flexibility matters for organizations that want greater data sovereignty, without having to wait for the full infrastructure.
You can experience the benefits of GitLab Duo CLI by starting a free trial of GitLab Duo Agent Platform.
If you are already using GitLab in the free tier, you can sign up for GitLab Duo Agent Platform by following a few simple steps.
And if you are an existing subscriber to GitLab Premium or Ultimate, you can take advantage of GitLab Duo CLI by simply turning on Duo Agent Platform and using the GitLab Credits that are included with your subscription.
Enjoyed reading this blog post or have questions or feedback? Share your thoughts by creating a new topic in the GitLab community forum.
Share your feedback