spring-projects / spring-projects/spring-ai

com.fasterxml.jackson.databind.JsonMappingException: Unexpected end-of-input: was expecting closing quote for a string value at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 43, column: 43]

Open
#3,748 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

Image

调用gpt4.1报错,大模型输出的结果被截断导致反序列化失败,怀疑是completionTokens超过了1024,但我并没有显式设置token任何长度限制的参数。

是spring ai本身对模型输出长度做了限制吗?请问怎么解决?

Here is the English translation:

Calling GPT-4.1 results in an error. The output from the large model is being truncated, causing deserialization to fail. I suspect that the completionTokens exceeded 1024, but I did not explicitly set any token length limit parameters.

Does Spring AI itself impose a limit on the output length of the model? How can I resolve this issue?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files, tests, or entry points are identified. Start by reproducing the GPT-4.1 call and tracing the response through Spring AI to Jackson deserialization, while checking the configured output-token limits. Done means identifying whether Spring AI truncates the response and documenting or fixing the responsible limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
ai, backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.