anc95 / anc95/ChatGPT-CodeReview

Support GitHub Models inference provider

Open
#189 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
4.5k
Forks
461
PR merge metrics
No merged PRs in 30d

Description

GitHub Models provides free AI inference in GitHub Models (supports all OpenAI models, DeepSeek, plus others). It would be nice to support that in the GitHub Actions version of this project, so users don't need to generate an OpenAI key.

Here's an example (uses built-in GITHUB_TOKEN):

name: Code Review

permissions:
  contents: read
  pull-requests: write
  models: read # Required to call GitHub Models

on:
  pull_request:
    types: [opened, reopened, synchronize]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: anc95/ChatGPT-CodeReview@main
        env:
          # Required for the action itself to access the PR
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          # Use GitHub Models for inference
          OPENAI_API_KEY: ${{ secrets.GITHUB_TOKEN }}
          OPENAI_API_ENDPOINT: https://models.github.ai/inference
          MODEL: gpt-4o-mini
          # Optional tuning
          LANGUAGE: English
          PROMPT: # example: Please check if there are any confusions or irregularities in the following code diff:
          top_p: 1
          temperature: 1
          max_tokens: 10000
          MAX_PATCH_LENGTH: 10000
          IGNORE_PATTERNS: /node_modules/**/*,*.md
          INCLUDE_PATTERNS: *.js,*.ts

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the GitHub Actions version's existing OpenAI configuration and how it builds inference requests; no source file or test is named in the issue. Use the supplied workflow example as the acceptance case, including GITHUB_TOKEN authentication, the GitHub Models endpoint, model selection, and tuning options. Done means users can configure GitHub Models without an OpenAI key.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ai, ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.