> Crysk 0.9.0 docs. Index of every page: https://crysk.dev/llms.txt

# Use OpenAI models

Run Crysk reviews in GitHub Actions with OpenAI models and an API key, through OpenCode.

At the end, the open-source GitHub Action reviews pull requests with OpenAI models, billed per token to your OpenAI account. This is Crysk's own review, run through OpenCode. It is not OpenAI's Codex code review.

> **Using a ChatGPT plan**
> A ChatGPT plan needs the Crysk GitHub App. OpenAI replaces its login token every time it is renewed, and the open-source Action has nowhere to keep the new one, so a login stored as a repository secret stops working when it expires. A Claude plan does not have this limit: `claude setup-token` gives a [long-lived token](https://crysk.dev/docs/github-actions/claude-plan.md).

## Before you start

- **The Crysk workflow** in `.github/workflows/crysk.yml`, created by `npx -y crysk setup --ci`.
- **An OpenAI API key** from [platform.openai.com](https://platform.openai.com/api-keys).
- **The GitHub CLI, logged in**, with admin or write access to the repository.

## 1. Store the key as a secret

Paste the key when `gh` asks for it:

```bash
gh secret set CRYSK_OPENCODE_OPENAI_API_KEY
```

## 2. Pass the key to the workflow and choose the profile

```bash
gh variable set CRYSK_OPENCODE_PROVIDERS --body '["OPENAI"]'
gh variable set CRYSK_PROFILE --body openai
```

`gh variable set` replaces the list. If `CRYSK_OPENCODE_PROVIDERS` already has providers, include them too, for example `'["DEEPSEEK","OPENAI"]'`.

Open a pull request from a branch of the same repository and check that the `crysk` check finishes.

## Models the profile uses

| Step | Model |
|---|---|
| Hunters | `gpt-6.1-terra`, effort `xhigh` |
| Refuter | `gpt-6.1-sol`, effort `high` |
| Consolidation | `gpt-6.1-terra`, effort `high` |
| Summary | `gpt-6-luna` |

To change a step, set `CRYSK_MODELS`: see [other model providers](https://crysk.dev/docs/github-actions/other-providers.md). A role you set there wins over the profile.

## What it costs

Every review bills your OpenAI account, so the [size limits for per-token runs](https://crysk.dev/docs/github-actions/size-and-spend.md) apply by default.
