Update LLM Parameters
Overview
The admin-update-llm-params tool inserts or updates parameter sets that agents reference when joining a deployment. It enforces the capability catalog, drops unsupported knobs, and applies default values so downstream agents never receive invalid combinations.
Tool ID: admin-update-llm-params
The examples use the direct runtime/operator route. Replit/Admin UI browser
code should call the Admin UI BFF instead: local /admin-api/*, testing
/dashboard/admin-api/*.
Input Schema
{
deploymentName: string; // Required Azure deployment identifier
modelName?: string; // Optional fallback model name
temperature?: number; // 0-2
topP?: number; // 0-1
frequencyPenalty?: number; // -2 to 2
presencePenalty?: number; // -2 to 2
maxOutputTokens?: number; // Max tokens in response
actor?: {
id?: string; // Optional actor ID
name?: string; // Optional actor name, used as createdBy fallback
};
createdBy?: string; // Audit-friendly identifier
sourceSystem?: string; // Defaults to admin-dashboard
}
Only knobs supported by the registered capability catalog entry survive; unsupported keys are silently dropped to match the deployment’s allowed parameters.
Example Usage
cURL
curl -s -X POST "${MASTRA_BASE_URL}/admin/tools/update-llm-params" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${BEARER_TOKEN}" \
-d '{
"data": {
"deploymentName": "gpt-4o-mini",
"temperature": 0.4,
"topP": 0.95,
"maxOutputTokens": 1200,
"actor": {"name": "ops-bot"}
}
}'
Node.js
const response = await fetch(
`${MASTRA_BASE_URL}/admin/tools/update-llm-params`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.BEARER_TOKEN}`,
},
body: JSON.stringify({
data: {
deploymentName: 'gpt-4o-mini',
temperature: 0.4,
maxOutputTokens: 1200,
actor: { name: 'ops-bot' }
}
})
}
);
const result = await response.json();
console.log('Stored parameter set:', result);
Output
The tool returns the newly created LlmParam record, including:
deploymentName– Normalized deployment identifiermodelName– Catalog model name used for validationtemperature,topP,frequencyPenalty,presencePenalty,maxOutputTokens– Stored knobscreatedBy,sourceSystem– Audit fieldscreatedAt– ISO timestamp
Use Cases
- Seed parameter sets for new agent deployments
- Align agent defaults with capability catalog changes
- Update response length or randomness per deployment without editing code
- Automate overrides when diagnosing behavioral regressions
Related Tools
- Test LLM Model – Validate overrides before committing them
Implementation Notes
- The tool consults
server/model-capabilitiesto determine which knobs the deployment supports - Missing knobs receive capability-specific defaults via
applyCapabilityDefaults - The
actorobject serves as a friendly audit fallback forcreatedBy