Choosing a Model
Bahulam supports a wide range of language models. Which one you should use depends on your task, budget, and whether you bring your own keys.
Platform Default
If you use Bahulam with the platform default (no API key needed), you get DeepSeek V4 Flash — a fast, capable model included with your plan. The platform handles routing, caching, and billing automatically.
The platform also manages sub-agent routing. Explorer-style agents use fast, low-cost models for read-only context gathering, while planner and verification agents can use stronger reasoning models when policy allows it.
Named Modes
The platform maps intent to a pinned model so you don’t have to remember slugs:
| Mode | Purpose | Typical model |
|---|---|---|
fast | Quick edits, exploration | DeepSeek V4 Flash |
thinking | Balanced default | DeepSeek V4 Pro |
extra | Deeper reasoning | GLM 5.2 |
max | Maximum-thinking pass | Curated max-tier model |
Set a mode from the REPL:
/model fast
/model thinkingOr at launch:
bahulam --model thinkingWhich concrete model each mode maps to is a platform decision and can change without your action — that’s the point. Choosing a mode also preserves the prompt cache, since everyone in the fleet runs the same pinned model.
Curated Platform Catalog
/model list shows the harness-validated models — those the platform has
tested with the Bahulam prompt stack, with cost profiles tuned in the gateway.
Each row shows the model ID, a credit badge (~N cr/M in), and the tiers that
can select it.
Picking a model outside the curated list prints a warning:
! deepseek/deepseek-fake-model is not harness-validated for the platform
route — cost/quality untuned. See /model list.BYOK skips this check entirely — your key, your models.
How the catalog reaches the CLI: the CLI reads the shipped snapshot from
the installed runtime bundle first (so /model list works offline), then a
background refresh from GET /api/models overlays any drift. Force a fresh
pull with /model refresh; the command prints the fetch source, total model
count, curated model count, and refresh time before showing the catalog. Use
/model status to see the current catalog source and counts without changing
your selections. To stay entirely offline, set BAHULAM_MODEL_CATALOG_OFFLINE=1.
Session Overrides
Session /model picks (including named modes and the --route flag) are
mirrored into ~/.bahulam/config.json under model_config, model_mode,
and route_preference. They survive restarts and are read by the bundled
runtime as a fallback before hardcoded defaults.
The persistence is strictly session-driven — refreshing the catalog with
/model refresh never rewrites these keys. Use /model clear to reset all
overrides, or /model clear <role> to reset a single role.
At launch, precedence is: --model / --route CLI flags → ~/.bahulam/config.json
persisted picks → backend profile default → platform fallback.
Tier Ladder: Pro / Plus / Max
Bahulam has three paid tiers, each with increasing credits and entitlements.
| Feature | Pro | Plus | Max |
|---|---|---|---|
| Credits/month | 50,000 | 200,000 | 500,000 |
| BYOK | Yes | Yes | Yes |
| Workspace apps | 2 | 10 | 25 |
| Team members | — | — | 5 |
| Scheduled workflows | — | — | Yes |
| MCP connections | — | — | Yes |
Credits are consumed per token processed through the platform gateway. Different models cost different credit amounts — faster/cheaper models cost fewer credits per token.
BYOK (Bring Your Own Key) lets you connect your own provider key. Model calls still route through Bahulam Gateway for a consistent execution path, but the provider bills your key directly and platform model credits are not used.
Fast Model Quotas
On the platform default, sub-agents are automatically routed to the most cost-effective model for each role:
- Explorer (read-only search, grep, file listing) — uses a fast, cheap model with large context (e.g., DeepSeek V4 Flash, Gemini 2.5 Flash)
- Planner (architecture design, reasoning) — uses a capable reasoning model (e.g., Claude Sonnet, DeepSeek V4 Pro)
These sub-agent calls are included in your plan’s credits. You can customize which models are used for each role in Settings.
When to Use BYOK
BYOK makes sense when:
- You already have API keys with Anthropic, OpenAI, or OpenRouter
- You want access to specific models not available on the platform default (e.g., Claude Opus, GPT-4.1, Gemini 2.5 Pro)
- You want to use your own billing — platform model credits are not consumed when BYOK is active
- You need provider-specific model access while keeping Bahulam Gateway traces, usage accounting, and policy enforcement
Setting up BYOK
- Go to Settings → API Keys on bahulam.ai
- Add your API key for the provider you want to use
- Select the model you want from the available list
You can also set the key via environment variable:
export OPENROUTER_API_KEY="sk-or-v1-..."
bahulamAvailable Models
| Model | Provider | Best For |
|---|---|---|
| DeepSeek V4 Flash | DeepSeek | Fast everyday coding, exploration |
| DeepSeek V4 Pro | DeepSeek | Complex reasoning, large refactors |
| Claude Sonnet 4.6 | Anthropic | Balanced speed/quality |
| Claude Opus 4.6 | Anthropic | Maximum accuracy, hard problems |
| Claude Haiku 4.5 | Anthropic | Quick edits, fast feedback |
| Gemini 2.5 Pro | 1M context, long-file analysis | |
| Gemini 2.5 Flash | Fast, cheap, large context | |
| GPT-4.1 | OpenAI | General coding, complex tasks |
| GPT-4.1 Mini | OpenAI | Quick, lightweight |
| Qwen3 Coder | Alibaba | Strong coding performance |
| Llama 4 Maverick | Meta | Open model, good generalist |
| Grok 3 | xAI | Reasoning-heavy tasks |
The full model list is available in the Settings page and can be filtered by provider, cost, and capability.
Sub-Agent Model Routing
Bahulam uses a multi-agent architecture. When you give it a task:
- Primary agent — owns the turn, final answer, edits, and tests
- Explorer — reads files, searches code, gathers context
- Planner / verifier / debugger — handles a bounded specialist pass
- Primary agent — synthesizes the handoff and continues
Each role can use a different model. By default, read-only agents use a fast/cheap model and reasoning-heavy agents use a more capable model. You can customize these in Settings → Models and in user-defined agent YAML.
See Agents & Sub-Agents for the YAML shape and execution flow.
Recommended combinations:
| Use Case | Explorer | Planner |
|---|---|---|
| Daily coding | DeepSeek V4 Flash | Claude Sonnet 4.6 |
| Maximum quality | Claude Haiku 4.5 | Claude Opus 4.6 |
| Large context | Gemini 2.5 Flash | Gemini 2.5 Pro |
| Cost-sensitive | Qwen3 Coder (Free) | DeepSeek V4 Flash |