alibaba/nacos · warning · Error
The latest label is managed by the server
Error message
The latest label is managed by the server
What it means
Thrown by the Agent Detail page when the submitted labels JSON object contains a key named 'latest'. The 'latest' label is reserved and assigned automatically by the Nacos server to mark the most recent agent version, so clients are not allowed to set it manually.
Source
Thrown at console-ui/src/pages/AI/AgentDetail/AgentDetail.js:282
Message.success('Draft deleted');
this.setState({ selectedVersion: '', versionDetail: null }, () => {
this.loadOverview();
this.loadVersions(1);
});
})
.catch(error => Message.error(error.message))
.finally(() => this.setState({ actionLoading: false }));
};
updateLabels = () => {
let labels;
try {
labels = JSON.parse(this.state.labelsText);
if (!labels || Array.isArray(labels) || typeof labels !== 'object') {
throw new Error('Labels must be a JSON object');
}
if (Object.prototype.hasOwnProperty.call(labels, 'latest')) {
throw new Error('The latest label is managed by the server');
}
} catch (error) {
Message.error(error.message);
return;
}
agentApi
.updateLabels({
namespaceId: this.namespaceId(),
agentName: this.agentName(),
labels: JSON.stringify(labels),
})
.then(() => {
Message.success('Labels updated');
this.loadOverview();
})
.catch(error => Message.error(error.message));
};
View on GitHub (pinned to 9b989acdf1)
Solutions
- Remove the "latest" key from the labels object before submitting.
- Use a different key name for any custom label you intended.
- Rely on the server's automatic 'latest' assignment instead of setting it by hand.
Example fix
// before
{"latest":true,"env":"prod"}
// after
{"env":"prod"} Defensive patterns
Strategy: validation
Validate before calling
const RESERVED_LABELS = new Set(['latest']);
function hasReservedLabel(obj) {
return Object.keys(obj).some(k => RESERVED_LABELS.has(k));
} Try / catch
const labels = JSON.parse(text);
if (Object.prototype.hasOwnProperty.call(labels, 'latest')) {
Message.error("The 'latest' label is managed by the server");
return;
} Prevention
- Show reserved keys as disabled/blocked in the labels UI.
- Strip reserved keys automatically with a warning rather than rejecting.
- Document the reserved-label list for agent authors.
When it happens
Trigger: Including "latest" as a key in the labels JSON object in the Agent Detail labels editor, e.g. {"latest":true}.
Common situations: User tries to force a version to be 'latest' or copies labels from server output that already contains the reserved key.
Related errors
- Labels must be a JSON object
- agent.latestLabelManaged
- ${name} is required
- ${name} must be valid JSON
- transport must contain 1 to 64 letters, digits, +, or -
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/883741f12be247b4.
Report an issue: GitHub.