Skip to content

fix(opencode): rescrict github copilot opus 4.7 variants to "medium"#23097

Merged
rekram1-node merged 2 commits intoanomalyco:devfrom
OpeOginni:fix/copilot-opus-4.7-variants
Apr 17, 2026
Merged

fix(opencode): rescrict github copilot opus 4.7 variants to "medium"#23097
rekram1-node merged 2 commits intoanomalyco:devfrom
OpeOginni:fix/copilot-opus-4.7-variants

Conversation

@OpeOginni
Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #23082

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds case for Github Copilot Provider supporting only the "medium" reasoning variant.

Was able to confirm only this reasoning_effort from the error given to the user on the issue and also using the endpoint https://api.githubcopilot.com/models it return the following for opus 4.7.

        {
            "capabilities": {
                "family": "claude-opus-4.7",
                ...
                "supports": {
                    "reasoning_effort": [
                        "medium"
                    ]
                }
            }
        }

How did you verify your code works?

Ran on my local dev instance and was able to only cycle from default to medium

Screenshots / recordings

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@OpeOginni
Copy link
Copy Markdown
Contributor Author

I don't know if the position for the IF is the best, other option would be to put it inside the anthropicAdaptiveEfforts function, but decided to keep it clean, but any suggestion is appriciated. https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/provider/transform.ts#L392

@rekram1-node rekram1-node merged commit 8fbbca5 into anomalyco:dev Apr 17, 2026
8 checks passed
@OpeOginni OpeOginni deleted the fix/copilot-opus-4.7-variants branch April 17, 2026 15:25
leohenon pushed a commit to leohenon/opencode-vim that referenced this pull request Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opus 4.7 from Copilot does not support thinking variants

2 participants