Skip to content

Constructor for Anthropic3ChatOptions is not public #1920

@bruno-oliveira

Description

@bruno-oliveira

Bug description
When passing custom prompt ChatOptions to Anthropic3 model calls, since the constructor is not public, this means that the reflection and/or JSON merging properties can't happen, and the call would fail.

Environment
Sprint AI 1.0.0-M4
Java 21
Springboot 3.3.0

Steps to reproduce
Trying to set ChatOptions in a prompt call to the BedrockAnthropic3 model fails due to constructor lack of visibility.

Expected behavior
Options should be set and work correctly

Minimal Complete Reproducible example

chatModel.stream(new Prompt(messages, ChatOptionsBuilder.setTemperature(0.0).build()));

fails if the underlying model is from Anthropic3 bean-family.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions