Skip to Content.
Sympa Menu

phys-npps-members-l - [[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: [[Phys-npps-members-l] ] How to Use GitHub AI Models in Aider
  • Date: Wed, 18 Jun 2025 17:59:18 +0000

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