spring-projects / spring-projects/spring-ai
Tool: support nullable ToolParams for inputSchema
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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