conductor-oss/conductor · error · IllegalArgumentException

OpenAPI document exceeds the 10 MiB payload limit

Error message

OpenAPI document exceeds the 10 MiB payload limit

What it means

Error "OpenAPI document exceeds the 10 MiB payload limit" thrown in conductor-oss/conductor.

Source

Thrown at agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/ListApiToolsTask.java:213

                logger.debug("Found spec at well-known path: {}", candidateUrl);
                return result;
            }
        }

        return null;
    }

    /** Returns a FetchResult if the response is valid JSON, otherwise null. */
    private FetchResult attemptFetch(String url, Map<String, String> headers) {
        try {
            HttpResponse<byte[]> response = sendWithValidatedRedirects(url, headers);

            if (response.statusCode() >= 400) {
                return null;
            }

            if (response.body().length > ExternalDataLimits.MAX_PAYLOAD_BYTES) {
                throw new IllegalArgumentException(
                        "OpenAPI document exceeds the 10 MiB payload limit");
            }
            String body = new String(response.body(), java.nio.charset.StandardCharsets.UTF_8);
            if (body == null || body.isBlank()) {
                return null;
            }

            // Quick check — if the response looks like HTML, skip JSON parsing
            String trimmed = body.stripLeading();
            if (trimmed.startsWith("<") || trimmed.startsWith("<!")) {
                return null;
            }

            JsonNode root = objectMapper.readTree(body);
            if (root == null || root.isMissingNode()) {
                return null;
            }
            return new FetchResult(url, root);

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Host the OpenAPI document behind a smaller/split spec or reduce it below the 10 MiB limit.
  2. Remove unused paths/schemas from the spec to shrink it.

When it happens

Trigger: Thrown at agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/ListApiToolsTask.java:213 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/5244305e2932c883. Report an issue: GitHub.