Skip to main content

Replace the AI agent's model strategy

PATCH 

/v1/brains/:brain_id/model-strategy

Replaces the entire model strategy atomically. The server validates each step, then runs DELETE+INSERT in a single transaction so concurrent readers never observe a partial state. Each step targets exactly one of three buckets: language_model_id (external BYOLLM, FK to language_models), language_model_alias (proxy SKU drawn from the LiteLLM proxy catalog), or neither (internal default). Per-channel chains are capped at 3 steps. Validation errors return a structured body identifying the offending step. Permissions - model_strategy.write. API keys - manage.

Request​

Responses​

Model strategy replaced