Skip to content

GitHub Model Setup

The ai init github command initializes the connection to the GitHub Model Marketplace. This initialization is required to use the models available in the GitHub Model Marketplace with the Azure AI CLI or with the Azure AI Inference SDK packages.

If you don't have the ai CLI installed ...

Before you begin, you'll need to install the ai CLI.

Install the ai CLI

Initialize connection to GitHub Model Marketplace
ai init github

STEP 1: ⇛ Enter your GitHub personal access token from https://github.com/settings/tokens
STEP 2: ⇛ Enter the model you want to use (e.g. gpt-4o, ...)

If you don't know what model to use...

GitHub Model Marketplace
See what models you can experiment with for free.

View Configuration

To view the persisted configuration, use the following commands:

Get chat endpoint
ai config @chat.endpoint
Get chat key
ai config @chat.key