zed
zed copied to clipboard
Unable to select Claude 3.5 Sonnet Zed model
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
When I open the assistant tab there is no model selected.
I select "Claude 3.5 Sonnet Zed" from the dropdown but nothing changes - it still says "No model selected"
If I "Open configuration" the message under "Zed" says "You must accept the terms of service to use this provider" but it's not clear where and how I can view and accept the terms.
Environment
Zed: v0.150.0 (Zed Preview) OS: macOS 15.0.0 Memory: 16 GiB Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
Initial assistant tab:
Available options:
After selecting the first options nothing changes and the assistant tab looks the same as before (1st screenshot)
If applicable, attach your Zed.log file to this issue.
Zed.log
2024-08-21T20:15:14.867709Z [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-08-21T20:15:15.058795Z [INFO] starting language server. binary path: "/Users/xxx/Library/Application Support/Zed/node/node-v22.5.1-darwin-x64/bin/node", working directory: "/", args: ["/Users/xxx/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-08-21T20:15:15.625514Z [INFO] add connection to peer
2024-08-21T20:15:15.626268Z [INFO] add_connection;
2024-08-21T20:15:15.627381Z [INFO] waiting for server hello
2024-08-21T20:15:15.629581Z [INFO] got server hello
2024-08-21T20:15:15.63115Z [INFO] set status to connected (connection id: ConnectionId { owner_id: 0, id: 0 }, peer id: PeerId { owner_id: 495, id: 29975 })
2024-08-21T20:15:15.632499Z [INFO] set status on client 102776: Connected { peer_id: PeerId { owner_id: 495, id: 29975 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2024-08-21T20:15:15.912811Z [WARN] request completed with error: failed to connect to the server
2024-08-21T20:15:16.109082Z [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
"level": 0,
"message": "[DEBUG] [agent] [2024-08-21T20:15:16.087Z] Agent service starting",
"metadataStr": "[DEBUG] [agent] [2024-08-21T20:15:16.087Z]",
"extra": [
"Agent service starting"
]
}
2024-08-21T20:15:16.125567Z [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
"registrations": [
{
"id": "68a696b2-5b40-469b-bd01-83f66f6dd8cb",
"method": "workspace/didChangeWorkspaceFolders",
"registerOptions": {}
}
]
}
2024-08-21T20:15:16.694574Z [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
"level": 1,
"message": "[INFO] [auth] [2024-08-21T20:15:16.693Z] Invalid copilot token: missing token: 403 ",
"metadataStr": "[INFO] [auth] [2024-08-21T20:15:16.693Z]",
"extra": [
"Invalid copilot token: missing token: 403 "
]
}
2024-08-21T20:15:16.695365Z [INFO] Language server with id 0 sent unhandled notification window/showMessageRequest:
{
"type": 2,
"message": "No access to GitHub Copilot found. You are currently logged in as xxx.",
"actions": [
{
"title": "Sign up for GitHub Copilot"
},
{
"title": "Dismiss"
}
]
}
2024-08-21T20:15:16.729718Z [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
"level": 0,
"message": "[DEBUG] [agent] [2024-08-21T20:15:16.701Z] Telemetry initialized",
"metadataStr": "[DEBUG] [agent] [2024-08-21T20:15:16.701Z]",
"extra": [
"Telemetry initialized"
]
}
2024-08-21T20:15:17.307729Z [INFO] set environment variables from shell:/bin/zsh, path:/Users/xxx/.nvm/versions/node/v18.18.2/bin:/Users/xxx/Library/pnpm:/Users/xxx/.bun/bin:/Users/xxx/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/xxx/.cargo/bin:/usr/local/bin
2024-08-21T20:15:26.745544Z [WARN] request completed with error: failed to connect to the server
2024-08-21T20:15:26.822309Z [ERROR] no worktrees when constructing ProjectLspAdapterDelegate
2024-08-21T20:15:36.48047Z [ERROR] Failed to write settings to file "/Users/xxx/.config/zed/settings.json"
Caused by:
0: failed to persist temporary file: Cross-device link (os error 18)
1: Cross-device link (os error 18)
2024-08-21T20:16:03.295359Z [ERROR] Failed to write settings to file "/Users/xxx/.config/zed/settings.json"
Caused by:
0: failed to persist temporary file: Cross-device link (os error 18)
1: Cross-device link (os error 18)
Seriously where do i accept these terms.
It will ask to accept the terms when you try to send the first message.
Gotcha. Got it to work. It is important to note that it only works in the assistant pane. Using the assistant anywhere else (inline, etc) gives an error.
It won't let me select the model in the first place, so I can't send a message (the "Send" button is disabled).
After clicking on the model in the dropdown I'm back to what the first screenshot shows, with "No LLM provider selected"
I see the following in the log right after I try to select a model:
Caused by: 0: failed to persist temporary file: Cross-device link (os error 18) 1: Cross-device link (os error 18) 2024-08-22T19:51:53.052829Z [ERROR] Failed to write settings to file "/Users/ext/xxx/.config/zed/settings.json"
I'm going to add the accept-terms form to the configuration page too, but I think the problem you're seeing, @thm76, is related by different: is it possible that your Zed config is a symlink or lives on a different drive or something like that?
I'm going to add the accept-terms form to the configuration page too, but I think the problem you're seeing, @thm76, is related by different: is it possible that your Zed config is a symlink or lives on a different drive or something like that?
My home folder is on a different volume from Zed Preview.app
In #16736 I'm adding the accept-tos thing to the configuration view, but I don't think that will fix the problem that you can't select the model.
The problem is that we can't write the settings file (in which we want to write the selected model):
2024-08-21T20:15:36.48047Z [ERROR] Failed to write settings to file "/Users/xxx/.config/zed/settings.json"
Caused by:
0: failed to persist temporary file: Cross-device link (os error 18)
1: Cross-device link (os error 18)
2024-08-21T20:16:03.295359Z [ERROR] Failed to write settings to file "/Users/xxx/.config/zed/settings.json"
Caused by:
0: failed to persist temporary file: Cross-device link (os error 18)
1: Cross-device link (os error 18)
I am having a (probably) related issue:
My settings.json is indeed a symlink because I like to maintain in in sync through nix home-manager.
Trying to switch the llm from the UI, (both alt-M or with the mouse) does not change the selected model...but if a restart the editor it seems it does.
I discovered the following:
- change the llm (alt-m or mouse, smae thing)
- i can see settings.json changed (need to close and re-open the file)
- no UI changes
- even though the settings.json got change, say, to ollama, if i prompt to the assistant i do not see request made to ollama, for which i assume the setting got changed, but the model wasn't in some app state
- if a reopen the editor, the changes are applied.
I was tailing logs while doing this and haven't seen anything related.
Two things caught my attention:
- I was a little bit surprised that switching the model from the UI would change my settings default_model. I guess I was expecting that to be just a session state and not changing my settings.json without noticing it.
- I supose that zed has a special watcher for settings.json different than for other (maybe also symlinked) files? because if I change externally that settings.json the buffer does not watch for those changes
I am having a (probably) related issue:
My settings.json is indeed a symlink because I like to maintain in in sync through nix home-manager.
Does that mean it's on a different disk volume? Because I too have my settings.json symlinked (~/.config/zed/settings.json points to ~/.dotfiles/zed_settings.json) and everything you described works.
It is the same volume, but because of the home manager way I found to make a symlink out of the store it seems that it is a symlink of a symlink:
❯ file .config/zed/settings.json
.config/zed/settings.json: symbolic link to /nix/store/cxh2i1kdjxfhnnzvcidyxnqprcwk038x-home-manager-files/.config/zed/settings.json
~
❯ file /nix/store/cxh2i1kdjxfhnnzvcidyxnqprcwk038x-home-manager-files/.config/zed/settings.json
/nix/store/cxh2i1kdjxfhnnzvcidyxnqprcwk038x-home-manager-files/.config/zed/settings.json: symbolic link to /nix/store/98bh5mivyh8sckhw96virbdpkpvm4q5f-hm_settings.json
~
❯ file /nix/store/98bh5mivyh8sckhw96virbdpkpvm4q5f-hm_settings.json
/nix/store/98bh5mivyh8sckhw96virbdpkpvm4q5f-hm_settings.json: symbolic link to /home/diegodorado/Code/nix-config/zed/settings.json
~
❯ file /home/diegodorado/Code/nix-config/zed/settings.json
/home/diegodorado/Code/nix-config/zed/settings.json: ASCII text
I may spend some time to see if I can remove that nested symlink if a single symlink worked for you @mrnugget
Thank you! That's good debugging information.
@mrnugget thanks for the assistance. Turns out that nested symlink was causing the issue... that was because I symlinked the settings.json and keymap.json alone... I switched to symlinking the whole folder and gitignore conversations and locks and now it works as intended
@diegodorado great! thanks for letting me know!
@thm76 does symlinking play a role in your setup? It didn't sound like it does, but I want to be sure.
@mrnugget There are no symlinks in my setup. My / is mounted from a different volume from /home - I think that might be the issue..
This comes up in the log in v0.153.3:
2024-09-12T08:19:33.679273+10:00 [ERROR] Failed to write settings to file "/Users/ext/xxx/.config/zed/settings.json"
Caused by: 0: failed to persist temporary file: Cross-device link (os error 18) 1: Cross-device link (os error 18)
Running it as administrator fixed it in my case
I'm going to go ahead and close this as stale. If you are still seeing this, please open a new issue with clear steps to reproduce and happy to investigate further.
Thanks all.
@thm76 I have the same problem. My home folder is on a different drive than /. Were you able to solve this?
No, I haven't been able to solve it.
@notpeter it might be worth reopening this?
@thm76 Just managed to get it to work. I suspect I need to do this for the keybindings too.
mv /Volumes/ExHome/k/.config/zed/settings.json /Volumes/Macintosh\ HD/Users/k/.config/zed/settings.json
ln -s /Volumes/Macintosh\ HD/Users/k/.config/zed/settings.json /Volumes/ExHome/k/.config/zed/settings.json
Copy the settings.json to internal drive. I mirrored the directory structure up from Users. Then created a symlink on the external drive, call it settings.json and point it to the text file in internal drive. In my setup, ExHome is external drive and Macintosh HD is internal drive. Restart Zed.
ls -l /Volumes/ExHome/k/.config/zed/settings.json
lrwxr-xr-x@ 1 k staff 55 Jan 30 12:58 /Volumes/ExHome/k/.config/zed/settings.json -> /Volumes/Macintosh HD/Users/k/.config/zed/settings.json
@kopparam @thm76 Can you take a look at the steps I described here:
- https://github.com/zed-industries/zed/issues/23907
And comment if this matches your configuration or if I'm missing something. Thanks for sharing your workaround @kopparam.
@notpeter #23907 describes the situation very well @kopparam 's workaround works for me, thanks a lot.
This is still an issue under home-manager.