{"record":{"id":"3ca00307d09f71fd","repo":"alibaba/spring-ai-alibaba","slug":"apptypenotsupport","errorCode":"AppTypeNotSupport","errorMessage":"App type [${appType}] is not supported.","messagePattern":"App type \\[(.+?)\\] is not supported\\.","errorType":"error_code","errorClass":"BizException","httpStatus":400,"severity":"error","filePath":"spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/base/service/impl/AgentServiceImpl.java","lineNumber":208,"sourceCode":"\t\t\tcontext.setRequest(request);\n\t\t\tcontext.setSource(context.getSource());\n\t\t\tLogUtils.monitor(context, \"AgentService\", \"check\", start, SUCCESS, request, null);\n\t\t}\n\t\tcatch (BizException e) {\n\t\t\tLogUtils.monitor(context, \"AgentService\", \"check\", start, FAIL, request, e.getError(), e);\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\t/**\n\t * Executes the agent request in streaming mode based on app type\n\t */\n\tprivate Flux<AgentResponse> streamExecute(AgentContext context, AgentRequest request) {\n\t\tif (context.getAppType() == AppType.BASIC) {\n\t\t\treturn basicAgentExecutor.streamExecute(context, request);\n\t\t}\n\t\telse {\n\t\t\tthrow new BizException(ErrorCode.APP_TYPE_NOT_SUPPORT.toError(context.getAppType().getValue()));\n\t\t}\n\t}\n\n\t/**\n\t * Executes the agent request based on app type\n\t */\n\tprivate AgentResponse execute(AgentContext context, AgentRequest request) {\n\t\tif (context.getAppType() == AppType.BASIC) {\n\t\t\treturn basicAgentExecutor.execute(context, request);\n\t\t}\n\t\telse if (context.getAppType() == AppType.WORKFLOW) {\n\t\t\treturn workflowAgentExecutor.execute(context, request);\n\t\t}\n\t\telse {\n\t\t\tthrow new BizException(ErrorCode.APP_TYPE_NOT_SUPPORT.toError(context.getAppType().getValue()));\n\t\t}\n\t}\n","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/alibaba/spring-ai-alibaba/blob/f82da0b50f35744c13968191be2b1cd2452ef550/spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/base/service/impl/AgentServiceImpl.java#L190-L226","documentation":"BizException (APP_TYPE_NOT_SUPPORT) thrown by AgentServiceImpl.streamExecute for streaming calls when the app's type is anything other than AppType.BASIC. Only BASIC apps are supported in this streaming execution path; all other types fall into the else branch and throw.","triggerScenarios":"streamCall on an app whose persisted type (app.getType()) is not BASIC — e.g. WORKFLOW or other types in the enum.","commonSituations":"Switching an app from chatbot to workflow in the console while clients still use the streaming agent API; new app types added to the enum without support in streamExecute.","solutions":["Use an app whose type is BASIC (chatbot) for streaming agent calls.","For WORKFLOW or other app types use the corresponding execution API/workflow runtime instead.","Upgrade the admin module to a version that supports your app type in streamExecute."],"exampleFix":"// before\n// streaming a WORKFLOW-typed app\nflux = agentService.streamCall(request, context); // throws\n// after\n// use workflow executor or a BASIC app\nflux = basicApp ? agentService.streamCall(request, context)\n                : workflowAgentExecutor.streamExecute(context, request);","handlingStrategy":"try-catch","validationCode":"Application app = appService.getApp(request.getAppId());\nif (app == null || app.getType() != AppType.BASIC) {\n    throw new IllegalStateException(\"Streaming calls require a BASIC app; got: \" + (app == null ? \"null\" : app.getType()));\n}","typeGuard":"boolean supportsStreaming(Application app) {\n    return app != null && app.getType() == AppType.BASIC;\n}","tryCatchPattern":"try {\n    return agentService.streamCall(request, context);\n} catch (BizException e) {\n    if (e.getMessage().contains(\"not supported\")) {\n        return routeToTypeSpecificExecutor(app.getType(), context, request);\n    }\n    throw e;\n}","preventionTips":["Check app.getType() before choosing streaming vs workflow APIs.","Keep a mapping of AppType to supported endpoints in client code.","Re-verify app type after any console edit."],"tags":["unsupported","app-type","streaming"],"backgroundTag":"unsupported-operation","analyzedSha":"f82da0b50f35744c13968191be2b1cd2452ef550","analyzedAt":"2026-09-09T15:32:42.421Z","contentChangedAt":"2026-09-09T15:32:42.421Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}