fix: add models:read permission for GitHub Models API#463
Conversation
The LLM provider chain uses GitHub Models as primary provider. The GITHUB_TOKEN needs models:read permission to access the API. Without this permission, the API returns 401: 'The models permission is required to access this endpoint' Fixes GitHub Models authentication in analyze_codex_session step.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Comprehensive documentation covering: - Provider chain architecture (GitHub Models → OpenAI → Regex) - Workflow integration and outputs - Configuration and permissions - CLI usage and output format - Troubleshooting guide - Development history
Automated Status SummaryHead SHA: 3cff333
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScope
Tasks
Acceptance criteria
|
🤖 Keepalive Loop StatusPR #463 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
There was a problem hiding this comment.
Pull request overview
This PR adds the models: read permission to the reusable Codex workflow to enable access to GitHub Models API. The LLM provider chain (introduced in PR #459) uses GitHub Models as the primary AI provider for task completion analysis, which requires this permission to avoid 401 errors when calling the API endpoint.
Key changes:
- Added
models: readpermission to the workflow's permissions block
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| contents: write | ||
| pull-requests: write | ||
| actions: write | ||
| models: read |
There was a problem hiding this comment.
The permission is added without an inline comment explaining its purpose. According to the PR description, the solution includes a comment "# For GitHub Models AI inference". Adding this comment would improve maintainability by clarifying why this permission is needed, especially since the other permissions don't have comments.
| models: read | |
| models: read # For GitHub Models AI inference |
actionlint 1.7.3 doesn't recognize the 'models' permission scope which is a newer GitHub feature for GitHub Models API access. Add ignore pattern to suppress this false positive.
Automated Status Summary
Scope
GITHUB_STEP_SUMMARYoutput so iteration results are visible in the Actions UITasks
agent:codexlabelagents-keepalive-loop.ymlafter agent runbuildStatusBlock()inagents_pr_meta_update_body.jsto acceptagentTypeparameteragentTypeis set (CLI agent): hide workflow table, hide head SHA/required checksagent:*label):<!-- gate-summary: -->comment posting (use step summary instead)<!-- keepalive-round: N -->instruction comments (task appendix replaces this)<!-- keepalive-loop-summary -->to be the single source of truthagent:*label):<!-- gate-summary: -->commentagent_typeoutput to detect job so downstream workflows know the modeagents-pr-meta.ymlto conditionally skip gate summary for CLI agent PRsAcceptance criteria
Head SHA: 0012c71
Latest Runs: ✅ success — Gate
Required: gate: ✅ success