Skip to Content.
Sympa Menu

phys-npps-members-l - Re: [[Phys-npps-members-l] ] How to Use GitHub AI Models in Aider

phys-npps-members-l AT lists.bnl.gov

Subject: ALL NPPS Members

List archive

Chronological Thread  
  • From: "Ye, Shuwei" <yesw AT bnl.gov>
  • To: NPPS members <Phys-npps-members-l AT lists.bnl.gov>, Torre Wenaus <wenaus AT gmail.com>
  • Subject: Re: [[Phys-npps-members-l] ] How to Use GitHub AI Models in Aider
  • Date: Wed, 16 Jul 2025 17:31:55 +0000

Dear all,

There are two types of AI models provided by GitHub:

The command gh models list prints the list of market AI models. The available market models are identical between free Copilot subscription and Copilot Pro subscription.

To list the Copilot AI models, you can run:
$ curl -L  -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${OAUTH_TOKEN}" \
  https://api.githubcopilot.com/models | jq -r '.data[].id'

gpt-3.5-turbo
gpt-3.5-turbo-0613
gpt-4o-mini
gpt-4o-mini-2024-07-18
gpt-4
gpt-4-0613
gpt-4.1
gpt-4o
gpt-4o-2024-11-20
gpt-4o-2024-05-13
gpt-4-o-preview
gpt-4o-2024-08-06
o3-mini
o3-mini-2025-01-31
o3-mini-paygo
text-embedding-ada-002
text-embedding-3-small
text-embedding-3-small-inference
claude-3.5-sonnet
claude-3.7-sonnet
claude-3.7-sonnet-thought
claude-sonnet-4
gemini-2.0-flash-001
gpt-4.1-2025-04-14

The following 3 models is only available in Copilot Pro:
  • claude-3.7-sonnet
  • claude-3.7-sonnet-thought
  • claude-sonnet-4

Aider can also make use of the Copilot AI models. But the Claude models in the list do not work properly in the same way in Aider as the other models. I am working to find out a solution.

Cheers,

--Shuwei




From: Ye, Shuwei <yesw AT bnl.gov>
Sent: Wednesday, June 18, 2025 1:59 PM
To: NPPS members <Phys-npps-members-l AT lists.bnl.gov>; Torre Wenaus <wenaus AT gmail.com>
Subject: How to Use GitHub AI Models in Aider
 
Hi all,

As promised, here’s a brief explanation of how to use the GitHub AI Models in Aider:

Step-1: Installation of GitHub CLI.

You can find the installation instruction at https://github.com/cli/cli#installation

As a non-root user in Linux, you can install it as follows:

wget https://github.com/cli/cli/releases/download/v2.74.2/gh_2.74.2_linux_amd64.tar.gz
gtar xfz gh_2.74.2_linux_amd64.tar.gz
cp -p gh_2.74.2_linux_amd64/bin/gh ~/.local/bin/

Step-2: Authentication of GitHub and Installation of the extension gh-models

Just run the following to authenticate your GitHub account and install the extension gh-models:

gh auth login
gh ext install github/gh-models
gh models list

Step-3: GitHub Authentication Token and Aider Configuration

In order to access the GitHub AI models, the oauth_token is needed, which can be found in the file ~/.config/gh/hosts.yml. The token can also be displayed via the command:
gh config get -h github.com oauth_token

Then add the following to the Aider configuration file ~/.aider.conf.yml
openai-api-base: https://models.github.ai/inference
openai-api-key:  your GitHub oauth_token here


Step-4: Use the GitHub AI Models in Aider

To use the model gpt-4.1, you can run
aider --model openai/openai/gpt-4.1

To use the model deepseek-r1-0528, run:
aider --model openai/deepseek/deepseek-r1-0528

Cheers,

--Shuwei


From: Ye, Shuwei <yesw AT bnl.gov>
Sent: Thursday, June 12, 2025 2:07 PM
To: NPPS members <Phys-npps-members-l AT lists.bnl.gov>; Torre Wenaus <wenaus AT gmail.com>
Subject: Re: [[Phys-npps-members-l] ] GitHub Models
 
Hi all,

I just figured out how to use the 59 GitHub AI models in Aider. I'll share the instructions with you all soon.

Cheers,

--Shuwei


From: phys-npps-members-l-request AT lists.bnl.gov <phys-npps-members-l-request AT lists.bnl.gov> on behalf of Torre Wenaus <wenaus AT gmail.com>
Sent: Tuesday, June 10, 2025 12:06 PM
To: NPPS members <Phys-npps-members-l AT lists.bnl.gov>
Subject: [[Phys-npps-members-l] ] GitHub Models
 
Hi all,
I just discovered GitHub Models, looks like you can prototype AI apps with various LLMs 'for free' in some cases. Anyone looked at it?
https://docs.github.com/en/github-models/about-github-models
I see I can enable it for the BNLNPPS organization, selectively for models I specify. There are free ones in the list like many varieties of llama and deepseek. 
  Torre


--
-- Torre Wenaus, BNL NPPS Group Leader, ATLAS and ePIC experiments
-- BNL 510A 1-222 | 631-681-7892



Archive powered by MHonArc 2.6.24.

Top of Page