Skip to content

anthropic: Support alternative provider SSE formatting#47847

Merged
benbrandt merged 4 commits intozed-industries:mainfrom
raphaelluethy:fix/anthropic
Feb 20, 2026
Merged

anthropic: Support alternative provider SSE formatting#47847
benbrandt merged 4 commits intozed-industries:mainfrom
raphaelluethy:fix/anthropic

Conversation

@raphaelluethy
Copy link
Contributor

@raphaelluethy raphaelluethy commented Jan 28, 2026

Closes #ISSUE

The issue I ran into was that responses from anthropic compatible providers, like Kimi for Coding, have no space after data:. This change just adds a quick check to also allow for those providers to work.

Before it just resolved but did not show any output:
CleanShot 2026-01-28 at 12 50 31@2x

Now it returns the proper result:
CleanShot 2026-01-28 at 12 56 30@2x

Normal Anthropic models still work as expected:
CleanShot 2026-01-28 at 12 58 37@2x

Config to test

 "language_models": {
    "anthropic": {
      "api_url": "https://api.kimi.com/coding",
      "available_models": [
          {
            "name": "kimi-for-coding",
            "display_name": "Kimi 2.5 Coding",
            "max_tokens": 262144,
            "max_output_tokens": 32768,
          },
      ],
    },
}

TLDR:

  • Accepts SSE data:{...} lines (no space) emitted by some alternative Anthropic providers, in addition to the standard data: {...} format.

Release Notes:

  • Fixed Anthropic streaming for alternative providers by accepting SSE data:{...} (no space) lines.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 28, 2026
@raphaelluethy raphaelluethy changed the title fix(anthropic): support alternative providers SSE formatting agent(anthropic): support alternative providers SSE formatting Jan 28, 2026
@MrSubidubi MrSubidubi changed the title agent(anthropic): support alternative providers SSE formatting anthropic: Support alternative provider SSE formatting Jan 28, 2026
@SomeoneToIgnore SomeoneToIgnore added the area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Jan 28, 2026
@benbrandt benbrandt self-assigned this Feb 12, 2026
@benbrandt benbrandt enabled auto-merge (squash) February 20, 2026 09:36
@benbrandt benbrandt merged commit 325e941 into zed-industries:main Feb 20, 2026
27 checks passed
@raphaelluethy raphaelluethy deleted the fix/anthropic branch February 20, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants