alibaba/nacos · error · IllegalArgumentException
initialVersion status must be %s
Error message
initialVersion status must be %s
What it means
Error "initialVersion status must be %s" thrown in alibaba/nacos.
Source
Thrown at ai/src/main/java/com/alibaba/nacos/ai/service/agent/AgentPersistenceService.java:1045
throw new IllegalArgumentException(
"Agent create input must not contain read-only projection fields");
}
if (initialVersion.getContentDigest() != null || initialVersion.getCreateTime() != null
|| initialVersion.getUpdateTime() != null) {
throw new IllegalArgumentException(
"initialVersion must not contain read-only projection fields");
}
if (initialVersion.getNamespaceId() != null
&& !agent.getNamespaceId().equals(initialVersion.getNamespaceId())) {
throw new IllegalArgumentException("initialVersion namespaceId does not match Agent");
}
if (initialVersion.getAgentName() != null
&& !agent.getAgentName().equals(initialVersion.getAgentName())) {
throw new IllegalArgumentException("initialVersion agentName does not match Agent");
}
if (initialVersion.getStatus() != null
&& !expectedStatus.equals(initialVersion.getStatus())) {
throw new IllegalArgumentException("initialVersion status must be " + expectedStatus);
}
}
private void validateOnlineVersionInputs(String namespaceId, String agentName,
AgentVersionDetail version, String preferredLatest) {
AgentValidationUtils.validateNamespaceId(namespaceId);
AgentValidationUtils.validateAgentName(agentName);
if (version == null) {
throw new IllegalArgumentException("Agent Version must not be null");
}
AgentValidationUtils.validateVersion(version.getVersion());
if (version.getCallInterfaces() == null) {
throw new IllegalArgumentException("Online Agent Version must contain callInterfaces");
}
if (version.getNamespaceId() != null
&& !namespaceId.equals(version.getNamespaceId())) {
throw new IllegalArgumentException("Agent Version namespaceId does not match request");
}View on GitHub (pinned to 9b989acdf1)
Solutions
- Correct the invalid value for initialVersion status to match the expected format or allowed set, then retry.
When it happens
Trigger: Thrown at ai/src/main/java/com/alibaba/nacos/ai/service/agent/AgentPersistenceService.java:1045 when the library encounters an invalid state.
Common situations: initialVersion status is not the expected status for the operation.
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/5085b208c36606ea.
Report an issue: GitHub.