Skip to content

Model Configuration

UClaw offers a model-agnostic unified gateway, allowing you to configure LLM providers and models without changing your application code.

Model Selection

You can select a model using two patterns in AgentConfig:

1. Explicit Model IDs

You can specify a fully-qualified model ID to bind the agent to a specific LLM version. Supported model IDs include:

  • anthropic/claude-sonnet-4 (Standard capable model)
  • openai/gpt-4o
  • deepseek/deepseek-v4-pro
  • deepseek/deepseek-v4-flash

2. Model Tiers

Alternatively, you can specify a model tier. UClaw maps tiers dynamically to optimize latency, cost, and capacity:

  • fast: Maps to high-speed models, ideal for simple actions and fast chatting (default: deepseek/deepseek-v4-flash).
  • capable: Maps to reasoning-heavy models, ideal for coding, complex file editing, and advanced tool use (default: deepseek/deepseek-v4-pro).
javascript
// Specifying model tier in creation
const agent = await app.agents.create({
  title: "Systems engineer",
  config: {
    modelTier: "capable", // Automatically routes to a capable available model
    instructions: "You are a senior systems engineer.",
  },
});

Usage & Billing

UClaw calculates token billing dynamically based on input tokens, cache-read tokens, cache-write tokens, and output tokens.

If an account balance runs out, the agent run will fail with an insufficient balance error.

To learn how to manage environments for these agents, proceed to Environment Concept.