Skip to content

LLM Provider Reference

Per-provider configuration for all backends supported by kdeps. Backend and API keys go in ~/.kdeps/config.yaml. See LLM Backends for routing, allowlists, and streaming.

Local Backends

Llamafile (Default)

The file backend is the default: models run as llamafiles - single self-contained binaries that kdeps downloads to ~/.kdeps/models/ and serves locally as an OpenAI-compatible server. No server install, no API key.

yaml
# ~/.kdeps/config.yaml
llm:
  backend: file   # this is the default - the line can be omitted entirely

Model names like llama3.2:1b are registry aliases resolved to Mozilla's HuggingFace llamafiles (kdeps llamafile list shows all; kdeps llamafile update refreshes the registry). The chat.model field also accepts a direct URL or a path to a .llamafile.

When building Docker images, the llamafiles for all chat models are pre-baked into the image - see Docker deployment.

GGUF (llama.cpp)

The gguf backend serves GGUF model files via llama-server (llama.cpp). Full parity with the file backend: alias resolution, URL download with progress bar, shared cache at ~/.kdeps/models/. llama-server is automatically downloaded and cached on first use — no manual install needed. Override with KDEPS_LLAMA_SERVER_BIN for a custom binary.

yaml
# ~/.kdeps/config.yaml
llm:
  backend: gguf
AliasModelQuantSize
qwen3.5-4bQwen3.5 4BQ5_K_S~3.1 GB
qwen3.5-8bQwen3.5 8BQ4_K_M~5.0 GB
llama3.2-3bLlama 3.2 3B InstructQ5_K_M~2.4 GB
llama3.1-8bLlama 3.1 8B InstructQ4_K_M~4.9 GB
phi4-miniPhi-4 MiniQ5_K_M~2.7 GB
gemma3-4bGemma 3 4BQ5_K_M~3.1 GB
mistral-7bMistral 7B v0.3Q4_K_M~4.4 GB
deepseek-r1-7bDeepSeek-R1 Distill 7BQ4_K_M~5.0 GB

The chat.model field also accepts a direct HuggingFace URL, an absolute/relative path to a .gguf, or a bare filename looked up in ~/.kdeps/models/.

Set KDEPS_GGUF_CTX_SIZE to override the context window (default: llama-server default).

Ollama (opt-in)

yaml
# ~/.kdeps/config.yaml
llm:
  backend: ollama
  # base_url: http://custom-ollama:11434   # optional override

When building Docker images, Ollama is installed when backend: ollama is set. The installOllama workflow flag can force or suppress this:

yaml
# workflow.yaml
settings:
  agentSettings:
    installOllama: true  # bake the ollama server into the image

Provider-specific resource options:

FieldTypeDescription
ollamaThinkboolEnable extended thinking (model must support it)
ollamaKeepAlivestringKeep model loaded after request (e.g. "5m", "-1" = forever, "0" = unload immediately)
ollamaPullModelboolAuto-pull model if not present locally
ollamaPullTimeoutstringTimeout for model pull (e.g. "10m")

Cloud Backends

Any API that implements the OpenAI chat completions API works with kdeps.

OpenAI

yaml
# ~/.kdeps/config.yaml
llm:
  backend: openai
  openai_api_key: sk-...
ModelDescription
gpt-4oLatest GPT-4 Omni
gpt-4o-miniSmaller, faster GPT-4
gpt-4-turboGPT-4 Turbo
gpt-3.5-turboFast, cost-effective

Provider-specific resource options:

FieldTypeDescription
openAILegacyMaxTokensboolSend max_tokens instead of max_completion_tokens (for Azure and older-compat servers)

Anthropic (Claude)

yaml
# ~/.kdeps/config.yaml
llm:
  backend: anthropic
  anthropic_api_key: sk-ant-...
ModelDescription
claude-sonnet-4-20250514Latest Claude Sonnet 4
claude-3-5-sonnet-20241022Claude 3.5 Sonnet
claude-3-opus-20240229Most capable Claude 3
claude-3-haiku-20240307Fast, efficient

Provider-specific resource options:

FieldTypeDescription
promptCachingboolAdd prompt-caching-2024-07-31 beta header for server-side caching
anthropicExtendedOutputboolEnable 128K output tokens (adds interleaved-thinking-2025-05-14 header)
anthropicBetaHeaderslistAdditional anthropic-beta header values
scenario[].cacheControlstringSet to "ephemeral" to mark a scenario message as a cache boundary

