Configuration
Keys and preferences live in ~/.sparse/ and are editable from the desktop app’s Settings.
Per-repo overrides
Section titled “Per-repo overrides”An optional sparse.config.ts, sparse.config.js or sparse.config.json at the repo root adds overrides for that repo:
export default { providers: [ { name: 'openrouter', adapter: 'openai_compat', baseURL: 'https://openrouter.ai/api/v1', apiKeyEnv: 'OPENROUTER_API_KEY', models: { 'anthropic/claude-sonnet-4.5': { pricePer1MIn: 3, pricePer1MOut: 15, contextWindow: 200_000, }, }, }, ], routes: { default: 'openrouter,anthropic/claude-sonnet-4.5' }, validators: { test: 'pnpm test', lint: 'pnpm lint', typecheck: 'pnpm typecheck' }, workflows: { handoff: true, dualPlan: true, maxHandoffPasses: 3 }, costCeilings: { perRun: 2.50, perDay: 25.00 },};| Key | What it does |
|---|---|
providers |
Add or override providers and their models, including prices and context windows. |
routes |
Force a default route (provider,model). |
validators |
The commands Sparse runs to check a change: tests, lint, typecheck. |
workflows |
Agent handoffs, dual planning, and how many handoff passes to allow. |
costCeilings |
Spending caps per run and per day. |
Local models
Section titled “Local models”Point Sparse at Ollama to route to models running on your machine.
Web search
Section titled “Web search”Optional Tavily or Brave keys unlock the agent’s web_search tool. web_fetch works without them.