GitHub AI Inference: Why Your 'Enabled' Model Might Still Be Unavailable
Navigating GitHub AI Inference: When 'Enabled' Doesn't Mean 'Available'
A common frustration for developers integrating AI into their GitHub workflows arises when a model, seemingly enabled within their organization's settings, throws an 'unavailable model' error during inference. This was precisely the challenge faced by hphan508, who encountered a '400 Unavailable model: gpt-5' error when using actions/ai-inference@v2.0.5, despite GPT-5 being enabled in their org and GPT-4o working fine on the same endpoint.
This scenario highlights a crucial distinction that can significantly impact software developer performance metrics if not understood: organizational enablement of an AI model does not automatically guarantee its availability on every specific GitHub AI inference endpoint.
The Core Issue: Endpoint-Specific Model Catalogs
The GitHub AI inference endpoint (e.g., https://models.github.ai/orgs/${{ github.repository_owner }}/inference) operates with its own curated catalog of supported models. While your organization might have access to a broad range of models, including cutting-edge ones like GPT-5, these models are often rolled out in phases and might not be immediately integrated into all GitHub-managed inference endpoints. Essentially, GitHub Models acts as a proxy or a curated service, offering a subset of models that it directly supports and manages.
Therefore, even if GPT-5 is 'enabled' at an organizational level, the specific GitHub Models inference endpoint you're calling might not yet have it wired in or exposed. This is why a model like GPT-4o, which is already integrated, works without issues.
How to Troubleshoot and Ensure Smooth AI Integration
To avoid workflow interruptions and maintain high software developer performance metrics, here's how to diagnose and resolve such model availability issues:
1. Verify Available Models from Your Endpoint
The most reliable way to confirm which models are truly available is to query the inference endpoint's model catalog directly. You'll need a GitHub Personal Access Token (PAT) with appropriate permissions (e.g., models:read scope).
curl -H "Authorization: Bearer YOUR_GITHUB_TOKEN" \
https://models.github.ai/orgs/YOUR_ORG/inference/modelsThis command will return a JSON list of all model IDs that your specific token and organization can actually call via that endpoint. If gpt-5 (or its specific variant) is not in this list, then it's not yet supported by the endpoint.
2. Use a Currently Supported Model
If your desired model isn't listed, the immediate solution is to switch to a model that is confirmed to be available, such as openai/gpt-4o. This ensures your workflows continue to run without interruption.
uses: actions/ai-inference@v2.0.5
with:
model: openai/gpt-4o
endpoint: https://models.github.ai/orgs/${{ github.repository_owner }}/inference3. Consider Direct OpenAI API Access (If Essential)
If using GPT-5 is absolutely critical and cannot wait for GitHub Models integration, you would need to bypass GitHub's inference endpoint entirely. This involves using OpenAI's native API endpoint (e.g., https://api.openai.com/v1/chat/completions) directly, which requires an OpenAI API key and separate configuration, outside the actions/ai-inference action's scope.
4. Stay Informed on Rollouts and Documentation
GitHub continuously updates its services. Keep an eye on the official GitHub documentation, changelogs, and the Models Catalog for announcements regarding new model availability on their inference endpoints. The GitHub Marketplace and the 'Models' section in your GitHub settings are also good places to track updates.
Conclusion
Understanding the nuances of GitHub's AI inference model availability is key to efficient development workflows. By verifying endpoint-specific model support and adapting your configurations, developers can prevent unexpected errors, streamline their CI/CD pipelines, and ultimately enhance their software developer performance metrics when integrating advanced AI capabilities.