# Bring your own model to GitLab Duo Self-Hosted with Microsoft Foundry

DevFeed: [Bring your own model to GitLab Duo Self-Hosted with Microsoft Foundry](<https://devfeed.tech/articles/bring-your-own-model-to-gitlab-duo-self-hosted-with-microsoft-foundry-91.md>)

Original publisher: [Read original article](<https://about.gitlab.com/blog/gitlab-duo-self-hosted-models-on-microsoft-foundry/>)

Author: Evgeny Rudinsky

Published: 2026-09-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [GitLab](<https://devfeed.tech/sources/gitlab.md>)

Topics: [AI Chat](<https://devfeed.tech/topics/ai-chat.md>)

Tags: [agentic-ai](<https://devfeed.tech/tags/agentic-ai.md>), [ai](<https://devfeed.tech/tags/ai.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [models](<https://devfeed.tech/tags/models.md>), [openai](<https://devfeed.tech/tags/openai.md>), [platform](<https://devfeed.tech/tags/platform.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

A tutorial on connecting GitLab Duo Self-Hosted to GPT, Claude, Llama, and Mistral deployments in Microsoft Foundry. It explains model-per-feature selection and emphasizes control over hosting, region, network path, and credentials.

## Source excerpt

For many organizations, the question about AI coding tools isn't whether they help, but where the code goes. Teams under data sovereignty, residency, or regulatory constraints need to know which network handles their source code before they can adopt anything. GitLab Duo Self-Hosted answers that by letting administrators connect GitLab Duo features to models running on infrastructure they choose, with control over hosting, region, network path, and credentials. In this tutorial, we'll connect GitLab Duo Self-Hosted to models hosted in Microsoft Foundry. Foundry is worth treating as a general-purpose serving platform rather than an OpenAI endpoint: Its catalog spans OpenAI GPT, Anthropic Claude, Meta Llama, and Mistral, and the families GitLab supports overlap heavily with what Foundry offers. That matters because GitLab lets you assign a model per feature. You can run one family for agentic work, a code-specialized model for Code Suggestions, and a smaller model where request volume dominates, all deployed and billed through one Azure subscription. The setup steps are the same regardless of family. Only the model you deploy, the deployment name you reference, and the Model family you select in GitLab change. Microsoft's catalog moves quickly and will contain releases newer than GitLab's supported-model matrix. Catalog availability alone does not establish GitLab Duo support, so always check both vendors' documentation before choosing a model. Why GitLab Duo Self-Hosted? GitLab Duo Self-Hosted lets you connect GitLab Duo to models deployed on-premises or through a supported cloud provider. Microsoft Foundry is useful when your organization already operates in Azure and wants to manage model deployments, access, networking, and consumption there. Key benefits include: Deployment choice: Select the Azure region and deployment type that meet your availability and data-residency requirements. Multiple model families, one platform: Deploy GPT, Claude, Llama, or Mistral mo