How do I connect Leiolai to Zed?
Add Leiolai as an OpenAI-compatible provider in Zed’s Agent settings, using the Leiolai /v1 API URL and leiolai-1 model ID. Store the API key through Zed’s key handling or an environment variable, then choose Leiolai for the agent conversation.
Where do I add the provider?
Open Agent settings, then LLM Providers, and add an OpenAI-compatible provider. Use https://api.leiolai.com/v1 for api_url. Add an available model with name leiolai-1 and display_name Leiolai 1.
Which context value should I enter in Zed?
Set max_tokens to 11000000 for Zed’s model context setting, reflecting Leiolai 1’s experimental context window. This client setting describes the amount of context; a finite request’s response cap is a separate API field.
Separate context from output lengthWhere does the API key belong?
Store your Leiolai API key in Zed’s keychain-backed key setting or the LEIOLAI_API_KEY environment variable. The environment value takes precedence over the keychain entry. Keep real credentials out of the settings JSON when that file is shared or tracked.
Keep the key privateWhich key restriction should I choose?
Use Leiolai Private only for confidential project work when the client does not send a mode field. Leiolai Research only is suitable for non-sensitive requests. An unrestricted key requires an explicit mode value with each request.
Choose the intended request modeDoes the provider setting change edit predictions?
No. Zed configures edit predictions separately. Select Leiolai for the Agent conversation in the model picker; use Zed’s edit-prediction settings for that editor feature.
Does adding the model automatically enable image input?
No. The Leiolai setup for Zed leaves image capability off. Leiolai’s API accepts base64 images, but Zed must expose image input and send the supported content blocks before that client can use the feature.
Supported image input formatsCan the agent use functions through Leiolai?
Leiolai supports client-defined function calls in the documented request formats. Keep the tool definitions and returned results compatible with that contract. A function request is executed by the client, which then returns the result.
Function-call round tripsWhat should I check if the provider cannot answer?
If Leiolai cannot answer in Zed, check the selected model, /v1 URL, key, and any mode conflict. Save the returned error code and request ID for a reproducible issue. Test a minimal text question before adding functions or other inputs.
Interpret the failure