Gitlab code suggestions

GitLab's AI-Assisted Code Suggestions is an innovative tool which aims to improve coding productivity by offering predictive completions for code blocks, defini...

Last verified:

Visit Gitlab code suggestions

What is Gitlab code suggestions?

GitLab Duo Code Suggestions is an AI-assisted coding feature that helps developers stay in flow by predicting and completing code blocks, defining function logic, generating tests, and proposing common patterns such as regex. It works inside the same coding environment you already use, so the suggestions appear while you are actively writing code.

The product is designed to meet developers where they work, with support for GitLab Web IDE, VS Code, Visual Studio, JetBrains-based IDEs, and NeoVIM. GitLab also says it supports more than 14 languages, including C++, C#, Go, Java, JavaScript, Kotlin, PHP, Python, Ruby, Rust, Scala, Swift, and TypeScript.

A major emphasis is privacy. GitLab states that private, non-public customer code stored in GitLab is not used as training data, which makes the tool more suitable for teams that want AI assistance without sharing proprietary code for model training.

Code Suggestions is also available for self-managed GitLab instances through a secure connection to GitLab.com, which broadens it beyond only GitLab.com users. GitLab positions it as an AI pair programmer that is continuously improving through better prompt engineering, smarter model routing, and expanded context windows.

Gitlab code suggestions pricing

Pricing model: Freemium

GitLab’s website page does not show a standalone price for Code Suggestions. It presents the feature as part of GitLab Duo and notes that it is available for self-managed GitLab instances via a secure connection to GitLab.com. Public documentation linked from GitLab indicates Code Suggestions requires a Premium or Ultimate GitLab subscription with GitLab Duo Pro, but the product page itself does not list tier-by-tier pricing or a free tier. The page focuses on product capability rather than explicit plan pricing or included allowances.

Gitlab code suggestions pros

  • Predictively completes code blocks
  • Defines function logic
  • Generates tests
  • Suggests regex patterns
  • Works in the same coding environment
  • Available in GitLab Web IDE
  • Available in VS Code
  • Available in Visual Studio
  • Available in JetBrains IDEs
  • Available in NeoVIM
  • Supports 14+ programming languages
  • Tailored to the current workflow
  • Privacy-first design
  • Private GitLab code is not used for training data
  • Available for self-managed instances
  • Uses a secure connection to GitLab.com
  • Supports code completion while typing
  • Supports code generation from natural-language comments

Gitlab code suggestions cons

  • Requires a supported IDE extension
  • Depends on GitLab ecosystem integration
  • Not available as a standalone general-purpose editor plugin only
  • Self-managed use requires a secure connection to GitLab.com
  • Requires GitLab 16.8 or later on supported deployments
  • Suggestion quality can vary by context
  • Best results require specific prompts and good code context
  • Feature availability depends on subscription and Duo Pro access
  • May need manual acceptance or rejection of suggestions
  • Only covers supported languages and environments

Frequently asked questions about Gitlab code suggestions

What does GitLab Duo Code Suggestions do?

It predicts and completes code blocks, helps define function logic, generates tests, and proposes common code such as regex patterns while you are coding. GitLab describes it as an AI coding assistant that works in the same environment you already use.

Which IDEs support Code Suggestions?

GitLab says the feature works in GitLab Web IDE, VS Code, Visual Studio, JetBrains-based IDEs, and NeoVIM. It is designed to surface suggestions inside the editor rather than in a separate interface.

Which languages are supported?

GitLab says Code Suggestions is available in more than 14 languages, including C++, C#, Go, Google SQL, Java, JavaScript, Kotlin, PHP, Python, Ruby, Rust, Scala, Swift, and TypeScript.

How does Code Suggestions handle privacy?

GitLab says privacy is a critical foundation of the feature. It states that private, non-public customer code stored in GitLab is not used as training data.

Can self-managed GitLab customers use Code Suggestions?

Yes. GitLab says Code Suggestions is available to self-managed GitLab instances through a secure connection to GitLab.com.

What kinds of suggestions can it generate?

The page highlights code block completion, function logic generation, test generation, and common code patterns like regex. GitLab also shows it can create an Express server in an interactive demo.

How do developers accept or dismiss suggestions?

GitLab’s documentation describes accepting a suggestion with Tab, rejecting it with Esc, or simply continuing to type to ignore it. The main product page emphasizes that suggestions appear as you work in the editor.

Does GitLab list a free tier for Code Suggestions?

The product page does not show a free tier or standalone price for Code Suggestions. It points users to GitLab Duo and self-managed availability, but pricing details are not specified on the page itself.

What makes GitLab say the feature is built for staying in flow?

GitLab frames the tool as an in-editor assistant that predicts and completes code while you keep coding in the same environment. That reduces context switching because suggestions arrive directly inside the IDE instead of requiring a separate tool.

What is GitLab improving next for Code Suggestions?

GitLab says it is working on improved suggestion quality through better prompt engineering, intelligent model routing, and expanded contexts for inference windows. The page presents these as ongoing improvements to its AI pair-programmer experience.

Categories

Use cases

Browse all AI tools on NeedAnAI