alibaba/spring-ai-alibaba · error · BizException

AppTypeNotSupport

AppTypeNotSupport

Error message

App type [${appType}] is not supported.

What it means

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.

Source

Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/base/service/impl/AgentServiceImpl.java:208

			context.setRequest(request);
			context.setSource(context.getSource());
			LogUtils.monitor(context, "AgentService", "check", start, SUCCESS, request, null);
		}
		catch (BizException e) {
			LogUtils.monitor(context, "AgentService", "check", start, FAIL, request, e.getError(), e);
			throw e;
		}
	}

	/**
	 * Executes the agent request in streaming mode based on app type
	 */
	private Flux<AgentResponse> streamExecute(AgentContext context, AgentRequest request) {
		if (context.getAppType() == AppType.BASIC) {
			return basicAgentExecutor.streamExecute(context, request);
		}
		else {
			throw new BizException(ErrorCode.APP_TYPE_NOT_SUPPORT.toError(context.getAppType().getValue()));
		}
	}

	/**
	 * Executes the agent request based on app type
	 */
	private AgentResponse execute(AgentContext context, AgentRequest request) {
		if (context.getAppType() == AppType.BASIC) {
			return basicAgentExecutor.execute(context, request);
		}
		else if (context.getAppType() == AppType.WORKFLOW) {
			return workflowAgentExecutor.execute(context, request);
		}
		else {
			throw new BizException(ErrorCode.APP_TYPE_NOT_SUPPORT.toError(context.getAppType().getValue()));
		}
	}

View on GitHub (pinned to f82da0b50f)

Solutions

  1. Use an app whose type is BASIC (chatbot) for streaming agent calls.
  2. For WORKFLOW or other app types use the corresponding execution API/workflow runtime instead.
  3. Upgrade the admin module to a version that supports your app type in streamExecute.

Example fix

// before
// streaming a WORKFLOW-typed app
flux = agentService.streamCall(request, context); // throws
// after
// use workflow executor or a BASIC app
flux = basicApp ? agentService.streamCall(request, context)
                : workflowAgentExecutor.streamExecute(context, request);
Defensive patterns

Strategy: try-catch

Validate before calling

Application app = appService.getApp(request.getAppId());
if (app == null || app.getType() != AppType.BASIC) {
    throw new IllegalStateException("Streaming calls require a BASIC app; got: " + (app == null ? "null" : app.getType()));
}

Type guard

boolean supportsStreaming(Application app) {
    return app != null && app.getType() == AppType.BASIC;
}

Try / catch

try {
    return agentService.streamCall(request, context);
} catch (BizException e) {
    if (e.getMessage().contains("not supported")) {
        return routeToTypeSpecificExecutor(app.getType(), context, request);
    }
    throw e;
}

Prevention

When it happens

Trigger: streamCall on an app whose persisted type (app.getType()) is not BASIC — e.g. WORKFLOW or other types in the enum.

Common situations: 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.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09). Data as JSON: /api/errors/3ca00307d09f71fd. Report an issue: GitHub.