Update Model Configuration
Page Outline
Replaces or partially updates the training configuration for a model. Changes take effect on the next training run.
Base Path: /api/v1/models
Method: PUT
Path: /{model_id}/config
Auth: Requires a valid Bearer token (Authorization: Bearer <JWT>)
Path Parameters
| Parameter | Type | Description |
|---|---|---|
model_id | string | Unique identifier of the model |
Request Body
{
"algorithm": "lightgbm",
"target_column": "churned",
"feature_columns": ["age", "tenure", "monthly_spend", "support_tickets"],
"hyperparameters": {
"n_estimators": 300,
"max_depth": 8,
"learning_rate": 0.03
},
"preprocessing": {
"handle_missing": "median",
"scale_features": true
}
}
| Field | Type | Description |
|---|---|---|
algorithm | string | Algorithm override: xgboost, lightgbm, random_forest, logistic_regression, auto |
target_column | string | Column name to predict |
feature_columns | string[] | List of input feature column names |
hyperparameters | object | Key-value pairs passed directly to the algorithm |
preprocessing | object | Preprocessing pipeline configuration |
Behavior
- Uses PUT semantics — the entire config is replaced. Use Get Config first to ensure you preserve any fields you do not intend to change.
- Config updates are blocked while the model is in
trainingstatus; returnsHTTP 409. - Validates that
target_columnandfeature_columnsdo not overlap. - An audit log entry is written with action
model.config_updated, recording the previous and new config.
Response
Returns the full updated ModelConfig object (same schema as Get Config).