---
title: "Update configuration"
method: PATCH
path: "/api/config"
tags: ["config"]
---

# Update configuration

`PATCH /api/config`

Update CLI configuration at runtime with validation.

**Validation rules:**
- Integer fields (MAX_DEPTH, MAX_URLS, etc.) must be positive
- Model fields must be in `provider/model` format (e.g. `moonshotai/kimi-k2-thinking`)

## Request body

- ConfigUpdateRequest
  - `SAFE_MODE` boolean
  - `MAX_DEPTH` integer
  - `MAX_URLS` integer
  - `MAX_CONCURRENT_URL_AGENTS` integer
  - `MAX_CONCURRENT_REQUESTS` integer
  - `DEFAULT_MODEL` string — Format: provider/model
  - `CODE_MODEL` string — Format: provider/model
  - `ANALYSIS_MODEL` string — Format: provider/model
  - `MUTATION_MODEL` string — Format: provider/model
  - `SKEPTICAL_MODEL` string — Format: provider/model
  - `HEADLESS_BROWSER` boolean
  - `EARLY_EXIT_ON_FINDING` boolean
  - `STOP_ON_CRITICAL` boolean
  - `REPORT_ONLY_VALIDATED` boolean

## Response `200`

Configuration updated

- ConfigUpdateResponse
  - `updated` object
  - `message` string

## Other responses

- `400` — No fields to update
- `422` — Validation errors

---

[API](https://skmtc.dev/bugtraceai/apis/bugtraceai-cli-api.md) · [All operations](https://skmtc.dev/bugtraceai/apis/bugtraceai-cli-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bugtraceai/bugtraceai-cli-api/revisions/312bfc1148dc/schema)
