---
title: Use open-source models
description: Reduce agent costs by using supported open-source models with Codex CLI, Claude Code, GitHub Copilot, and ChatGPT desktop through Unity Gateway.
canonical_url: https://docs.databricks.com/gcp/en/ai-gateway/coding-agent-open-source-models
---

# Use open-source models

Use Codex CLI, Claude Code, GitHub Copilot, and ChatGPT desktop with supported open-source models through Unity Gateway. Choosing an open-source model can [reduce your coding agent costs](https://docs.databricks.com/gcp/en/ai-gateway/coding-agent-costs.md#open-models).

For Codex CLI, Claude Code, and GitHub Copilot, [install the Unity Gateway CLI (`ug`)](https://docs.databricks.com/gcp/en/ai-gateway/coding-agent-quickstart.md). Then select a model with `/model`.

Ask your admin to [add a compatible open-source model](https://docs.databricks.com/gcp/en/ai-gateway/coding-agent-configure-govern.md#publish-a-configuration) if none is listed in your agent.

## <a id="use-codex-cli" />Use Codex CLI

1. Launch Codex CLI:

   ```bash
   ug codex
   ```

2. Enter `/model` and select an available open-source model, such as **GLM 5.3** (`system.ai.glm-5-3`).

3. Confirm the reasoning level when prompted.

Your next prompt in the main session uses the selected model.

![Codex model picker after entering /model, with GLM 5.3 highlighted](https://docs.databricks.com/gcp/en/images/ai-gateway/codex-open-source-model-picker.png)

For connection details, see [Connect Codex](https://docs.databricks.com/gcp/en/ai-gateway/coding-agent-codex.md).

## <a id="use-claude-code" />Use Claude Code

1. Launch Claude Code:

   ```bash
   ug claude
   ```

2. Enter `/model` and select an available open-source model, such as **GLM 5.3** (`system.ai.glm-5-3`).

Your next prompt in the main session uses the selected model. To switch models during the session, enter `/model` again.

![Claude Code model picker listing GLM 5.3 and Kimi K3 alongside Claude models](https://docs.databricks.com/gcp/en/images/ai-gateway/claude-code-open-source-model-picker.png)

For connection details, see [Connect Claude Code](https://docs.databricks.com/gcp/en/ai-gateway/coding-agent-claude.md).

## <a id="use-github-copilot" />Use GitHub Copilot

1. Launch GitHub Copilot CLI:

   ```bash
   ug copilot
   ```

2. Enter `/model` and select an available open-source model, such as **GLM 5.3** (`system.ai.glm-5-3`).

`ug` makes GLM, Kimi, and DeepSeek open-source models available in Copilot. In GitHub Copilot in Visual Studio Code, select the model from the **Databricks** group in the Copilot Chat model picker.

For connection details, see [Connect GitHub Copilot](https://docs.databricks.com/gcp/en/ai-gateway/coding-agent-copilot.md).

## <a id="use-chatgpt-desktop" />Use ChatGPT desktop

Follow the [ChatGPT desktop setup guide](https://docs.databricks.com/gcp/en/ai-gateway/coding-agent-chatgpt-desktop.md), then start a Codex conversation and choose an available open-source model from the app's model picker.

![ChatGPT desktop model picker listing system.ai.glm-5-3 and system.ai.kimi-k3](https://docs.databricks.com/gcp/en/images/ai-gateway/chatgpt-desktop-open-source-model-picker.png)

Available models and features vary by workspace, permissions, and agent. See [Detailed list of models supported by Databricks Foundation Model APIs](https://docs.databricks.com/gcp/en/machine-learning/foundation-model-apis/supported-models.md) and [Select models or use Smart Routing](https://docs.databricks.com/gcp/en/ai-gateway/coding-agent-model-selection.md).
