Skip to content

feat: add Claude Opus 4.7 model support#203

Merged
griffinmartin merged 2 commits intogriffinmartin:mainfrom
allen-moonshot:feat/add-opus-sonnet-4-7
Apr 16, 2026
Merged

feat: add Claude Opus 4.7 model support#203
griffinmartin merged 2 commits intogriffinmartin:mainfrom
allen-moonshot:feat/add-opus-sonnet-4-7

Conversation

@allen-moonshot
Copy link
Copy Markdown
Contributor

@allen-moonshot allen-moonshot commented Apr 16, 2026

Summary

  • Add claude-opus-4-7 model support
  • Add 4-7 model override in model-config.ts with effort-2025-11-24 beta (matching existing 4-6 pattern)
  • Update README supported models table (15 → 16 models)
  • Extend test coverage in betas.test.ts for opus 4.7: 1M context eligibility, effort beta inclusion, disableEffort exclusion, and default context-1m opt-out

All existing tests pass (213/213). Build, lint, and format clean.

Using 4.7 before OpenCode ships it

The plugin only handles auth and beta flags — model discovery lives in OpenCode's Anthropic provider config. Until OpenCode adds claude-opus-4-7 to their SDK, users can register it manually in their opencode.json:

```json
{
"provider": {
"anthropic": {
"models": {
"claude-opus-4-7": { "name": "Claude Opus 4.7" }
}
}
}
}
```

Tested end-to-end against Anthropic's API with an active Claude Max subscription — plugin applies the correct betas (effort-2025-11-24, plus context-1m-2025-08-07 when opted in) and requests complete successfully.

Happy to add this snippet to the README in a follow-up (or here) if you'd like — left it out of the initial diff to keep the PR focused on plugin-side config.

@griffinmartin
Copy link
Copy Markdown
Owner

Sonnet 4.7 doesn't exist yet to my understanding.

@allen-moonshot allen-moonshot changed the title feat: add Claude Opus 4.7 and Sonnet 4.7 model support feat: add Claude Opus 4.7 model support Apr 16, 2026
@allen-moonshot
Copy link
Copy Markdown
Contributor Author

Good catch — you're right, only Opus 4.7 is live on the API. Removed Sonnet 4.7 from the README, tests, and updated the PR title/description. Opus 4.7 verified working end-to-end with the 4-7 override (effort beta + 1M context when opted in).

@boring-dragon
Copy link
Copy Markdown

Its out now

@griffinmartin
Copy link
Copy Markdown
Owner

image

@griffinmartin
Copy link
Copy Markdown
Owner

griffinmartin commented Apr 16, 2026

models.dev just had 4.7 added, so the manual opencode.json change shouldn't be required much longer.
opencode models --refresh

@griffinmartin griffinmartin merged commit cc96338 into griffinmartin:main Apr 16, 2026
5 checks passed
griffinmartin pushed a commit that referenced this pull request Apr 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.5.0](v1.4.10...v1.5.0)
(2026-04-16)


### Features

* add Claude Opus 4.7 model support
([#203](#203))
([cc96338](cc96338))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@soltrac
Copy link
Copy Markdown

soltrac commented Apr 16, 2026

Not sure if possible. Some frameworks send temperature to the models but opus 4.7 has deprecated it. Is it possible to filter this from this plugin?

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.

4 participants