zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.24k stars 3.09k forks source link

Bug Report: Claude 3.5 Sonnet GitHub Copilot Integration Error #20784

Open egomango opened 1 day ago

egomango commented 1 day ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Issue Description: When attempting to use Claude 3.5 Sonnet through GitHub Copilot integration, receiving an API access error.

Error Message: Error interacting with language model Failed to connect to API: 400 Bad Request {"error":{ "message":"model access is not permitted per policy settings","param":"","code":"","type":""}}

Environment

Environment

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screenshot 2024-11-17 at 12 20 29

If applicable, attach your Zed.log file to this issue.

Zed.log ``` 2024-11-17T12:29:35.033714+01:00 [INFO] starting language server process. binary path: "/opt/homebrew/bin/node", working directory: "/", args: ["/Users/sababa/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"] 2024-11-17T12:29:35.308724+01:00 [INFO] Language server with id 0 sent unhandled notification LogMessage: { "level": 0, "message": "[DEBUG] [agent] [2024-11-17T11:29:35.306Z] Agent service starting", "metadataStr": "[DEBUG] [agent] [2024-11-17T11:29:35.306Z]", "extra": [ "Agent service starting" ] } 2024-11-17T12:29:35.310339+01:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability: { "registrations": [ { "id": "38e99482-49f3-4c3b-a626-9fe631aea3e4", "method": "workspace/didChangeWorkspaceFolders", "registerOptions": {} } ] } 2024-11-17T12:29:35.588302+01:00 [INFO] add connection to peer 2024-11-17T12:29:35.588522+01:00 [INFO] add_connection; 2024-11-17T12:29:35.588698+01:00 [INFO] waiting for server hello 2024-11-17T12:29:35.602885+01:00 [INFO] got server hello 2024-11-17T12:29:35.603127+01:00 [INFO] set status to connected (connection id: ConnectionId { owner_id: 0, id: 0 }, peer id: PeerId { owner_id: 608, id: 611916 }) 2024-11-17T12:29:35.603518+01:00 [INFO] set status on client 267339: Connected { peer_id: PeerId { owner_id: 608, id: 611916 }, connection_id: ConnectionId { owner_id: 0, id: 0 } } 2024-11-17T12:29:35.680824+01:00 [INFO] downloading language server "pyright" 2024-11-17T12:29:35.734857+01:00 [INFO] Language server with id 0 sent unhandled notification LogMessage: { "level": 0, "message": "[DEBUG] [agent] [2024-11-17T11:29:35.731Z] Telemetry initialized", "metadataStr": "[DEBUG] [agent] [2024-11-17T11:29:35.731Z]", "extra": [ "Telemetry initialized" ] } 2024-11-17T12:29:35.952995+01:00 [INFO] using project environment for language server LanguageServerName("pyright") 2024-11-17T12:29:35.953127+01:00 [INFO] starting language server process. binary path: "/opt/homebrew/bin/node", working directory: "/Users/sababa/AZTA", args: ["/Users/sababa/Library/Application Support/Zed/languages/pyright/node_modules/pyright/langserver.index.js", "--stdio"] 2024-11-17T12:29:36.211625+01:00 [INFO] language server 1: unregistered workspace/DidChangeWatchedFiles capability with id b5f869a4-ab8e-4d8c-a8f4-92faae8b13a5 ```
nathabonfim59 commented 1 day ago

I had the same problem when I first tried to use this model.

For now, Claude 3.5 Sonnet is in preview, and you need to opt in to access this model..

If you open through VS Code, they have a popup where you can enable the model, but in Zed, you need to adjust in your settings.

  1. Open your GitHub Settings (click your profile in the top right corner)
  2. Click into "Copilot"
  3. Select "Anthropic Claude 3.5 Sonnet in Copilot" and enable it

image