Skip to content

GitHub Models OpenAI Compatible API not working with documented URL change #138

@gwtaylor

Description

@gwtaylor

Bug description

I had success using a GitHub Models configuration like this:

[OPENAI]
compatible=true
key=github_pat_...
url=https://models.inference.ai.azure.com
path=/chat/completions
model=gpt-4.1-mini

However, the GitHub Models docs show that they have changed their REST API to use a different URL.
The model docs in the Marketplace show that the URL should now be pointed towards https://models.github.ai/inference.
So I believe the configuration should look like this:

[GITHUB]
compatible=true
key=github_pat_...
url=https://models.github.ai/inference
path=/chat/completions
model=openai/gpt-4.1-mini

I get a 404 Error when I use this new URL.
Has anyone had success using the new URL? I have tried various permutations on this and can't seem to find anything that works with the documented URL.
To be clear, the old one still works but I would prefer to use the documented one in case the old one is deprecated.

The new URL works for me using the Python SDK. However, it doesn't work in aicommit2.

aicommit2 version

v2.2.18

Environment

System:
    OS: macOS 15.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 183.59 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 23.7.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 11.3.0 - /opt/homebrew/bin/npm
    pnpm: 10.11.0 - /opt/homebrew/bin/pnpm

Can you contribute a fix?

  • I’m interested in opening a pull request for this issue.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions