[PR #11274] feat: add copilot fetch adapter #13720

Open
opened 2026-02-16 18:18:33 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11274

State: open
Merged: No


What does this PR do?

  • Adds a fetch adapter for Copilot chat models to handle chat API's reasoning format and translate it for AI SDK.
  • Works with Claude and Gemini.
  • Passing through thinking_budget and the interleaved thinking header for claude.
  • Works with the existing openai-compatible sdk

How did you verify your code works?

  • Testing multi-turn thinking with both claudes and gemini.
  • Tested cycling between models to ensure no cross contamination (copilot/copilot and copilot/noncopilot).
  • Logged requests/responses to confirm headers, provider options, metadata, and content were all correct.
  • Tested gpt-5 on /responses to make sure I didn't accidentally break this.

Would fix https://github.com/anomalyco/opencode/issues/6864
also fixes https://github.com/anomalyco/opencode/issues/8417

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11274 **State:** open **Merged:** No --- ### What does this PR do? - Adds a fetch adapter for Copilot chat models to handle chat API's reasoning format and translate it for AI SDK. - Works with Claude and Gemini. - Passing through `thinking_budget` and the interleaved thinking header for claude. - Works with the existing openai-compatible sdk ### How did you verify your code works? - Testing multi-turn thinking with both claudes and gemini. - Tested cycling between models to ensure no cross contamination (copilot/copilot and copilot/noncopilot). - Logged requests/responses to confirm headers, provider options, metadata, and content were all correct. - Tested gpt-5 on /responses to make sure I didn't accidentally break this. --- Would fix https://github.com/anomalyco/opencode/issues/6864 also fixes https://github.com/anomalyco/opencode/issues/8417
yindo added the pull-request label 2026-02-16 18:18:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13720