Public/Get-GitHubModel.ps1

<#
.SYNOPSIS
Gets GitHub AI model IDs with optional wildcard search.
 
.DESCRIPTION
Fetches model IDs from GitHub's AI catalog. You can filter results using a wildcard pattern for the model name.
 
.PARAMETER Name
Wildcard pattern to filter model IDs. Default is '*', which returns all models.
 
.EXAMPLE
Get-GitHubModel -Name '*gpt*'
Returns all models with 'gpt' in their ID.
 
.EXAMPLE
Get-GitHubModel
Returns all models.
#>

function Get-GitHubModel {
    param(
        [string]$Name = '*'
    )

    $models = Invoke-RestMethod https://models.github.ai/catalog/models
    
    $models.id | Where-Object { $_ -like $Name } | Sort-Object
}