Tools
LiteLLM
Set up LiteLLM with Cognitivers, then verify your connection.
Connects directly
Not an agent. A local proxy that speaks OpenAI outward and Anthropic inward, which is what makes Claude Code usable.
1. Before you begin
- LiteLLM installed and ready to configure.
- A Cognitivers API key. See authentication and key management.
Configuration location
A YAML file passed to the proxy
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.
model_list:
- model_name: cog-pro
litellm_params:
model: openai/cog-pro
api_base: https://api.cognitivers.com/v1
api_key: os.environ/COGNITIVERS_API_KEY
- model_name: cog-fast
litellm_params:
model: openai/cog-fast
api_base: https://api.cognitivers.com/v1
api_key: os.environ/COGNITIVERS_API_KEY
# Serve an Anthropic-shaped surface for Claude Code on port 4000
general_settings:
master_key: os.environ/LITELLM_MASTER_KEYCompatibility notes
- The openai/ prefix on the model string is what tells LiteLLM to use an OpenAI compatible endpoint.
- Do not add a path to api_base beyond /v1, or requests 404.
- Start it with litellm --config ./cognitivers.yaml. It listens on port 4000 by default.
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 a LiteLLM proxy is configured in front of Cognitivers.
- Upstream base URL: https://api.cognitivers.com/v1
- Model strings as LiteLLM needs them: openai/cog-fast, openai/cog-pro, openai/cog-embed
- Authentication: an API key in the Authorization header as "Bearer sk-cog-..."
Do these five things and then stop.
1. Validate the config file and start the proxy. Show me the exact command.
2. Send one chat request through the proxy to cog-fast and show the reply.
3. Send one request with streaming enabled and confirm the events pass through the proxy without being buffered.
4. If the proxy is also serving Claude Code, confirm which inbound protocol it accepts and send one request through that path too.
5. If any step fails, give me the exact error, the status code and the request that produced it, and stop. Do not print the key in full and do not write it into a tracked file.
If everything works, say so in one line.If the check fails, use the reported status code in the error reference and review the compatibility notes above.