iflytek/astron-agent · warning

Failed to determine multi-file parameter support: botId=

Error message

Failed to determine multi-file parameter support: botId={}

What it means

A warn log when determining whether the bot supports multi-file parameters fails — e.g. parsing extraInputsConfig JSON or running BotFileParamUtil.isMultiFileParam throws. Defaults to the initial isMultiFileParam value (false) so the publish flow continues.

Solutions

  1. Inspect the logged stack trace to find the malformed config
  2. Fix the extra_inputs_config JSON on the bot's langchain record
  3. Harden BotFileParamUtil to tolerate unknown/legacy parameter shapes

Example fix

// before
List<JSONObject> extraInputsConfig = JSONArray.parseArray(chainInfo.getExtraInputsConfig(), JSONObject.class);
// after
List<JSONObject> extraInputsConfig = parseLeniently(chainInfo.getExtraInputsConfig()); // skip invalid entries, log per-element errors
Defensive patterns

Strategy: try-catch

When it happens

Trigger: findOneByBotId returns data with malformed extraInputsConfig JSON, or BotFileParamUtil throws on unexpected parameter structure.

Common situations: Legacy bots with old extra_inputs_config format; manually edited config JSON in DB; null/invalid array elements in the config.

Understand the failure class

Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.

Related errors


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/7c1383b6b7ca23d6. Report an issue: GitHub.

Appendix: source

Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/publish/impl/BotPublishServiceImpl.java:571

        } catch (Exception e) {
            log.warn("Failed to get workflow config for market prepare: botId={}", botId, e);
        }

        // Set bot basic info
        marketData.setBotName(botDetail.getBotName());
        marketData.setBotDescription(botDetail.getBotDesc());
        marketData.setBotAvatar(null);

        // Set multi-file parameter support based on extraInputsConfig
        boolean isMultiFileParam = false;
        try {
            UserLangChainInfo chainInfo = userLangChainDataService.findOneByBotId(botId);
            if (chainInfo != null && chainInfo.getExtraInputsConfig() != null) {
                List<JSONObject> extraInputsConfig = JSONArray.parseArray(chainInfo.getExtraInputsConfig(), JSONObject.class);
                isMultiFileParam = BotFileParamUtil.isMultiFileParam(botId, extraInputsConfig);
            }
        } catch (Exception e) {
            log.warn("Failed to determine multi-file parameter support: botId={}", botId, e);
        }
        marketData.setBotMultiFileParam(isMultiFileParam);

        // Set suggested tags and categories
        marketData.setSuggestedTags(List.of("AI Assistant", "Productivity Tool"));
        marketData.setCategoryOptions(List.of("Education", "Finance", "Healthcare", "Customer Service"));

        return marketData;
    }

    private McpPrepareDto getMcpPrepareData(Integer botId, BotDetailResponseDto botDetail, String currentUid, Long spaceId) {
        log.info("Getting MCP prepare data: botId={}", botId);

        McpPrepareDto result = new McpPrepareDto();
        result.setPublishType(ReleaseTypeEnum.MCP.name());

        // TODO: Implement MCP prepare data logic
        // For now, return basic structure

View on GitHub (pinned to 5e758547a8)