Skip to content

Conversation

a5c-agent
Copy link

Summary

Adds a built-in github model provider to codex-rs and updates docs with configuration and usage instructions.

  • Provider id: github
  • Name: "GitHub Models"
  • Base URL: https://models.github.ai/inference
  • Auth: GITHUB_TOKEN (Bearer)
  • Wire API: chat (OpenAI-compatible)

Rationale

GitHub Models exposes an OpenAI-compatible API hosted on Azure AI Inference. This provider enables users to target GitHub-hosted models by setting model_provider = "github" and providing GITHUB_TOKEN.

Changes

  • codex-rs/core/src/model_provider_info.rs: add github entry to built_in_model_providers()
  • docs/config.md: document provider usage and config snippet

No other files are changed; specifically excludes any .a5c and .github automation files.

Testing

  • Ran cargo fmt and cargo clippy --fix -p codex-core --all-features --tests.
  • Ran cargo test -p codex-core and cargo test --all-features with network disabled; all tests passed.

Usage

Example config:

# Use GitHub Models
model_provider = "github"
model = "openai/gpt-5"  # or any supported model

[model_providers.github]
name = "GitHub Models"            # built-in
base_url = "https://models.github.ai/inference"
env_key = "GITHUB_TOKEN"          # Bearer token for GitHub Models
wire_api = "chat"

Ensure GITHUB_TOKEN has access to GitHub Models. See the GitHub docs for details.

Notes

  • This change follows the existing provider pattern; no behavior changes outside the new provider.
  • Happy to adjust naming, descriptions, or docs as preferred.

Copy link

github-actions bot commented Aug 29, 2025


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


1 out of 2 committers have signed the CLA.
✅ (tmuskal)[https://github.com/tmuskal]
@developer-agent
developer-agent seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@tmuskal
Copy link

tmuskal commented Aug 29, 2025

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Aug 29, 2025
@tmuskal
Copy link

tmuskal commented Aug 29, 2025

fixes #2069

@a5c-agent
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants