GitHub Actions repository variable for the image model id: no commit

Keep the Sume image model id in a GitHub Actions repository variable, so a gpt-image-1 replacement is a settings change or one gh command, not a pull request.

5 min readSume
All posts

Put the model id in a repository variable named SUME_IMAGE_MODEL, read it with vars.SUME_IMAGE_MODEL in the workflow, and fall back to a default in the same expression. When OpenAI's gpt-image-1 shutdown on October 23, 2026 forces a change, you edit the variable and re-run the workflow. No commit, no review queue.

Variables are plain text, which suits a model id. Keep the Sume API key in a secret, not a variable.

Set the variable

Use the repository settings page, or the GitHub CLI from a terminal:

gh variable set SUME_IMAGE_MODEL --body "openai/gpt-image-2.5-sunburst"

Read it in a workflow

The step sends the id in the request body. --fail-with-body keeps the error JSON visible when Sume answers 404 model_not_found for an id it does not list. jq -n --arg builds the body, so a model id with a dot never needs shell escaping.

name: nightly-renders
on:
  schedule: [{cron: "0 6 * * *"}]
  workflow_dispatch:
jobs:
  render:
    runs-on: ubuntu-latest
    env:
      SUME_IMAGE_MODEL: ${{ vars.SUME_IMAGE_MODEL || 'openai/gpt-image-2.5-sunburst' }}
    steps:
      - name: Render
        env:
          SUME_API_KEY: ${{ secrets.SUME_API_KEY }}
        run: |
          curl -sS --fail-with-body https://api.sume.com/v1/images \
            -H "Authorization: Bearer $SUME_API_KEY" \
            -H "Content-Type: application/json" \
            -d "$(jq -n --arg m "$SUME_IMAGE_MODEL" \
              '{model:$m,prompt:"studio photo of a ceramic mug"}')"

Dates this protects you from

Pair the variable with the scan in the repo-scan post so nothing else in the repo still hard-codes a retired id. Sume's image release-note workflow uses the same endpoint.

Image model retire dates, read 2026-10-06
Retired idDateReplacement named by the vendor
gpt-image-12026-10-23gpt-image-2.5-sunburst or gpt-image-2.5-flare
gpt-image-1-mini, gpt-image-1.52026-12-01gpt-image-2.5-sunburst or gpt-image-2.5-flare

Sources

Related posts

More in Integrations

All Integrations posts

Written by Sume