See LLM Backends - Anthropic for examples.

Google (Gemini / Vertex AI)

yaml
# ~/.kdeps/config.yaml
llm:
  backend: google
  google_api_key: ...   # AI Studio key; omit to use Application Default Credentials for Vertex AI
ModelDescription
gemini-1.5-proLatest Gemini Pro
gemini-1.5-flashFast inference
gemini-proStandard Gemini

Vertex AI: Set googleCloudProject and googleCloudLocation on the chat: resource to route to Vertex AI instead of AI Studio. See LLM Backends - Vertex AI.

Provider-specific resource options:

FieldTypeDescription
googleCachedContentstringName of a Google AI CachedContent resource to attach
googleHarmThresholdintSafety filter level: 0=default, 1=block-none, 2=block-few, 3=block-some, 4=block-most
googleCloudProjectstringVertex AI GCP project ID
googleCloudLocationstringVertex AI region (e.g. us-central1)

Mistral

yaml
# ~/.kdeps/config.yaml
llm:
  backend: mistral
  mistral_api_key: ...
ModelDescription
mistral-large-latestMost capable
mistral-medium-latestBalanced
mistral-small-latestFast, efficient
open-mistral-7bOpen-source 7B
open-mixtral-8x7bMoE model

Groq

Ultra-fast inference with Groq hardware.

yaml
# ~/.kdeps/config.yaml
llm:
  backend: groq
  groq_api_key: ...
ModelDescription
llama-3.1-70b-versatileLlama 3.1 70B
llama-3.1-8b-instantLlama 3.1 8B (fastest)
mixtral-8x7b-32768Mixtral with 32K context
gemma2-9b-itGoogle Gemma 2 9B

Together AI

yaml
# ~/.kdeps/config.yaml
llm:
  backend: together
  together_api_key: ...
ModelDescription
meta-llama/Meta-Llama-3.1-70B-Instruct-TurboLlama 3.1 70B
meta-llama/Meta-Llama-3.1-8B-Instruct-TurboLlama 3.1 8B
mistralai/Mixtral-8x7B-Instruct-v0.1Mixtral 8x7B
Qwen/Qwen2-72B-InstructQwen2 72B

Perplexity

Search-augmented LLM responses.

yaml
# ~/.kdeps/config.yaml
llm:
  backend: perplexity
  perplexity_api_key: ...
ModelDescription
llama-3.1-sonar-large-128k-onlineLarge with web search
llama-3.1-sonar-small-128k-onlineSmall with web search
llama-3.1-sonar-large-128k-chatLarge chat only

Cohere

yaml
# ~/.kdeps/config.yaml
llm:
  backend: cohere
  cohere_api_key: ...
ModelDescription
command-r-plusMost capable
command-rFast and capable
commandStandard
command-lightFast, efficient

DeepSeek

yaml
# ~/.kdeps/config.yaml
llm:
  backend: deepseek
  deepseek_api_key: ...
ModelDescription
deepseek-chatGeneral chat
deepseek-coderCode generation

xAI (Grok)

yaml
# ~/.kdeps/config.yaml
llm:
  backend: xai
  xai_api_key: xai-...
ModelDescription
grok-2Grok 2
grok-betaGrok beta
grok-vision-betaGrok with vision

OpenRouter

Access 100+ models from multiple providers through a single API.

yaml
# ~/.kdeps/config.yaml
llm:
  backend: openrouter
  openrouter_api_key: sk-or-...

Model names use the provider/model format, e.g. openai/gpt-4o, anthropic/claude-3.5-sonnet, meta-llama/llama-3.1-70b-instruct. See openrouter.ai/models for the full list.

Self-Hosted Solutions

kdeps works with any self-hosted solution that implements the OpenAI API: vLLM, Text Generation Inference (TGI), LocalAI, LlamaCpp Server.

yaml
# ~/.kdeps/config.yaml
llm:
  backend: openai
  base_url: http://your-vllm-server:8000/v1

Custom Base URL

Override the default API URL via base_url:

yaml
# Azure OpenAI
llm:
  backend: openai
  base_url: "https://my-resource.openai.azure.com/openai/deployments/my-deployment"
  openai_api_key: ...

See Also

Released under the Apache 2.0 License.