Repository navigation
Pin managed OpenCode to 2.2.7 so Sonar Pro replies finish and PDFs reach GitHub Copilot models - #4280
Merged
Merged
Conversation
…each GitHub Copilot models OpenCode 2.0.32 bundles @ai-sdk/perplexity 3.0.26, which rejects Sonar stream chunks without delta.role, and runs GitHub Copilot's chat models through a vendored converter that refuses PDF file parts. 2.2.7 routes Perplexity through its openai-compatible protocol and runs GitHub Copilot on its native protocols (anomalyco/opencode#62034). Relates to #2921 Relates to #4116 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
@codex review |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
zeroliu
marked this pull request as ready for review
November 11, 2026 06:11
This was referenced Nov 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to #2921
Relates to #4116
Why
Agent Chat on OpenCode runs the OpenCode release Copilot downloads for the user, pinned to 2.0.32. Two failures come from code inside that release, not from Copilot:
delta.role, which is how Perplexity streams after its first chunk. OpenCode retries for about a minute, then the reply ends garbled (TheThe capitalofAustralia.) and the turn fails withType validation failed … ["choices",0,"delta","role"]. 2.2.7 no longer uses that client.Internal error: 'file part media type application/pdf' functionality not supported.OpenCode removed that copy in refactor(core): run GitHub Copilot on native ai protocols anomalyco/opencode#62034, first released in 2.2.7.What
Managed OpenCode moves to 2.2.7, the latest release. Users on the managed install get it on their next plugin load, as with earlier pins. Settings → Agents → OpenCode → Configure offers v2.2.7 for new installs.
perplexity/sonar-pro,sonar-reasoning-pro(real API)sonar-proalso calls toolsperplexity/sonar(real API)Tool calling is not supported for this modelCopilot's own OpenCode integration behaves the same on 2.2.7. A real turn showed each of these working:
reportskill from the prompt.session_movedeny rule still holds.variants: []for them, and OpenCode 2.2.7 only guesses whenvariantsis absent.Non goal
sonarwork in Agent Chat. 2.2.7 sends Agent Chat's tools even though Copilot's config setscapabilities.tools: falsefor it, and Perplexity rejects tools forsonaronly. Agent Mode (opencode backend): Perplexity Sonar streaming responses fail with role schema validation error, discarding completed search results #2921 stays open for that.Screenshot
Before is
masterwith OpenCode 2.0.32; after is this branch with OpenCode 2.2.7. Perplexity runs use the real API; GitHub Copilot runs use a local stand-in server.perplexity/sonar-pro, before:perplexity/sonar-pro, after:perplexity/sonar, after (fails fast; still open in #2921):GitHub Copilot model reading a PDF, before:

GitHub Copilot model reading a PDF, after:

Managed install through Configure:

Turn diff after write and edit on 2.2.7:

Risk
High
Review: run Verification steps 1-6, including the Sonar and PDF variants. The only production change is
OPENCODE_PINNED_VERSIONinsrc/agentMode/backends/opencode/ui/opencodeVersion.ts.Verification
opencode/*-freemodel and sendReply with the single word: pong. The reply arrives.obsidian-copilot · Obsidian cliappears, and the answer uses the tool's result.perplexity/sonar-pro. The full answer arrives without a validation error. Onperplexity/sonarthe turn fails at once withTool calling is not supported for this model.Note
variantsfield. Copilot leaves that field to OpenCode for providers OpenCode knows natively, so the Perplexity models get· lowin the picker and sendreasoning_effort. Perplexity accepted it at every level in real requests. Copilot Plus and custom providers are not affected.[1]markers, on both versions.127.0.0.1,localhost,::1toNO_PROXYitself. WithHTTP(S)_PROXYset to a proxy that rejects everything, 2.2.7 still started, connected to Copilot's tool server and answered from a local model; the proxy saw only external hosts. It still helps custom installs older than 2.2.4.