Skip to content

Migrate OpenCode review model pool off GitHub Models before 2026-07-30 retirement #624

Description

@seonghobae

Problem

GitHub Models is fully retired on 2026-07-30 (changelog). Org-attributed inference for ContextualWisdomLab is already cut off (since ~2026-07-25T00:26Z): POST https://models.github.ai/orgs/ContextualWisdomLab/inference/chat/completions returns 403 with Sunset: Thu, 30 Jul 2026 00:00:00 GMT and a deprecation Link header. User-attributed inference still returns 200, but that also dies on Jul 30.

Consequences observed today:

  • Every opencode-review repository_dispatch run org-wide fails with OPENCODE_MODEL_POOL_OUTCOME: exhaustedMODEL_OUTPUT_UNAVAILABLE (e.g. runs 30150610014, 30150959330, 30151278716 in .github). All PR merges are blocked because the required review cannot produce approval evidence.
  • The org secret STRIX_GITHUB_MODELS_TOKEN was failing 401/403 and masking the || github.token fallback; the dead secret was deleted 2026-07-25. The fallback engages now but is equally rejected (Actions tokens attribute to the org).
  • Remaining pool providers need billing: OpenAI (insufficient_quota), OpenRouter (HTTP 402 credit-exhausted).

Immediate mitigation (any one restores reviews now)

  1. Top up OpenRouter credits (pool falls through automatically), or
  2. Restore OpenAI quota, or
  3. Stopgap until Jul 30 only: fine-grained PAT with Models read set as org secret STRIX_GITHUB_MODELS_TOKEN.

Migration work (before 2026-07-30)

  • Remove/replace the github-models provider block in opencode.jsonc (line ~87 "apiKey": "{env:STRIX_GITHUB_MODELS_TOKEN}") and the embedded copies in .github/workflows/opencode-review.yml (~line 3325) and .github/workflows/pr-review-autofix.yml (~line 277) in ContextualWisdomLab/.github.
  • Update the model pool candidate list so github-models/* entries are removed (they burn 8 of every 10 pool attempts today and guarantee slower exhaustion).
  • Update strix.yml GitHub Models routing (provider_mode == 'github_models', GITHUB_MODELS_FALLBACK_TOKEN, "STRIX_GITHUB_MODELS_TOKEN is required" gates) to a supported provider (changelog suggests Microsoft Foundry / Copilot).
  • Update contract tests that pin the token expressions: scripts/ci/test_strix_quick_gate.sh (lines ~312–317, ~584–585, ~3820, ~5262) and scripts/ci/strix_quick_gate.sh (~3605, ~3620).
  • Update sibling-repo opencode.jsonc copies (naruon, scopeweave, newsdom-api, bandscope, pg-erd-cloud, codec-carver) and noema central-review.yml NOEMA_FALLBACK_LLM_API_KEY.
  • Update prose/docs: docs/org-required-workflow-rollout.md (model token posture, line ~42), PR_GOVERNANCE_AUDIT.md if it references GitHub Models, AGENTS.md notes in naruon.
  • Decide replacement default route (Microsoft Foundry per changelog, or OpenRouter/OpenAI as primary) and wire budget monitoring so credit exhaustion pages a human before reviews stall.

Evidence trail

Full diagnosis on #618 (comment 5077949855): provider failure classes, run IDs, before/after fallback signatures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiAPI, protocol, event, or external contractarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: dataDatabase, schema, migration, ETL, or lineagearea: securitySecurity boundary, hardening, or vulnerability preventionpriority: mediumNormal-priority or P2 workstatus: blockedBlocked by conflict, dependency, or required prerequisitetype: featureNew or expanded product capability

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions