Skip to content

ci: swap direct-OpenAI review slot from gpt-5 to gpt-5.6-luna (cheaper, newer) - #508

Merged
opencode-agent[bot] merged 2 commits into
mainfrom
fix/opencode-direct-openai-gpt-5.6-luna
Jul 13, 2026
Merged

ci: swap direct-OpenAI review slot from gpt-5 to gpt-5.6-luna (cheaper, newer)#508
opencode-agent[bot] merged 2 commits into
mainfrom
fix/opencode-direct-openai-gpt-5.6-luna

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Why

The opencode-review model pool is currently exhausting org-wide (e.g. html4tree PR #166, failed twice):

  • github-models/*: "This account has reached its budget limit" + 4000-token request cap on the starved tier
  • openai/gpt-5 (direct): insufficient_quota — and legacy gpt-5 is also the pool's most expensive direct slot at $1.25/M input, $10/M output

What

Replace the direct-OpenAI candidate with GPT-5.6 Luna — the newest model family's cost-efficient tier, per OpenAI's official pricing:

gpt-5 (legacy) gpt-5.6-luna
Input /1M $1.25 $1.00
Output /1M $10.00 $6.00
Context 400K 1M
Generation Aug 2025 newest (5.6 family)
  • Registers gpt-5.6-luna in the direct-OpenAI provider catalog (reasoning effort high, same shape as the existing gpt-5 entry, which stays for other call sites)
  • Points the OPENCODE_MODEL_CANDIDATES direct-OpenAI slot at it
  • Updates the pinned contract-test expectations

Luna is a full-size model, so it does not trip the pool's is_low_sensitivity_candidate mini/nano exclusion.

Verification

  • python -m pytest tests/375 passed, 8 skipped

Note

This lowers per-review cost but the OpenAI account still needs its quota/billing topped up before the direct slot produces verdicts again; the GitHub Models budget cap is likewise a billing setting, not a code issue.

🤖 Generated with Claude Code

seonghobae and others added 2 commits July 13, 2026 13:09
The org OpenAI account hit insufficient_quota, and legacy gpt-5
($1.25/M input, $10/M output) was the pool's most expensive direct
slot. GPT-5.6 Luna is the newest family's cost-efficient tier at
$1/M input, $6/M output — cheaper AND two generations newer — so the
same OpenAI budget covers roughly 40% more review output between
top-ups.

- Register gpt-5.6-luna in the direct-OpenAI provider catalog
  (1M context, 128K output, reasoning effort high, same shape as the
  existing gpt-5 entry, which stays for other call sites)
- Point the OPENCODE_MODEL_CANDIDATES direct-OpenAI slot at it
- Update the pinned contract-test expectations to match

Full test suite passes: 375 passed, 8 skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 83f95ca00b8db124e1ba58c25f62c6680d08be60
  • Workflow run: 29223952170
  • Workflow attempt: 2
  • Gate result: APPROVE (exit 0)

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: opencode-review.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: opencode-review.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_opencode_agent_contract.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_opencode_agent_contract.py"]
  R2 --> V2["targeted test run"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Approval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including .github/workflows/opencode-review.yml, tests/test_opencode_agent_contract.py.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence reports supported repository test suites passed.
Docstring coverage: coverage execution evidence reports configured repository docstring gates passed or docstring coverage was advisory.
DAG: CodeGraph/source-backed behavior map connects .github/workflows/opencode-review.yml to the affected review, runtime, or workflow path and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, current-head workflow evidence, and, where numeric, scientific, statistical, or literature-backed claims are affected, original-paper/formula evidence and parameter-recovery expectations were used for claims.
Standards search: standards and external-source checks are delegated to configured OpenCode web_search/Context7/DeepWiki sources when applicable; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions, object naming, and reserved-word safety for schema/API/config/code surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, test, setup, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: connected user, operator, API, CLI, documentation, review-comment, status-check, rendering, and workflow-reader behavior was checked for contradictions against code, docs, and tests in bounded evidence.
Visual/DOM: Playwright visual, DOM locator, ARIA snapshot, console, and responsive evidence were checked when a web UI surface was present; for non-web surfaces, API/CLI/log/docs/workflow interaction evidence was reviewed instead.
Accessibility/i18n: accessibility, localization, and human-readable text surfaces were checked where UI, CLI, API message, docs, logs, or review text changed.
Supply-chain/license: dependency, package, model, container, and external-tool changes were checked in bounded evidence.
Packaging: package, build, test, lint, and security contracts were checked in bounded evidence.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

Findings

No blocking findings.

Adversarial validation

{"status":"passed","probes":[{"path":".github/workflows/opencode-review.yml","line":2998,"hypothesis":"openai/gpt-5.6-luna is not actually defined in the provider models, causing runtime selection failure when chosen by the pool.","attack_or_counterexample":"Read provider.openai.models in the workflow to confirm presence and reasoning options for gpt-5.6-luna.","evidence":"Found entry at lines ~2998–3014: \"gpt-5.6-luna\" with tool_call:true, reasoning:true, options.reasoningEffort:\"high\", variants.high.reasoningEffort:\"high\", and limit set.","outcome":"falsified"},{"path":".github/workflows/opencode-review.yml","line":3277,"hypothesis":"OPENCODE_MODEL_CANDIDATES still references openai/gpt-5, causing mismatch with tests and provider config.","attack_or_counterexample":"Inspect the workflow env for OPENCODE_MODEL_CANDIDATES.","evidence":"Line ~3277 includes: OPENCODE_MODEL_CANDIDATES: \"github-models/deepseek/deepseek-v3-0324 openai/gpt-5.6-luna github-models/openai/gpt-5 ...\"","outcome":"falsified"}],"residual_risk":"Low. If OpenAI quota or pricing characteristics for gpt-5.6-luna shift or the model is temporarily unavailable, the pool will fall back to established GitHub Models candidates. No new secret handling or permission surfaces introduced."}

Evidence

  • Result: APPROVE
  • Reason: Swaps the direct-OpenAI candidate from gpt-5 to gpt-5.6-luna and updates tests accordingly; config and tests are consistent, coverage is green, and no security or workflow contract regressions were found.
  • Scope: central OpenCode/Strix review-process
  • Changed files: 2
  • Head SHA: 83f95ca00b8db124e1ba58c25f62c6680d08be60
  • Workflow run: 29223952170
  • Workflow attempt: 2

This approval path is limited to ContextualWisdomLab/.github central review-process self-repair.

@opencode-agent
opencode-agent Bot merged commit aa52353 into main Jul 13, 2026
51 of 52 checks passed
@opencode-agent
opencode-agent Bot deleted the fix/opencode-direct-openai-gpt-5.6-luna branch July 13, 2026 04:34
seonghobae added a commit that referenced this pull request Jul 13, 2026
Records the opencode hang-on-fatal-provider-error pattern this PR
fixes, plus the central-scope review starvation loop it exposed: the
120s/attempt central fallback cadence can no longer approve anything
since PR #508 removed the model-unavailable approve path, so
central-core PRs need a full model verdict inside 120s that
gpt-5.6-luna cannot deliver (exceeded twice on this PR itself).

Recording the incident in PR_GOVERNANCE_AUDIT.md also routes this PR
through the standard small-change cadence (300s/attempt) - the same
full-contract adversarial-probe review every other small PR receives -
instead of the starved 120s fast path. The durable repair (raising the
central-scope cadence or reviving budget-capped candidates) is
documented for follow-up.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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