- Adding Spring Boot configuration processor for the tools autocompletion support
Resolves#2273
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
The proxyToolCalls flag was incorrectly mapped to internalToolExecutionEnabled. This change inverts the boolean value to
properly reflect that proxy tool calls are the opposite of internal tool execution.
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
- Extends the ToolCallingAutoConfiguration to support both FunctionCallback and ToolCallback types.
- The toolCallbackResolver bean now handles both callback types through ObjectProvider injection.
- Added comprehensive tests to verify the resolution of multiple function and tool callbacks.
- Introduce new StaticToolCallbackProvider implementation
- Update ToolCallbackProvider to return FunctionCallback[]
- Migrate from List to ToolCallbackProvider in configurations
- Update tests to use new provider pattern
- Enhance tool callback providers to support multiple clients
- Refactor AsyncMcpToolCallbackProvider and SyncMcpToolCallbackProvider to handle multiple MCP clients
- Add ToolCallbackProvider support to ChatClient API
- Deprecate direct tool callback list methods in favor of providers
- Fix typos in Closeable class names
- Update MCP documentation with new examples and usage patterns
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Spring AI milestones are now published to Maven Central. This PR updates all the places where we used to reference Spring Milestones repository.
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- Update to use ApiKey when instantiating OpenAI Image/Audio/Moderation APIs
- Add Builders for OpenAI Image/Audio/Moderation APIs and deprecate existing constructors
- Add/update tests
- Replace hasText check with notNull for ApiKey with String value
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
- Update AnthropicChatModel to use the new ToolCallingManager API, while ensuring full API backward compatibility.
- Introduce Builder to instantiate a new AnthropicChatModel since the number of overloaded constructors is growing too big.
- Update documentation about tool calling and Anthropic support for that.
Part of the #2207 epic
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- Add javadoc for VertexAiGeminiChatModel including features, examples, and cross-references
- Document JsonSchemaConverter and VertexToolCallingManager classes and methods
- Fix formatter annotation placement in VertexAiGeminiChatOptions
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Each ModelObservationContext takes both a request object (e.g. Prompt) and an options object (e.g. ChatOptions). However, the options are already included in the request object. This PR deprecates the additional field, which will be removed in a subsequent release.
The reason why the extra field was there in the first place was due to the model implementations not handling request options correctly, requiring a dedicated setter. We started fixing the model implementations now, so we are deprecating te extra field, and we'll remove it in the next release, once we have completed the implementation of a fix for all model implementations.
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- Migrate from function calling to tool calling API
- Add support for Gemini 2.0 models (flash, flash-lite)
- Implement JSON schema to OpenAPI schema conversion
- Add builder pattern for improved configuration
- Deprecate legacy function calling constructors and methods
- Update default model to GEMINI_2_0_FLASH
- Add comprehensive test coverage for tool calling
- Upgrade victools dependency to 4.37.0
- Update the Vertex Tool calling docs
Part of the #2207 epic
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Extract common vector store delete tests to base class
This commit extracts shared delete operation tests into a reusable BaseVectorStoreTests class.
This reduces code duplication and provides a consistent test suite for delete operations across
different vector store implementations. The base class includes tests for:
Deleting by ID
Deleting by filter expressions
Deleting by string filter expressions
Most of the vector store implementation now extends this base class and inherits these
common tests while maintaining the ability to add vector store specific tests.
Adding javadoc
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
- Replace function calling with tool calling in BedrockProxyChatModel
- Deprecate function calling related code and APIs
- Add new tool calling manager and options
- Update builder pattern to remove "with" prefix from methods
- Update tests and documentation for tool calling
Part of the #2207 epic
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
- Use the new ToolCallingManager API for AzureOpenAI chat model
- Add Builder to construct AzureOpenAI chat model instance
- Deprecate existing constructors
- Update documentation about the change
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
- Update MistralAiChatModel to use the new ToolCallingManager API, while ensuring full API backward compatibility.
- Introduce Builder to instantiate a new MistralAiChatModel since the number of overloaded constructors is growing too big.
- Update documentation about tool calling and Mistral AI support for that.
- Add extra validation to ensure the uniqueness of tool names when aggregated from different sources.
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- Document delete APIs with ID lists and filter expressions
- Add versioning use case with metadata-based updates
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
Introduces a new customization point for Azure OpenAI client configuration
through the AzureOpenAIClientBuilderCustomizer interface. This allows
applications to customize the OpenAIClientBuilder while preserving the default
auto-configuration behavior.
- Add AzureOpenAIClientBuilderCustomizer interface (since 1.0.0-M6)
- Modify all OpenAIClientBuilder bean creation methods to apply customizers
- Add integration test verifying ordered customizer application
Signed-off-by: Manuel Andreo Garcia <manuel@magware.dev>
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
Additiona fixes: API key validation and tool calling backward compatibility
- Fix API key validation in OpenAiApi builder
- Standardize API key validation using Assert.notNull
- Add backward compatibility support for FunctionCallback in tool calling
- Update integration tests to use LegacyToolCallingManager
Co-authored-by:Christian Tzolov <christian.tzolov@broadcom.com>
Signed-off-by: Ricken Bazolo <ricken.bazolo@gmail.com>
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
- Update OpenAiChatModel to use the new ToolCallingManager API, while ensuring full API backward compatibility.
- Introduce Builder to instantiate a new OpenAiChatModel since the number of overloaded constructors is growing too big.
- Update documentation about tool calling and OpenAI support for that.
- Add extra validation to ensure the uniqueness of tool names when aggregated from different sources.
- Ensure consistent merging of options, following Spring Boot strategy.
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- Enhance MCP server boot starter documentation with:
- Improved formatting and organization
- More detailed examples and code snippets
- Better explanations of features and capabilities
- Links to MCP specification
- Example applications section
- Remove standalone documentation files in favor of Antora structure
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
- Expand client customization documentation with detailed sections
- Add comprehensive descriptions of MCP components and capabilities
- Improve code examples and explanations
- Add example applications sections for both client and server
- Fix typos and enhance overall documentation structure
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Core Architecture Changes:
- Split MCP into dedicated client/server modules
- Created separate starters: spring-ai-starter-mcp-webmvc and spring-ai-starter-mcp-webflux
- Removed property-based transport configuration in favor of auto-configuration
- Added support for multiple transport types (STDIO, WebMVC, WebFlux)
Client Improvements:
- Added support for both synchronous and asynchronous MCP clients
- Fixed client auto-configuration issues
- Added root change notification property to common properties
Configuration Enhancements:
- Improved configuration properties organization and validation
- Added ConditionalOnMissingBean for WebMvc/WebFlux configurations
- Enhanced lifecycle management and customization support
Testing and Documentation:
- Added comprehensive integration tests for McpClientAutoConfiguration
- Updated McpServerAutoConfigurationIT
- Added extensive JavaDoc documentation
- Improved MCP client/server starter documentation
- Added documentation for common utilities
- Updated navigation for new MCP documentation sections
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>