Skip to content

fix: force streaming for GitHub Copilot non-GPT-5 models - #744

Merged
Colin Francis (colifran) merged 3 commits into
langchain-ai:mainfrom
Christian-Sidak:fix/issue-731
Aug 28, 2026
Merged

fix: force streaming for GitHub Copilot non-GPT-5 models#744
Colin Francis (colifran) merged 3 commits into
langchain-ai:mainfrom
Christian-Sidak:fix/issue-731

Conversation

@Christian-Sidak

Copy link
Copy Markdown
Contributor

Summary

  • The GitHub Copilot API rejects or silently returns empty responses for non-streaming requests when using Claude and Gemini models.
  • DeepAgents makes non-streaming .invoke() calls internally during repository worker steps (planner and page workers).
  • Without streaming: true, those internal calls return empty and the workers exit without calling submit_plan or submit_page, producing the error "Repository planning worker exited without submit_plan."
  • Fix: extend providerUsesStreaming to return true for the copilot provider. This applies the same streaming: true override used by openai-chatgpt for the Codex backend. For GPT-5 Copilot models that already use the Responses API, the flag is redundant but harmless.

Test plan

  • test/config/copilot-provider.test.ts: new test verifying providerUsesStreaming("copilot") returns true
  • test/config/constants.test.ts: updated "never applies to other providers" test to remove copilot, added copilot-specific test
  • test/agent/create-model.test.ts: new tests verifying streaming: true is set on the ChatOpenAI instance for both Claude and GPT-5 Copilot models
  • All 128 affected tests pass

Note: test/visualize/client-interaction.test.ts, evals/ledger/run/evaluator-e2e.test.ts, and test/integrations/session-manager.test.ts have pre-existing failures on main unrelated to this change.

Fixes #731

The Copilot API rejects or returns empty responses for non-streaming
requests when using Claude and Gemini models. DeepAgents makes
non-streaming .invoke() calls internally during repository worker
steps, so without streaming: true those workers exit immediately
without ever calling submit_plan or submit_page.

Extend providerUsesStreaming to return true for the copilot provider,
applying the same streaming: true override used by openai-chatgpt.
For GPT-5 models that already route through the Responses API, the
flag is redundant but harmless.

Fixes langchain-ai#731

Signed-off-by: Christian-Sidak <61099993+Christian-Sidak@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e12b85

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openwiki Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@colifran Colin Francis (colifran) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colifran
Colin Francis (colifran) merged commit 7c3a540 into langchain-ai:main Aug 28, 2026
9 checks passed
Brad Huffman (ppsplus-bradh) added a commit to ppsplus-bradh/openwiki that referenced this pull request Aug 28, 2026
Pick up 4 upstream fixes (unrecognized-language rejection langchain-ai#761, GitHub Copilot
non-GPT-5 streaming langchain-ai#744, Bedrock maxTokens langchain-ai#743, docs langchain-ai#759).

One conflict, in beginRepositoryRun (src/generation/repository-run.ts): upstream
langchain-ai#761 now resolves and rejects an unrecognized language before touching the
repository, right where the feature computes its skipRepoSetup guard and
noopScope. Kept both — the language rejection runs first, then the recursive
repo-setup guard and the subproject no-op scope.

Full suite: 3680 passed / 3 skipped.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

[Bug]: GitHub Copilot models fail to complete repository workers

2 participants