zed icon indicating copy to clipboard operation
zed copied to clipboard

assistant:InlineAssist is always: failed to stream completion.

Open Blankeos opened this issue 8 months ago • 14 comments

Summary

Inline assist doesn't seem to work at all for me for the past few days now. What's wrong?

I keep getting this error for Zed Claude 3.7 and Zed Claude 3.7 Thinking: cloud language model completion failed after 3 retries with status 500 Internal Server Error: failed to stream completion

Image

With Gemini: failed to stream completion

Image

Description

Steps to reproduce:

  1. ctrl-enter to InlineAssist
  2. Write anything
  3. Enter
  4. See an error

Expected Behavior: No error Actual Behavior: There's an error.

Not sure if relevant but here's my settings.json:

click to expand
{
  // "redact_private_values": true,
  "auto_update": false,
  "icon_theme": "Catppuccin Frappé",
  "indent_guides": {
    "enabled": true,
    "active_line_width": 3
  },
  "toolbar": {
    "quick_actions": false
  },
  // CHAT
  "assistant": {
    "default_model": {
      "provider": "google",
      "model": "gemini-2.0-flash"
    },
    "version": "2"
  },
  // COPILOT
  "show_edit_predictions": true,
  "features": {
    "edit_prediction_provider": "supermaven"
  },
  "vim_mode": true,
  // "wrap_guides": [80],
  // "soft_wrap": "editor_width",
  "vim": {
    "toggle_relative_line_numbers": true
  },
  "use_autoclose": true,
  "chat_panel": {
    "dock": "right"
  },
  "project_panel": {
    "dock": "right"
  },
  "theme": "Blankeos Zen Dark (Blurred)",
  "buffer_font_size": 12.0,
  "ui_font_size": 16,
  "ui_font_family": "BlexMono Nerd Font",
  "buffer_font_family": "BlexMono Nerd Font",
  "terminal": {
    "font_family": "BlexMono Nerd Font",
    "font_size": 12
  },
  "file_types": {
    "JSONC": ["code-snippets", "prettierrc"]
  },
  "languages": {
    "Markdown": {
      "format_on_save": "prettier"
    },
    "HTML": {
      "formatter": "prettier",
      "code_actions_on_format": {
        "source.organizeImports": true
      }
    },
    "CSS": {
      "formatter": "prettier",
      "code_actions_on_format": {
        // "source.organizeImports": true
      }
    },
    "TypeScript": {
      "formatter": "prettier",
      "code_actions_on_format": {
        "source.organizeImports": true
      },
      "use_autoclose": true
    },
    "TSX": {
      "formatter": "prettier",
      "code_actions_on_format": {
        "source.organizeImports": true
      },
      "use_autoclose": true
    },
    "JavaScript": {
      "formatter": "prettier",
      "code_actions_on_format": {
        "source.organizeImports": true
      }
    },
    "Svelte": {
      "formatter": "prettier",
      "format_on_save": "prettier",
      "use_autoclose": true,
      "code_actions_on_format": {
        "source.organizeImports": true
      }
    },
    "Rust": {
      // "inlay_hints": {
      //   "show_type_hints": true,
      //   "enabled": true
      // }
    },
    "Dart": {
      "inlay_hints": {
        "show_type_hints": true,
        "show_other_hints": true,
        "show_parameter_hints": true,
        "enabled": true
      }
    }
  },
  "lsp": {
    // https://github.com/zed-industries/zed/issues/22445#issuecomment-2571318408
    "tailwindcss-language-server": {
      "settings": {
        "experimental": {
          "classRegex": [
            ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
            ["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
            ["clsx\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
            ["twMerge\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
          ]
        }
      }
    }
  },
  // "inlay_hints": {
  //   "show_background": true // Doesn't work on a per "language" level
  // },

  // Theme Overrides
  "experimental.theme_overrides": {
    "background.appearance": "blurred"
  }
}

Zed Version and System Specs

Zed: v0.182.9 (Zed) OS: macOS 15.3.2 Memory: 36 GiB Architecture: aarch64


Just to add: It's just Inline assist that has these issues. Assistant/Agent panel works still for me (the chat-like interface on the sidebar). But the Claude 3.5, Claude 3.7, Claude 3.7 Thinking Models from Zed also throw the same failed to stream completion errors. All Gemini models work fine for Assistant/Agent panel.

Blankeos avatar Apr 17 '25 11:04 Blankeos

Same for me

Image

thinhngotony avatar Apr 21 '25 02:04 thinhngotony

Me too, but I encounter this error in the agent chat. It has been two weeks since this error occurred; can somebody help look into it?

Image

phuongduyphan avatar Apr 22 '25 02:04 phuongduyphan

same

erik-kroon avatar Apr 22 '25 07:04 erik-kroon

Same for me. Using a upstream master (from april 20) did not help either.

MordragT avatar Apr 22 '25 08:04 MordragT

Actually I wonder if it's related to the Agentic Editing beta they're running since 3 weeks ago. https://x.com/zeddotdev/status/1907549076025180531

Maybe it's breaking things for non-beta users unintentionally?

Blankeos avatar Apr 22 '25 08:04 Blankeos

Actually I wonder if it's related to the Agentic Editing beta they're running since 3 weeks ago. https://x.com/zeddotdev/status/1907549076025180531

Maybe it's breaking things for non-beta users unintentionally?

i think it started approximately then, but not 100% sure. i am an agent beta user and sometimes inline editing works (currently it does), but these past few weeks there have been many instances where it didn't work no matter model etc

erik-kroon avatar Apr 22 '25 10:04 erik-kroon

for the past 3 weeks Gemini doesn't work with inline completion I have failed to stream completion, works well with GPT or Claude btw

twde49 avatar Apr 25 '25 09:04 twde49

Hey, sorry for the bad experience. The issues with Gemini should be fixed in https://github.com/zed-industries/zed/pull/29407, i will put out a patch release today.

bennetbo avatar Apr 25 '25 12:04 bennetbo

Patch release is out, can someone confirm that the issue is fixed for Claude (when using Zed as a provider) as well?

bennetbo avatar Apr 25 '25 14:04 bennetbo

@bennetbo Thanks so much for the patch! Gemini works for me:

Image

Zed Claude providers (3.5, 3.7, 3.7 Thinking) don't work for me though:

Image

Blankeos avatar Apr 25 '25 14:04 Blankeos

@Blankeos Thanks for testing! We've investigated this further and it seems like that in your case the request is failing because we're actually getting a 403 from Anthropic.

{ "error": { "type": "forbidden", "message": "Request not allowed" } }

It seems like this is an issue on Anthropics side, we've seen a few of these errors for specfic countries in the past. We've reached out to Anthropic to investigate the issue, i'll let you know when there are any updates.

bennetbo avatar Apr 25 '25 15:04 bennetbo

Ah interesting. Thanks for looking into this!

I wonder if using a VPN would reproduce the error (not that I have one, but I'm in the Philippines if anyone's willing to try testing that)

Blankeos avatar Apr 25 '25 15:04 Blankeos

I'm running into this issue still.

lunarthegrey avatar May 11 '25 03:05 lunarthegrey

Me too, my network always route me to HKG data center

Image

lechihuy avatar May 11 '25 08:05 lechihuy

We have improved the error messaging so that you will see the screenshot like what @lechihuy shows ("451 Unavailable for Legal Reasons") instead of the generic 500.

That issue can be tracked here:

  • #29962

Thanks for reporting all!

notpeter avatar May 23 '25 16:05 notpeter