Cloud Platforms
GitHub Models
Call models from the GitHub Models catalog through your Verdictan gateway. Your GitHub token stays on the gateway, and your application calls the gateway with its application token.
This page is about GitHub Models as a model provider. To send GitHub Copilot traffic through Verdictan, see VS Code and GitHub Copilot.
Before you start
- A working gateway from the quickstart.
- A GitHub token with GitHub Models access, and one model ID from the GitHub Models catalog.
- The gateway startup command, and a separate application token for test requests.
Configure the provider
Set base_url to https://models.github.ai, without /inference. The gateway adds that segment itself.
pack:
name: github-models-integration
version: 1.0.0
enabled: true
policies:
chain:
- prompt-injection
providers:
targets:
- id: github-models-primary
provider: github
model: "replace-with-github-models-model-id"
base_url: https://models.github.ai
secret_key_ref:
env: VERDICTAN_GITHUB_API_KEYThe gateway sends Chat Completions to /inference/chat/completions with the token from VERDICTAN_GITHUB_API_KEY as a Bearer token. It also adds the Accept: application/vnd.github+json and X-GitHub-Api-Version headers that GitHub requires.
Start and verify
To deploy from your terminal, use CLI 0.1.14 or later. The CLI uses your Verdictan account credential. Keep the GitHub token on the gateway, then check In sync.
With the quickstart in Docker, follow the container steps instead of steps 1 to 3.
-
In the gateway terminal, set the token and lint the file:
export VERDICTAN_GITHUB_API_KEY="<github-token>" verdictan policy lint --file policy-config.yaml -
Restart the test gateway with the GitHub token in its environment.
-
Deploy the file to the test agent in Configurations. If that agent already runs
pack.version1.0.0, increase the version first. Then wait for the gateway log lineconnected read model refresh applied updated configwith your version asconfig_version. Try the change on a test gateway has the steps. -
In a second terminal, send a request for the configured model:
export VERDICTAN_CLIENT_TOKEN="<application-token>" curl --fail-with-body http://127.0.0.1:41002/v1/chat/completions \ -H "Authorization: Bearer ${VERDICTAN_CLIENT_TOKEN}" \ -H "Content-Type: application/json" \ -d '{"model":"replace-with-github-models-model-id","messages":[{"role":"user","content":"Reply with Hello."}]}'
choices[0].message.content contains the reply, and the request appears in History when capture is on, or in the delivered events.
Supported requests
| Request | Support |
|---|---|
| Chat Completions | Yes. Streaming, tools, and response_format work if the model supports them. |
| Messages | Translated to Chat Completions |
| Responses | The adapter builds a Responses path, but it is not tested against GitHub Models. Use Chat Completions. |
| Embeddings, image input | No |
Failure behavior
| Problem | What to check |
|---|---|
401 from the gateway | The application token is active, and the GitHub token is set on the gateway host. |
| Provider authentication error | VERDICTAN_GITHUB_API_KEY is set and has GitHub Models access. |
404 from GitHub | base_url is https://models.github.ai, with no /inference segment. |
| Model not found | The model ID is from the GitHub Models catalog and matches the target. |
Provider 429 or another upstream error | The response body and your GitHub Models rate limits. See Error Handling. |
Limits
- Model names, rate limits, and data terms are in the GitHub Models documentation.
- The gateway sends
X-GitHub-Api-Version: 2026-03-10by default. To send a different version, setVERDICTAN_GITHUB_MODELS_API_VERSIONin the gateway environment. - A listener on a non-loopback address needs TLS and network controls.
Next steps
- Provider Configuration: target fields, routing, and fallback.
- Runtime Request Families: request families and their policy stages.