Skip to content

ci(claude): revert to @v1, pin --model claude-opus-4-7#225

Merged
d-morrison merged 1 commit into
mainfrom
ci/pin-claude-model-opus-4-7
May 20, 2026
Merged

ci(claude): revert to @v1, pin --model claude-opus-4-7#225
d-morrison merged 1 commit into
mainfrom
ci/pin-claude-model-opus-4-7

Conversation

@d-morrison

Copy link
Copy Markdown
Member

Summary

  • Revert the agent workflow from anthropics/claude-code-action@beta back to @v1.
  • Pin --model claude-opus-4-7 in claude_args so the action stops asking the API for a retired default model.

Diagnosis (from #224's @beta debug trigger)

The @v1 SDK crashes documented in #224 were not a Claude-Code-Action bug per se — they were a model: claude-sonnet-4-20250514 404 from the Anthropic API being masked as the obfuscated sdk.mjs AJV crash. Confirmed by run 26147667637, which on @beta produced a readable error:

API Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model: claude-sonnet-4-20250514"},"request_id":"req_011CbDRtTEpspPCv6cL5kaaZ"}

claude-sonnet-4-20250514 is the older Sonnet 4.0 ID that's no longer served. The action's default points there; pinning --model claude-opus-4-7 routes around it.

The upstream "obfuscated SDK crash" issue (anthropics/claude-code-action#892) is orthogonal — it's about the error message being illegible. That stays open upstream regardless of this fix.

Test plan

  • Merge.
  • Trigger @claude review on PR Adding population parameters as attributes #141 (or a smaller PR) and confirm a successful review run.
  • If it works, drop a confirmation comment on upstream #892 noting the underlying cause for this signature.

🤖 Generated with Claude Code

Diagnosis from run 26147667637 (on @beta, which surfaces the real
error instead of the AJV-obfuscated one from @v1):

  API Error: 404 model: claude-sonnet-4-20250514

The action's default model is retired. Pinning --model explicitly
fixes the immediate failure; the upstream obfuscation issue (#892) is
orthogonal and tracked separately.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 20, 2026 08:12
@github-actions github-actions Bot removed the request for review from Copilot May 20, 2026 08:12
@claude

claude Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Claude finished @d-morrison's task in 50s —— View job


Code Review: PR #225 — ci(claude): revert to @v1, pin --model claude-opus-4-7

  • Gather context (diff + workflow file)
  • Understand request (code review)
  • Execute review
  • Post results

Summary: Clean, minimal fix with a well-documented root cause. The diagnosis in the PR description is solid — the retired model ID returning a 404 was being masked by the AJV error in the minified sdk.mjs, and @beta surfaced it. Good investigative work.


.github/workflows/claude.yml

What changed:

  • Line 120: anthropics/claude-code-action@beta@v1 (reverts temp debug change)
  • Line 142: adds --model claude-opus-4-7 to claude_args; adds explanatory comment block

The fix is correct. The comment explaining the pin and its cleanup condition is well-written and gives future maintainers exactly what they need.


Observations

1. Model tier choice (minor)

claude-opus-4-7 is the highest-capability (and highest-cost) model tier. For routine CI code review and issue-filing tasks, claude-sonnet-4-6 would be sufficient and meaningfully cheaper per token. Consider whether Opus is warranted here vs. Sonnet.

Fix this →

2. Comment placement (cosmetic)

The new comment block (lines 136–141) is inserted between the existing Bash-allowlist comment and the claude_args value itself. This is readable, but the comment now describes two separate concerns (Bash tools AND the model pin). No action needed — just noting it reads fine.

3. Removed temp comment (good)

The four-line # TEMP: swapped @v1 → @beta... block is cleanly removed. No stale documentation left behind.


Verdict

Approved. The change is correct, minimal, and well-commented. The only non-blocking suggestion is to evaluate claude-sonnet-4-6 vs. claude-opus-4-7 for cost efficiency once the fix is confirmed working.


@d-morrison d-morrison merged commit 933a7c3 into main May 20, 2026
11 of 14 checks passed
@d-morrison d-morrison deleted the ci/pin-claude-model-opus-4-7 branch May 20, 2026 08:22
@codecov

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

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