spring-projects / spring-projects/spring-ai

Tool: support nullable ToolParams for inputSchema

Open
#4,533 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

openai
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

OpenAi inputSchema requires nullable ToolParams. We have the issue, that OpenAI can not handle tool call where all ToolParams are not required. At least one parameter needs to be required. It seems to work when ToolParam is marked as Nullable

It would be great to have
@Nullable @ToolParam
or using swagger @Schema(nullable=true)

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 files or tests are named. Start by locating the Java handling for ToolParams and inputSchema generation, then check how nullable annotations or @Schema(nullable=true) are represented. Done means OpenAI accepts tool calls when all ToolParams are optional, with coverage for the nullable schema behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ai, api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.