iflytek/astron-agent · error · BusinessException
MODEL_URL_CHECK_FAILED
MODEL_URL_CHECK_FAILED
Error message
ResponseEnum.MODEL_URL_CHECK_FAILED
What it means
Generic failure wrapper for SSRF validation of model URLs inside workflow validation. When rebuilding/normalizing a model URL and validating host/IP rules via ssrfGuard.validateUrlParam throws an unexpected (non-Business) exception, it is logged and rethrown as MODEL_URL_CHECK_FAILED. BusinessExceptions from the guard are passed through unchanged.
Solutions
- Check the log line 'workflow model url check failed' for the underlying exception
- Correct the model URL: valid scheme, hostname, and port (e.g. https://host:8443)
- Confirm the host is not an internal/SSRF-protected address if the guard rejects it
- Verify the config-driven IP rules load correctly (configInfoMapper data intact)
Example fix
// before String url = "https://model host:notaport/v1"; // after String url = "https://model-host:8443/v1";
Defensive patterns
Strategy: validation
Validate before calling
try { new URI(url); } catch (URISyntaxException e) { throw new IllegalArgumentException("malformed model url: " + url); } Try / catch
try { workflowService.save(req); } catch (BusinessException e) { if ("MODEL_URL_CHECK_FAILED".equals(e.getCode().name())) { /* inspect and fix URL */ } throw e; } Prevention
- Validate model URLs with a URL parser before submitting
- Ensure hosts/ports are syntactically valid
- Keep SSRF IP-rule configuration data intact
When it happens
Trigger: Model endpoint URL that fails URL normalization/parsing (malformed URI syntax, invalid host or port) during the check; unexpected exception inside the SSRF guard or IP-rule loading.
Common situations: Typos in the model URL (missing scheme fragments, invalid port); URLs with characters URI.create rejects; DNS/IP-rule subsystem misconfigured so rule loading throws.
Understand the failure class
Background: "Invalid URL" / "URL cannot be empty": fix the malformed or missing URL behind request-construction failures — this error's family across 50 libraries.
Related errors
- Skill resource URL is not allowed
- MODEL_URL_CHECK_FAILED
- TOOLBOX_URL_HTTP_HTTPS_ONLY
- MODEL_URL_ILLEGAL_FAILED
- RESPONSE_FAILED
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/62c0aa268c4f1482.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java:2172
final boolean isAgent = node.getId().startsWith(WorkflowConst.NodeType.AGENT);
final String url = isAgent
? Optional.ofNullable(nodeParam.getJSONObject("modelConfig")).map(o -> o.getString("api")).orElse(null)
: nodeParam.getString("url");
if (StringUtils.isBlank(url)) {
continue;
}
ensureHttpLikeScheme(url);
try {
SsrfValidators.Normalized n = SsrfValidators.normalizeFlex(SsrfValidators.stripUserInfo(url));
URL norm = n.effectiveUrl;
String rebuilt = SsrfValidators.rebuildWithOriginalScheme(norm, n.originalScheme, n.wsLike);
String hostOnly = rebuilt + "://" + norm.getHost() + (norm.getPort() != -1 ? (":" + norm.getPort()) : "");
ssrfGuard.validateUrlParam(hostOnly);
} catch (BusinessException e) {
throw e;
} catch (Exception e) {
log.error("workflow model url check failed :", e);
throw new BusinessException(ResponseEnum.MODEL_URL_CHECK_FAILED);
}
}
}
private List<String> loadIpRules(String category) {
List<ConfigInfo> cfgList = configInfoMapper.getListByCategory(category);
if (cfgList == null || cfgList.isEmpty() || StringUtils.isBlank(cfgList.get(0).getValue())) {
return Collections.emptyList();
}
return Arrays.stream(cfgList.get(0).getValue().split(","))
.map(String::trim)
.filter(StringUtils::isNotBlank)
.distinct()
.toList();
}
private void ensureHttpLikeScheme(String url) {
String lower = StringUtils.left(url.trim(), 6).toLowerCase(Locale.ROOT);View on GitHub (pinned to 5e758547a8)