Cloud Providers
Use Claude, Gemini, GPT, and other cloud LLM providers with WeftOS agents.
Cloud LLM Providers
WeftOS agents can use any cloud LLM provider through clawft's provider abstraction. The pipeline handles routing, cost tracking, and rate limiting automatically.
Supported Providers
clawft-llm ships these built-in provider entries (crates/clawft-llm/src/config.rs, the built-in provider list; each is an OpenAI-compatible endpoint except where the adapter says otherwise):
| Provider | Built-in name | Base URL |
|---|---|---|
| OpenAI | openai | https://api.openai.com/v1 |
| Anthropic | anthropic | https://api.anthropic.com/v1 |
| Google Gemini | gemini | https://generativelanguage.googleapis.com/v1beta/openai |
| Groq | groq | https://api.groq.com/openai/v1 |
| DeepSeek | deepseek | https://api.deepseek.com/v1 |
| Mistral | mistral | https://api.mistral.ai/v1 |
| Together | together | https://api.together.xyz/v1 |
| xAI | xai | https://api.x.ai/v1 |
| OpenRouter | openrouter | https://openrouter.ai/api/v1 |
| Local server | local, ollama | the configured local base URL, http://localhost:11434/v1 for ollama |
That is 11 entries. Earlier versions of this page used a google/ prefix and omitted Mistral and Together, and listed model families by version; model catalogs change faster than this page, so list them from the provider. The provider reference is docs/reference/config.md and docs/guides/providers.md.
Configuration
API keys
Set environment variables:
export ANTHROPIC_API_KEY="sk-ant-..."
export GOOGLE_GEMINI_API_KEY="AIza..."
export OPENAI_API_KEY="sk-..."Per-command
weft agent --model anthropic/claude-sonnet-4-6
weft agent --model gemini/gemini-2.5-pro
weft agent --model openai/gpt-4.1In config
[routing]
mode = "tiered"
[routing.tiers]
simple = "groq/llama-3.1-8b" # Fast, cheap
moderate = "anthropic/claude-haiku-4-5" # Balanced
complex = "anthropic/claude-sonnet-4-6" # Full powerTiered Routing
clawft's pipeline automatically routes requests to the right model based on complexity:
| Tier | Complexity | Latency | Cost | Use case |
|---|---|---|---|---|
| 1 | < 30% | ~500ms | Low | Simple questions, lookups |
| 2 | 30-70% | ~2s | Medium | Code generation, analysis |
| 3 | > 70% | ~5s | High | Architecture, security review |
The complexity classifier runs before the LLM call and routes accordingly. You save cost on simple tasks without sacrificing quality on complex ones.
[routing]
mode = "tiered"
complexity_threshold_low = 0.3
complexity_threshold_high = 0.7Cost Tracking
Every provider call is tracked:
weft status # Shows total token usage and estimated costThe cost_tracker.rs module records per-agent, per-provider token usage. The BudgetBlock in the GUI shows this in real-time.
Claude (Anthropic)
Claude is the recommended cloud provider for complex tasks:
export ANTHROPIC_API_KEY="sk-ant-..."
weft agent --model anthropic/claude-sonnet-4-6Supports:
- Streaming responses
- Tool use (function calling)
- Extended context (200K tokens)
- Vision (image analysis)
Gemini (Google)
Gemini excels at large-context tasks:
export GOOGLE_GEMINI_API_KEY="AIza..."
weft agent --model gemini/gemini-2.5-proSupports:
- 1M+ token context window
- Multimodal (text, image, audio, video)
- Code execution
- Grounding with Google Search
Mixing Local + Cloud
The tiered router can mix local and cloud providers:
[routing]
mode = "tiered"
[routing.tiers]
simple = "local/phi3" # Free, fast, local
moderate = "local/llama3.1" # Free, local
complex = "anthropic/claude-sonnet-4-6" # Cloud for hard problemsSimple tasks stay local (zero cost, zero latency). Complex tasks escalate to Claude. Your data for simple queries never leaves your machine.