spring-projects / spring-projects/spring-ai

When the client is being built and the defaultOptions are added, the tool cannot be invoked

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

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

Error Description
When building the client using ChatClient.builder, if the .defaultOptions method is used, this client will be unable to call the tool.
Environment
Spring AI version: 1.0.1, Java version: OpenJDK 17.0.11, I used Pinecone as the vector storage.
Repro Steps
When creating the client, if I used the.defaultOptions, then this client will be unable to call the methods marked with @tool annotation. However, once I commented out the.defaultOptions method, the client can correctly call the tool.

My English is not very good. This feedback was machine-translated. Please forgive me.

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

Start by reproducing the issue through the ChatClient.builder entry point with defaultOptions enabled and a method marked with @tool, using the Pinecone setup described. Trace the interaction between defaultOptions and tool invocation; done means the client can invoke the tool with defaultOptions configured, while preserving the behavior without it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
ai, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.