Partially update one of the caller's configs; absent fields keep their
Partially update one of the caller’s configs; absent fields keep their
current value. Use POST /api/llm-configs/{id}/default to change the default.
curl --request PATCH \
--url https://api.example.com/api/llm-configs/{id} \
--header 'Content-Type: application/json' \
--data '
{
"api_key_secret_name": "<string>",
"fallback_models": [
"<string>"
],
"max_tokens": 123,
"model": "<string>",
"name": "<string>",
"pinned": true,
"pinned_model": "<string>",
"provider": "<string>",
"secret_value": "<string>",
"temperature": 123,
"tier1_model": "<string>",
"tier2_model": "<string>",
"tier3_model": "<string>"
}
'import requests
url = "https://api.example.com/api/llm-configs/{id}"
payload = {
"api_key_secret_name": "<string>",
"fallback_models": ["<string>"],
"max_tokens": 123,
"model": "<string>",
"name": "<string>",
"pinned": True,
"pinned_model": "<string>",
"provider": "<string>",
"secret_value": "<string>",
"temperature": 123,
"tier1_model": "<string>",
"tier2_model": "<string>",
"tier3_model": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
api_key_secret_name: '<string>',
fallback_models: ['<string>'],
max_tokens: 123,
model: '<string>',
name: '<string>',
pinned: true,
pinned_model: '<string>',
provider: '<string>',
secret_value: '<string>',
temperature: 123,
tier1_model: '<string>',
tier2_model: '<string>',
tier3_model: '<string>'
})
};
fetch('https://api.example.com/api/llm-configs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/llm-configs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'api_key_secret_name' => '<string>',
'fallback_models' => [
'<string>'
],
'max_tokens' => 123,
'model' => '<string>',
'name' => '<string>',
'pinned' => true,
'pinned_model' => '<string>',
'provider' => '<string>',
'secret_value' => '<string>',
'temperature' => 123,
'tier1_model' => '<string>',
'tier2_model' => '<string>',
'tier3_model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/llm-configs/{id}"
payload := strings.NewReader("{\n \"api_key_secret_name\": \"<string>\",\n \"fallback_models\": [\n \"<string>\"\n ],\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"pinned\": true,\n \"pinned_model\": \"<string>\",\n \"provider\": \"<string>\",\n \"secret_value\": \"<string>\",\n \"temperature\": 123,\n \"tier1_model\": \"<string>\",\n \"tier2_model\": \"<string>\",\n \"tier3_model\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/api/llm-configs/{id}")
.header("Content-Type", "application/json")
.body("{\n \"api_key_secret_name\": \"<string>\",\n \"fallback_models\": [\n \"<string>\"\n ],\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"pinned\": true,\n \"pinned_model\": \"<string>\",\n \"provider\": \"<string>\",\n \"secret_value\": \"<string>\",\n \"temperature\": 123,\n \"tier1_model\": \"<string>\",\n \"tier2_model\": \"<string>\",\n \"tier3_model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/llm-configs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key_secret_name\": \"<string>\",\n \"fallback_models\": [\n \"<string>\"\n ],\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"pinned\": true,\n \"pinned_model\": \"<string>\",\n \"provider\": \"<string>\",\n \"secret_value\": \"<string>\",\n \"temperature\": 123,\n \"tier1_model\": \"<string>\",\n \"tier2_model\": \"<string>\",\n \"tier3_model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {},
"message": "<string>",
"status_code": 200
}Path Parameters
LLM config id
Body
Partial update — every field is optional. Absent fields keep their current value.
is_default is not touched here — use POST /llm-configs/{id}/default.
Response
data is the updated config object (id, name, provider, model, fallback_models, temperature, max_tokens, api_key_secret_name, pinned, pinned_model, tier1_model, tier2_model, tier3_model, is_default, created_at, updated_at)
Doc-only schema for the standard MCP ApiResponse envelope
({"data": …, "status_code": N, "message": "…"}). Most /api/mcp/*
payloads are service-layer serde_json::Value views, so data is
documented as a free-form object; each route's response description says
what it carries.
curl --request PATCH \
--url https://api.example.com/api/llm-configs/{id} \
--header 'Content-Type: application/json' \
--data '
{
"api_key_secret_name": "<string>",
"fallback_models": [
"<string>"
],
"max_tokens": 123,
"model": "<string>",
"name": "<string>",
"pinned": true,
"pinned_model": "<string>",
"provider": "<string>",
"secret_value": "<string>",
"temperature": 123,
"tier1_model": "<string>",
"tier2_model": "<string>",
"tier3_model": "<string>"
}
'import requests
url = "https://api.example.com/api/llm-configs/{id}"
payload = {
"api_key_secret_name": "<string>",
"fallback_models": ["<string>"],
"max_tokens": 123,
"model": "<string>",
"name": "<string>",
"pinned": True,
"pinned_model": "<string>",
"provider": "<string>",
"secret_value": "<string>",
"temperature": 123,
"tier1_model": "<string>",
"tier2_model": "<string>",
"tier3_model": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
api_key_secret_name: '<string>',
fallback_models: ['<string>'],
max_tokens: 123,
model: '<string>',
name: '<string>',
pinned: true,
pinned_model: '<string>',
provider: '<string>',
secret_value: '<string>',
temperature: 123,
tier1_model: '<string>',
tier2_model: '<string>',
tier3_model: '<string>'
})
};
fetch('https://api.example.com/api/llm-configs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/llm-configs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'api_key_secret_name' => '<string>',
'fallback_models' => [
'<string>'
],
'max_tokens' => 123,
'model' => '<string>',
'name' => '<string>',
'pinned' => true,
'pinned_model' => '<string>',
'provider' => '<string>',
'secret_value' => '<string>',
'temperature' => 123,
'tier1_model' => '<string>',
'tier2_model' => '<string>',
'tier3_model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/llm-configs/{id}"
payload := strings.NewReader("{\n \"api_key_secret_name\": \"<string>\",\n \"fallback_models\": [\n \"<string>\"\n ],\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"pinned\": true,\n \"pinned_model\": \"<string>\",\n \"provider\": \"<string>\",\n \"secret_value\": \"<string>\",\n \"temperature\": 123,\n \"tier1_model\": \"<string>\",\n \"tier2_model\": \"<string>\",\n \"tier3_model\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/api/llm-configs/{id}")
.header("Content-Type", "application/json")
.body("{\n \"api_key_secret_name\": \"<string>\",\n \"fallback_models\": [\n \"<string>\"\n ],\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"pinned\": true,\n \"pinned_model\": \"<string>\",\n \"provider\": \"<string>\",\n \"secret_value\": \"<string>\",\n \"temperature\": 123,\n \"tier1_model\": \"<string>\",\n \"tier2_model\": \"<string>\",\n \"tier3_model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/llm-configs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key_secret_name\": \"<string>\",\n \"fallback_models\": [\n \"<string>\"\n ],\n \"max_tokens\": 123,\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"pinned\": true,\n \"pinned_model\": \"<string>\",\n \"provider\": \"<string>\",\n \"secret_value\": \"<string>\",\n \"temperature\": 123,\n \"tier1_model\": \"<string>\",\n \"tier2_model\": \"<string>\",\n \"tier3_model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {},
"message": "<string>",
"status_code": 200
}