Skip to content

title: CloudSlash - BYOK Language Models Reference description: Bring your own API key. CloudSlash routes DEVI through whatever model you configure: GPT-4, Claude, Gemini, or Ollama running locally. The fastest way to con...


BYOK Language Models

Bring your own API key. CloudSlash routes DEVI through whatever model you configure: GPT-4, Claude, Gemini, or Ollama running locally.

Interactive Setup

The fastest way to configure your AI provider:

cs config

The wizard walks you through:

  1. Provider: Ollama, OpenAI, Anthropic, Gemini, Groq, or custom endpoint
  2. API key: provider-specific input with placeholder hints
  3. Model: selected from the live list fetched from your provider

If your provider is unreachable (wrong key, network issue), model selection is skipped. Fix the key and re-run cs config.

Cloud Providers

Gemini

cs config set ai.provider gemini
cs config set ai.gemini_key "AIza..."

Or via environment:

export CLOUDSLASH_AI_MODEL=gemini-2.5-pro
export CLOUDSLASH_AI_KEY="AIza..."

OpenAI

cs config set ai.provider openai
cs config set ai.api_key "sk-..."

Anthropic

Claude

cs config set ai.provider anthropic
cs config set ai.anthropic_key "sk-ant-api..."

Groq

cs config set ai.provider groq
cs config set ai.api_key "gsk_..."
cs config set ai.base_url "https://api.groq.com/openai/v1"

Local Inference

Ollama

Run inference completely air-gapped with no external data egress.

  1. Install and start Ollama:
ollama serve
  1. Pull a model:
ollama pull llama3.2
  1. Configure CloudSlash:
cs config set ai.provider ollama

CloudSlash auto-detects Ollama at http://localhost:11434. To use a custom endpoint:

cs config set ai.ollama_endpoint "http://192.168.1.50:11434"

Manual Configuration

All settings live in ~/.cloudslash/config.yaml:

ai:
  provider: gemini
  model: gemini-2.5-pro
  gemini_key: "AIza..."

  # For Ollama:
  # provider: ollama
  # model: llama3.2
  # ollama_endpoint: "http://localhost:11434"

  # For custom OpenAI-compatible endpoints:
  # provider: other
  # model: my-model
  # api_key: "..."
  # base_url: "https://my-endpoint.com/v1"

Verification

Check that your AI backend is reachable:

cs doctor

The doctor command validates the configured provider, checks API key presence, and tests endpoint connectivity.