Skip to content

fix(ci): generate the PR description instead of depending on a retired API - #570

Merged
slauger merged 2 commits into
developfrom
fix/auto-pr-models-endpoint
Sep 2, 2026
Merged

slauger merged 2 commits into
developfrom
fix/auto-pr-models-endpoint

Conversation

@slauger

@slauger slauger commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner

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:

models.inference.ai.azure.com is an alias for modelmesh-nexus-global-main.trafficmanager.net.
Host modelmesh-nexus-global-main.trafficmanager.net not found: 3(NXDOMAIN)

curl exits 6 on that, which is exactly the exit code the failing job reported. The successor host models.github.ai answers HTTP 410 github_models_retirement_brownout for 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: under bash -e, so the failing curl aborted the step several lines before the check. Reproduced against the dead host:

before after
output none fallback + diagnostics
step exit 6 0

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_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, 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 120 keeps 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 Actions marker. 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.

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.
@slauger slauger changed the title fix(ci): let the auto-PR fallback actually run fix(ci): generate the PR description instead of depending on a retired API Sep 2, 2026
@slauger
slauger merged commit 27d721e into develop Sep 2, 2026
45 checks passed
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.

1 participant