[BUG] [admin] Prompt Playground/Evaluator/Experiment fail: Could not copy property 'outputSchema' from source to target (spring-ai 1.1.2 regression)

Author: XianReallyHot-ZZHCreated Jun 20, 2026Updated Sep 19, 2026
Labelskind/bugStaleneeds-triage

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Running a Prompt (Playground), an Evaluator debug, or an Experiment in the Admin console fails BEFORE any model call:

处理请求失败: Could not copy property 'outputSchema' from source to target

(prefix = PromptRunServiceImpl.run()'s catch message; suffix = Spring FatalBeanException). Thrown while building chat options, so it reproduces even with an unreachable/dummy model — only one enabled model is needed.

Expected Behavior

Prompt run / Evaluator / Experiment should build the provider ChatClient and stream a response without throwing.

Steps To Reproduce

  1. Start admin backend with one model configured (e.g. DeepSeek in model-config.yml).
  2. Console → Prompt 工程 → Playground → pick model → any template + message → Run.
  3. See the error; no model request is ever sent.

curl -N -X POST http://localhost:8080/api/prompt/run
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json'
-d '{"newSession":true,"promptKey":"x","version":"1.0.0","template":"hi {{q}}","variables":"{"q":"hi"}","modelConfig":"{"modelId":1}","message":"hi"}'

Environment

markdown
Spring AI Alibaba version(s): extensions 1.1.2.2 (observation-extension, dashscope); spring-ai 1.1.2; Spring Boot 3.3.6; JDK 17;
  provider DeepSeek (reproduced), OpenAI also affected.

Debug logs

Full stack trace is logged at PromptRunServiceImpl (~line 100, log.error("处理会话请求失败", e)). Root cause frame: org.springframework.beans.FatalBeanException: Could not copy property 'outputSchema' from source to target at org.springframework.beans.BeanUtils.copyProperties(...) at ...admin.service.client.DeepSeekObservationMetadataChatOptions.fromDeepSeekOptions(...)

Anything else?

Root cause: spring-ai 1.1.2 added StructuredOutputChatOptions (declares outputSchema). DeepSeekChatOptions implements ToolCallingChatOptions (extends StructuredOutputChatOptions) but does not override outputSchema. The three *ObservationMetadataChatOptions helpers bulk-copy a provider options object into a subclass via BeanUtils.copyProperties, which now aborts on the inherited outputSchema property.

Regression: StructuredOutputChatOptions is absent in spring-ai 1.0.0 / 1.1.0, present in 1.1.2+.

I have a ready fix + regression test (a safe per-property copy helper replacing the 3 BeanUtils.copyProperties sites) — will open a PR and link it here.

Source: alibaba/spring-ai-alibaba