Skip to content

[Bug]:2.0版本调用deepseek-v4-flash 结构化输出异常 #1720

Closed

Description

@netsion

代码:

Msg response = agent.call(List.of(msg), AgentRepo.class, ctx).block();
AgentRepo result = response.getStructuredData(AgentRepo.class);

异常信息:
io.agentscope.core.model.exception.BadRequestException: HTTP transport error during streaming: HTTP request failed with status 400 | {"error":{"message":"This response_format type is unavailable now","type":"invalid_request_error","param":null,"code":"invalid_request_error"}} | Response body: {"error":{"message":"This response_format type is unavailable now","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}
at io.agentscope.core.model.exception.OpenAIException.create(OpenAIException.java:79)
at io.agentscope.core.model.OpenAIClient.lambda$stream$2(OpenAIClient.java:431)
at reactor.core.publisher.Flux.lambda$onErrorMap$28(Flux.java:7318)

环境信息:
AgentScope-Java Version: 2.0.0-RC3
Java Version: 17
OS: windows
Model: deepseek-v4-flash

Activity

  1. added
    bug
    on Jun 11, 2026
  2. added
    area/core/model
    on Jun 12, 2026
  3. Sparkle6979 commented on Jun 13, 2026

    @Sparkle6979
    Contributor

    This is the same root cause as #1742 — OpenAIChatModel.supportsNativeStructuredOutput() returns true for DeepSeek, which does not support response_format. See PR #1743 for a fix that adds automatic fallback to the synthetic generate_response tool path.

  4. moved this from Backlog to In progress in AgentScope Javaon Jun 13, 2026
  5. added a commit that references this issue on Jun 14, 2026
    47b69c3
  6. netsion commented on Jun 22, 2026

    @netsion
    Author

    Will this bug be merged into the next release controller (RC) soon? Thanks! @chickenlj

  7. moved this from In progress to Done in AgentScope Javaon Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/core/modelbug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions