fix(ci): generate the PR description instead of depending on a retired API - #570
Merged
Merged
Conversation
The Analyze changes with AI step calls the GitHub Models API and falls back to a commit list when the call yields nothing. That fallback was unreachable: the step runs under bash -e, so the failing curl aborted it before the check could run. Since 2 September the PR body has not been updated at all, and #540 still describes three dependency commits while carrying 64. The endpoint had gone away underneath it. models.inference.ai.azure.com is a CNAME to modelmesh-nexus-global-main.trafficmanager.net, which no longer resolves, so curl exits 6 - the exit code the failing job reported. Keep the curl exit code instead of letting it kill the step, and log it together with the response body, so the next outage is diagnosable rather than silent. Point at models.github.ai, which is where the API moved, and namespace the model id as the current API expects. Note that models.github.ai currently answers 410 github_models_retirement_brownout for every path, so the fallback description is what this workflow will produce until a provider decision is made. That is still the commit and file list, which beats a stale body and a red run.
…d API GitHub Models was retired on 2026-07-30, endpoint included. The step called models.inference.ai.azure.com, whose CNAME target no longer resolves, so curl exited 6. The step runs under bash -e, so that aborted it before the fallback could run, and the auto-PR workflow has been failing since. Make the description deterministic. The commits are grouped the way semantic-release categorises them, with the file list in a collapsed block, so the result stands on its own without any external service. Verified against the current develop: 51 commits in, 51 listed. The LLM call is now opt-in. With no LLM_API_KEY secret the step logs a notice and uses the generated summary; with one it posts to LLM_API_URL, any OpenAI-compatible chat/completions endpoint. On failure the exit code, curl's stderr and the start of the response are logged, since the previous warning could not distinguish a vanished endpoint from an empty answer. The description file now holds the body only, so the consumer no longer strips its first line, and the footer says a replaced description is left alone, which is what the is_auto check already did.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Auto PR (develop -> main)" workflow has been failing since 2 September (33621992436), which is why #540 described three dependency commits while carrying more than sixty.
What broke
GitHub Models was retired on 30 July 2026 -- playground, catalog, inference API and BYOK, including for existing customers. The endpoint went with it:
curl exits 6 on that, which is exactly the exit code the failing job reported. The successor host
models.github.aianswers HTTP 410github_models_retirement_brownoutfor every path, so there is no free endpoint to migrate to.Why the fallback did not save it
The step already had a fallback for "the model returned nothing", but it could never run: GitHub Actions executes
run:underbash -e, so the failing curl aborted the step several lines before the check. Reproduced against the dead host:Changes
The description is now generated, not requested. Commits are grouped the way semantic-release categorises them, with the file list in a collapsed block. No external service, no key, no outage surface. Verified against the current develop: 51 commits in, 51 listed, across Features, Fixes, Refactoring, Tests, Documentation and Chores.
The LLM call is opt-in. With no
LLM_API_KEYsecret the step logs a notice and uses the generated summary. With one it posts toLLM_API_URL-- any OpenAI-compatiblechat/completionsendpoint, so Gemini, Groq, Cerebras or a paid provider all work by setting two repository variables and one secret. No code change needed to bring summaries back.Failures are diagnosable. The exit code, curl's stderr and the first 500 bytes of the response are logged. The previous warning said only "AI analysis failed", which is why a vanished endpoint looked identical to a model returning nothing.
Also: the description file now holds the body only, so the consumer no longer strips its first line (which would have eaten the first heading), and
--max-time 120keeps a hung request from stalling the job.Manual descriptions still win
Unchanged behaviour, worth stating: the workflow only touches a PR whose body carries the
Auto-generated by GitHub Actionsmarker. Replacing the text -- by hand or with the Copilot button in the UI -- opts that PR out permanently. The footer now says so.This is already the case for #540, whose body I replaced with a reviewed release description including upgrade notes. The workflow will leave it alone.