Tools
Zed
Set up Zed with Cognitivers, then verify your connection.
Connects directly
The most precise fit for our stack: it exposes the request-shape switches other editors hide.
1. Before you begin
- Zed installed and ready to configure.
- A Cognitivers API key. See authentication and key management.
Configuration location
~/.config/zed/settings.json or .zed/settings.json
Need an API key? Request access before running these examples.
2. Configure the connection
Apply the following configuration in the location above. Replace credential placeholders with your own key; keep secrets out of version control.
{
"language_models": {
"openai_compatible": {
"cognitivers": {
"api_url": "https://api.cognitivers.com/v1",
"available_models": [
{
"name": "cog-fast",
"display_name": "Cognitivers Fast",
"max_tokens": 32768,
"capabilities": { "tools": true, "images": false },
"max_tokens_parameter": true
},
{
"name": "cog-pro",
"display_name": "Cognitivers Pro",
"max_tokens": 32768,
"capabilities": { "tools": true, "images": false },
"max_tokens_parameter": true
}
]
}
}
}
}Compatibility notes
- capabilities.max_tokens_parameter defaults to false, which sends max_completion_tokens. Set it to true to send max_tokens.
- The key is not stored in settings.json: Zed reads it from an environment variable named after the provider, COGNITIVERS_API_KEY.
- Tab completion is a separate feature (edit_predictions) and needs a /v1/completions endpoint, which this API does not serve.
3. Verify the setup
Use this prompt in your configured tool to check authentication, a response and streaming. It reports failures without printing your key.
Open verification prompt
You are working in a repository where I have configured Zed to use Cognitivers as its model provider.
The API is OpenAI-compatible chat completions.
- Base URL: https://api.cognitivers.com/v1
- Streaming: use the same base URL with stream: true
- Models: cog-fast (agents, pipelines, volume), cog-pro (one hard task), cog-embed (retrieval)
- Authentication: an API key in the Authorization header as "Bearer sk-cog-..."
Do these four things and then stop.
1. Check that the credential is present in my environment and tell me the name of the variable you found it in. Do not print the key itself, not even partially.
2. Send one non-streaming chat completion asking for a single short sentence, using cog-fast. Show me the exact command or code you used and the model's reply.
3. Send the same request with streaming enabled and confirm you received server-sent events, not one buffered body.
4. If any step fails, tell me the exact error, the status code and the request that produced it, then stop. Do not try more than two fixes, and do not change any configuration file without showing me the diff first.
Rules: never write the key into a file that is tracked by git, never print it in full, and if the request works, say so in one line instead of writing a report.
5. Zed hides the request shape behind one setting. Confirm whether the API is receiving max_tokens or max_completion_tokens, and set capabilities.max_tokens_parameter accordingly.If the check fails, use the reported status code in the error reference and review the compatibility notes above.