Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change LLM model in assistant panel #24896

Open
TeijiW opened this issue Feb 14, 2025 · 5 comments
Open

Can't change LLM model in assistant panel #24896

TeijiW opened this issue Feb 14, 2025 · 5 comments
Assignees
Labels
ai Improvement related to Assistant, Copilot, or other AI features assistant AI feedback for Assistant (inline or panel) linux

Comments

@TeijiW
Copy link

TeijiW commented Feb 14, 2025

Summary

Trying to change models in the assistant panel fails to actually change the model. This occurs even with Anthropic API Key configured, and prevents selecting a model or sending messages to the assistant.

I found several similar issues, but there doesn't seem to be a permission problem or anything like that. However, nothing is being written to my settings file - I'm not sure if this is expected behavior.

Steps to trigger the problem:

  1. Configure Anthropic API Key using env var or using the interface of zed
  2. Try to change the LLM model

Actual Behavior: The LLM model doesn't change and it's not possible send any message

Expected Behavior: The LLM model changes and then I can send message and use commands.

Video_2025-02-14_14-58-57.mp4
Zed.log contents
2025-02-14T14:51:16.947794399-04:00 [INFO] read_command;
2025-02-14T14:51:16.948004645-04:00 [INFO] read_command;
2025-02-14T14:51:16.948176942-04:00 [INFO] read_command;
2025-02-14T14:51:16.949044995-04:00 [INFO] socket reader;
2025-02-14T14:51:16.950112338-04:00 [INFO] socket reader;
2025-02-14T14:51:16.95171515-04:00 [INFO] socket reader;
2025-02-14T14:51:16.951939537-04:00 [INFO] socket reader;
2025-02-14T14:51:20.634467952-04:00 [INFO] Creating a descriptor pool for at most 16 sets
2025-02-14T14:51:20.644431949-04:00 [INFO] Creating a descriptor pool for at most 16 sets
2025-02-14T14:51:20.656434264-04:00 [INFO] Creating a descriptor pool for at most 256 sets
2025-02-14T14:51:20.694210996-04:00 [INFO] Creating a descriptor pool for at most 256 sets
2025-02-14T14:51:21.778143607-04:00 [INFO] perform;
2025-02-14T14:51:21.778269128-04:00 [INFO] authenticate;
2025-02-14T14:51:21.778388064-04:00 [INFO] read_command;
2025-02-14T14:51:21.77900151-04:00 [INFO] socket reader;
2025-02-14T14:51:28.488282768-04:00 [INFO] Opening main db
2025-02-14T14:54:22.179025001-04:00 [INFO] ignoring macOS specific set_edited
2025-02-14T14:54:23.218429191-04:00 [INFO] ignoring macOS specific set_edited
2025-02-14T14:57:47.19294309-04:00 [INFO] perform;
2025-02-14T14:57:47.193084072-04:00 [INFO] authenticate;
2025-02-14T14:57:47.19319849-04:00 [ERROR] error sending request for url (http://localhost:11434/api/tags)

Caused by:
    0: client error (Connect)
    1: tcp connect error: Connection refused (os error 111)
    2: Connection refused (os error 111)
2025-02-14T14:57:47.193432546-04:00 [INFO] perform;
2025-02-14T14:57:47.193531341-04:00 [INFO] authenticate;
2025-02-14T14:57:47.193623585-04:00 [INFO] perform;
2025-02-14T14:57:47.19373097-04:00 [INFO] authenticate;
2025-02-14T14:57:47.193832191-04:00 [INFO] read_command;
2025-02-14T14:57:47.193930503-04:00 [ERROR] error sending request for url (http://localhost:1234/api/v0/models)

Caused by:
    0: client error (Connect)
    1: tcp connect error: Connection refused (os error 111)
    2: Connection refused (os error 111)
2025-02-14T14:57:47.194156846-04:00 [INFO] read_command;
2025-02-14T14:57:47.194254222-04:00 [INFO] read_command;
2025-02-14T14:57:47.194614682-04:00 [INFO] socket reader;
2025-02-14T14:57:47.194975352-04:00 [INFO] socket reader;
2025-02-14T14:57:47.195167551-04:00 [INFO] socket reader;

Zed Version and System Specs

Zed: v0.173.9 (Zed)
OS: Linux X11 fedora 41
Memory: 15.4 GiB
Architecture: x86_64
GPU: AMD Radeon RX 570 Series (RADV POLARIS10) || radv || Mesa 24.3.4

@probably-neb probably-neb added ai Improvement related to Assistant, Copilot, or other AI features assistant AI feedback for Assistant (inline or panel) labels Feb 19, 2025
@probably-neb
Copy link
Contributor

Hey, thanks for reporting. This is definitely buggy behavior, and I hope to have this fixed for you soon!

@probably-neb probably-neb changed the title Can't change LLM model Can't change LLM model in assistant panel Feb 19, 2025
@maxdeviant
Copy link
Member

This seems to be the same issue as #24738.

@as-cii as-cii self-assigned this Feb 21, 2025
@as-cii
Copy link
Member

as-cii commented Feb 21, 2025

Thank you for the report, @TeijiW!

I can't seem to reproduce what you're seeing. Can you share your settings.json file? Also, can you try again with the latest Zed Stable? (v0.174.6) 🙏

@TeijiW
Copy link
Author

TeijiW commented Feb 21, 2025

Hi @as-cii!
Here is my settings.json.
Observations:

  • field default_open_ai_model appeared recently (now actually)
  • I've inserted "assistant" settings (except for "dock": "left") right now
  • Also, the version mandatory field for assistant appeared recently too
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
  "features": {
    "edit_prediction_provider": "zed"
  },
  // FONT SETUP
  "ui_font_size": 16,
  "ui_font_family": "RobotoMono Nerd Font",
  "ui_font_weight": 500,

  "buffer_font_size": 16.5,
  "buffer_font_family": "CaskaydiaCove Nerd Font Mono",
  // "buffer_line_height": { "custom": 1.8 },
  // END
  "theme": {
    "mode": "system",
    "light": "Catppuccin Latte",
    "dark": "One Dark"
  },
  "format_on_save": "on",
  "project_panel": {
    "dock": "right" // Move project panel (file tree) to right
  },
  "assistant": {
    "default_model": {
      "provider": "anthropic",
      "model": "claude-3-5-sonnet-latest"
    },
    "version": "2",
    "default_open_ai_model": "claude-3-5-sonnet",
    "default": "anthropic",
    "dock": "left" // Move assistant panel (IA chat) to left. IDK what is "version"
  },

  "languages": {
    "JavaScript": {
      "code_actions_on_format": {
        "source.fixAll.eslint": true
      }
    }
  },
  "language_models": {
    "anthropic": {
      "api_key": "MY-KEY",
      "api_url": "https://api.anthropic.com",
      "version": "1",
      "available_models": [
        {
          "name": "claude-3-5-sonnet",
          "display_name": "Claude 3.5 Sonnet",
          "max_tokens": 200000,
          "max_output_tokens": 8192,
          "cache_configuration": {
            "max_cache_anchors": 4,
            "min_total_token": 2048,
            "should_speculate": true
          }
        }
      ]
    }
  },
  // TEST
  "load_direnv": "shell_hook",
  "lsp": {
    "elixir-ls": {
      "binary": { "path_lookup": true }
    }
  }
  // TEST END
}

@TeijiW
Copy link
Author

TeijiW commented Feb 21, 2025

Now look it's working! Actually I don't know if I've done something or if is the fix from 0.174.6 version.
I'll not try to change the model, just keep using Claude 3.5 Sonnet haha

I noticed that now I'm not able to sign in, but I think it's another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai Improvement related to Assistant, Copilot, or other AI features assistant AI feedback for Assistant (inline or panel) linux
Projects
None yet
Development

No branches or pull requests

5 participants