Repository navigation
[Fix] Copilot GPT-5.x task helpers fail on the wrong endpoint - #3666
Merged
Merged
Conversation
Contributor
|
No code issues found. See session Reviewed Copilot early activation, task-token propagation, gateway/auth isolation, and exact endpoint assertions against the existing sandbox pattern. CI tests, lint, type checks, and CodeQL passed. The real-CLI subscription transport test is opt-in; its reported local run was not independently repeated during review. Reviewed 761673c |
roomote-roomote
Bot
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
November 4, 2026 14:43
Merged
8 of 11 tasks
5 of 8 tasks
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.
Related issue
Addresses the Copilot endpoint-routing finding on #3665.
Why this PR exists
The promotion PR remains frozen at
38325e3559771e99e1e0efb7e8406262002b8683. Its code-review check reports this finding; the observed build, test, lint, typecheck and CodeQL checks passed. This separate fix branches from current develop (37aa060482a54f4b8a2dcc4f864c1b2c4542b139) and targets develop. It does not refresh the release candidate or authorize release promotion.What changed
Copilot GPT-5.x task helpers selected
/chat/completions, which Copilot rejects. Enable the provider before OpenCode's custom-loader pass using the helper's existing task inference token, matching the activation pattern already used by sandbox tasks.Changed files:
packages/cloud-agents/src/server/opencode-runtime.ts: activate Copilot within the existing shared helper rebasing function; retain gateway routing and auth isolation.packages/cloud-agents/src/server/__tests__/task-helper-subscription-transport.test.ts: replace prefix-only assertions with exact Copilot/responsesand ChatGPT/v1/responsesendpoint checks.Impact: restores the intended Copilot helper transport without new state, dependencies or configuration choices. Existing gateway denial handling and shared OAuth storage preservation remain covered.
How it was tested
Using pinned OpenCode 1.18.30, synthetic OAuth credentials and a local HTTP gateway (no live-provider inference):
/api/inference/github-copilot/responses, received/api/inference/github-copilot/chat/completions; the ChatGPT control passed.ROOMOTE_TEST_OPENCODE_SUBSCRIPTIONS=1 pnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/cloud-agents exec vitest run src/server/__tests__/task-helper-subscription-transport.test.ts src/server/__tests__/opencode-runtime.test.tspassed 52/52 tests. This exercises the real CLI and OAuth plugins, exact HTTP routes, task bearer authorization, safety-stop propagation and preservation of shared OAuth storage.pnpm --filter @roomote/cloud-agents check-types:fastpassed.check-types:fast(27 package tasks), and knip.git diff --checkpassed. Browser proof is not applicable to this backend-only transport change. Live Copilot service acceptance was not exercised; the decisive regression boundary is the real OpenCode request arriving at the controlled gateway.Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changeset