Your key will be deleted if you restart Zed. To store it permanently, you can set up your Scaleway secret key as OPENAI_API_KEY
environment variable and restart Zed.
Adding AI to to the Zed IDE using Generative APIs
Zed is an IDE (Integrated Development Environment) including AI coding assistance support. Scaleway’s Generative APIs support Zed AI code completion and more.
Before you startLink to this anchor
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- A valid API key for API authentication
- Installed Zed on your local machine
Configure custom endpoints and modelsLink to this anchor
-
Edit Zed settings located in
settings.json
, and add the following content to it:{"language_models": {"openai": {"api_url": "https://api.scaleway.ai/v1","available_models": [{"name": "qwen2.5-coder-32b-instruct","display_name": "Qwen 2.5 Coder 32B","max_tokens": 128000}],"version": "1"}},"assistant": {"default_model": {"provider": "openai","model": "qwen2.5-coder-32b-instruct"},"version": "2"}}This configuration will add a
qwen2.5-coder-32b-instruct
Scaleway hosted model available with the Zedopenai
provider, and use it as default model. -
Open AI Assistant configuration by either using the command palette and typing
assistant: show configuration
or clicking on the bottom right Assistant Panel button and then Assistant menu in top right and finally Configure. -
Scroll down to the OpenAI configuration, and paste your Scaleway secret key as API Key credentials.
Note -
Your setup is complete. If you open a new chat and select
Qwen 2.5 Coder 32B
model, you can send text and retrieve model answers. Additionally, you can use Inline Assist feature when editing your code.