Skip to content

GH-6120: Add REQUIRED constant to ToolChoiceBuilder in DeepSeek and MiniMax APIs#6157

Open
suryateja-g13 wants to merge 1 commit into
spring-projects:mainfrom
suryateja-g13:gh-6120-toolchoicebuilder-required
Open

GH-6120: Add REQUIRED constant to ToolChoiceBuilder in DeepSeek and MiniMax APIs#6157
suryateja-g13 wants to merge 1 commit into
spring-projects:mainfrom
suryateja-g13:gh-6120-toolchoicebuilder-required

Conversation

@suryateja-g13
Copy link
Copy Markdown
Contributor

Summary

  • Adds REQUIRED constant to ToolChoiceBuilder in DeepSeekApi and MiniMaxApi
  • REQUIRED forces the model to call at least one tool, but allows it to choose which one
  • Aligns with the OpenAI spec where tool_choice: "required" is a valid value

Fixes: #6120

Test plan

  • Build passes: ./mvnw -pl models/spring-ai-deepseek,models/spring-ai-minimax install -DskipTests
  • New constant is accessible as DeepSeekApi.ChatCompletionRequest.ToolChoiceBuilder.REQUIRED
  • New constant is accessible as MiniMaxApi.ChatCompletionRequest.ToolChoiceBuilder.REQUIRED

…Max APIs

Adds the missing `REQUIRED` tool_choice constant that forces the model to call
at least one tool without specifying which one, aligning with the OpenAI spec.

Fixes: spring-projects#6120

Signed-off-by: Gorre Surya <suryateja.g13@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ToolChoiceBuilder: REQUIRED type

1 participant