Skip to content

feat(dependabot): run major-bump AI gate on GitHub Models (no external key)#6

Merged
bbkrr merged 1 commit into
mainfrom
feature/2229-switch-to-github-models
Jul 10, 2026
Merged

feat(dependabot): run major-bump AI gate on GitHub Models (no external key)#6
bbkrr merged 1 commit into
mainfrom
feature/2229-switch-to-github-models

Conversation

@bbkrr

@bbkrr bbkrr commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #5, per @Holger-Bartel's call on RealRate-Private#2229: reserve the OpenAI account for the chatbot/pipeline and use GitHub Models for GitHub automations.

What changes

Switches the major-bump AI risk verdict from a direct OpenAI API call to GitHub Models:

  • Inference now targets https://models.github.ai/inference using the built-in GITHUB_TOKEN + permissions: models: readno OPENAI_API_KEY secret (removes the org-secret prerequisite / the wait on an admin).
  • Model: openai/gpt-5 — GitHub Models' catalog has no Anthropic/Claude (verified live), so Opus 4.8 isn't available there; gpt-5 is the strongest catalog model. Overridable via MODEL_ID.
  • The OpenAI SDK stays only as the OpenAI-compatible client library pointed at the GitHub Models endpoint (not OpenAI).

Robustness (unchanged intent)

  • Read-only verdict step; separate deterministic approve/merge; required CI still gates the real merge.
  • Fail-closed: no token / API error / unparseable response ⇒ verdict=human. continue-on-error keeps a failed verdict from blocking the required check.
  • Added a structured-output → plain-response + JSON-extract fallback so the gate is model-agnostic (some catalog entries reject response_format).
  • Still ships in dry-run (AIGATE_DRY_RUN: "true").

Note

  • permissions: models: read is the documented GitHub Models scope (see actions/ai-inference README). actionlint 1.7.7 flags it as unknown — a stale-linter false positive; the scope is valid.

Validated: actionlint clean (ignoring the known-stale models-scope rule), Python syntax, and the offline fail-closed path (no token → human).

Supersedes the OpenAI-key requirement from #5. Ref RealRate-Private#2229.

🤖 Generated with Claude Code

…ernal key)

Switches the AI risk verdict from a direct OpenAI API call to GitHub Models,
per the decision to reserve the OpenAI account for the chatbot/pipeline and use
GitHub Models for GitHub automations (RealRate-Private#2229).

- Inference now hits https://models.github.ai/inference with the built-in
  GITHUB_TOKEN + `models: read` permission -- NO OPENAI_API_KEY secret needed
  (removes the org-secret prerequisite entirely).
- Model: openai/gpt-5 (GitHub Models has no Anthropic/Claude; gpt-5 is the
  strongest catalog model). Override via MODEL_ID.
- Script keeps structured JSON output and adds a plain-response + JSON-extract
  fallback so it is model-agnostic, plus the same fail-closed behavior
  (any error => verdict=human).

The OpenAI SDK is retained only as the OpenAI-compatible client library pointed
at the GitHub Models endpoint. Still ships in dry-run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bbkrr bbkrr merged commit 7cb72c7 into main Jul 10, 2026
1 check passed
@bbkrr bbkrr deleted the feature/2229-switch-to-github-models branch July 10, 2026 08:53
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