When generating the JSON Schema for a tool input from a method, ToolContext is now excluded since it's not something we want the model to provide. The framework takes care of passing a value for it when actually executing the tool call.
Fixes gh-2366
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
- Fix to include the correct top level property to enable/disable image/audio models
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
- Since the model autoconfiguration enable/disable flags are no longer used, remove them
- Currently, the model autoconfigurations can be enabled/disabled via top level Spring AI properties such as spring.ai.model.chat/embedding/image/moderation=<model-provider-name>
- Update documentation to add note section about this change
- Update note on the autoconfiguration section to point to the configuration changes
- Align the vertex ai text/multimodal keys in line with the other properties
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
- Rename Registration classes to Specification (SyncToolRegistration → SyncToolSpecification)
- Update transport classes to use Provider suffix (WebFluxSseServerTransport → WebFluxSseServerTransportProvider)
- Add exchange parameter to handler methods for better context passing
- Introduce McpBackwardCompatibility class to maintain backward compatibility
- Update MCP Server documentation to reflect new API patterns
- Add tests for backward compatibility
- Update mcp version to 0.8.0
- Add mcp 0.8.0 breaking change note-
The changes align with the MCP specification evolution while maintaining backward compatibility through deprecated APIs.
refactor: Extract MCP tool callback configuration into separate auto-configuration
Extracts the MCP tool callback functionality from McpClientAutoConfiguration into a
new dedicated McpToolCallbackAutoConfiguration that is disabled by default.
- Created new McpToolCallbackAutoConfiguration class that handles tool callback registration
- Made tool callbacks opt-in by requiring explicit configuration with spring.ai.mcp.client.toolcallback.enabled=true
- Removed deprecated tool callback methods from McpClientAutoConfiguration
- Updated ClientMcpTransport references to McpClientTransport to align with MCP library changes
- Added tests for the new auto-configuration and its conditions
refactor: standardize tool names to use underscores instead of hyphens
- Change separator in McpToolUtils.prefixedToolName from hyphen to underscore
- Add conversion of any remaining hyphens to underscores in formatted tool names
- Update affected tests to reflect the new naming convention
- Add comprehensive tests for McpToolUtils.prefixedToolName method
- Add integration test for payment transaction tools with Vertex AI Gemini
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
- Update dependencies and module names in maven pom.xml files affecting couchbase vector store support
- Rename artifact from spring-ai-couchbase-store-spring-boot-starter to spring-ai-starter-vector-store-couchbase
- Update imports and related cleanup
- Update corresponding documentation references
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
- Update the documentation references to replace the artifact ID name change for the model starters
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
- Split spring-ai-spring-boot-autoconfigure into modules
- This PR addresses the restructuring of the following spring boot autoconfigurations:
- spring-ai retry -> common
- spring-ai chat client/model/memory -> chat
- spring-ai chat/embedding/image observation -> observation
- spring-ai chat/embedding models -> models
- Update the Spring AI BOM and boot starters with the new autoconfigure modules
- Rename the autoconfiguration and starters
- The package name for the models in autoconfiguration classes will have `org.springframework.ai.model.<name>.autoconfigure`
- Both the autoconfiguration and starters will have the prefix `spring-ai-autoconfigure-model` and `spring-ai-starter-model` respectively
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
Fixes: #938
Issue link: https://github.com/spring-projects/spring-ai/issues/938
This commit integrates Couchbase as a vector store option in Spring AI, providing:
- CouchbaseSearchVectorStore implementation with vector similarity search capabilities
- Support for metadata filtering with SQL++ expression conversion
- Spring Boot auto-configuration and starter module for easy integration
- Comprehensive documentation covering setup, configuration, and usage examples
- Integration tests using TestContainers with Couchbase 7.6
The implementation supports configuring dimensions, similarity functions (dot_product/l2_norm),
and optimization strategies (recall/latency). Schema initialization is now opt-in via
the initializeSchema property. Documentation includes both auto-configuration and
manual configuration instructions, along with property configuration details.
Signed-off-by: Abhiraj <abhiraj.official15@gmail.com>
co-authored-by: Laurent Doguin <laurent.doguin@gmail.com>
- Reorganize sections to focus on Milestones vs Snapshots instead of specific versions
- Add Central Portal Snapshots repository configuration for both Maven and Gradle
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Existing example displays a typo in the code example for Runtime Options:
ChatResponse response = chatModel.call(
new Prompt(
"Generate the names of 5 famous pirates.",
OpenAiChatOptions.builder()
.model("gpt-4-o")
.temperature(0.4)
.build()
));
Using gpt-4-0 generates this error:
org.springframework.ai.retry.NonTransientAiException: 404 - {
"error": {
"message": "The model `gpt-4-o` does not exist or you do not have access to it.",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}
Changing the model String in the example to "gpt-4o" resolves this.
When using the RetrievalAugmentationAdvisor with the VectorStoreDocumentRetriever, it’s now possible to provide a filter expression at request-time as an advisor context variable with key VectorStoreDocumentRetriever.FILTER_EXPRESSION.
Fixes gh-1776
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
This commit introduces the `JsoupDocumentReader` and `JsoupDocumentReaderConfig` classes, which provide functionality to read and parse HTML documents using the JSoup library.
The reader supports:
- Extracting text from specific HTML elements using CSS selectors.
- Extracting all text from the body of the document.
- Grouping text by element.
- Extracting metadata, including the document title, meta tags, and link URLs.
- Reading from various resource types (files, URLs, byte arrays).
- Configurable character encoding, selector, separator, and metadata extraction.
This new reader enhances Spring AI's ability to process web content and other HTML-based data sources.
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
- Updated `SearchRequest.java` to make the class non-final.
- Added `MilvusSearchRequest` with specific Milvus parameters such as `nativeExpression` and `searchParamsJson`.
- Modified `doSimilaritySearch` method in `MilvusVectorStore` to handle these new fields from `MilvusSearchRequest`.
Add unit tests for MilvusVectorStore and MilvusSearchRequest
Introduce comprehensive unit tests to validate the functionality of MilvusVectorStore and MilvusSearchRequest, including scenarios for native and filter expressions. Refactor MilvusVectorStore to improve filter expression handling by introducing a helper method for converted expressions.
Add detailed documentation for MilvusSearchRequest usage
Introduced sections explaining MilvusSearchRequest's parameters, `nativeExpression`, and `searchParamsJson`, with examples for enhanced clarity. This update provides guidance on leveraging Milvus-specific features for precise filtering and optimal search performance.
Signed-off-by: waileong <wai_leong1015@hotmail.com>
Add capability to specify MIME types for MCP tool responses, with special handling for image content.
This enhancement allows tools to return different content types, particularly images, by:
- Adding a new toolResponseMimeType map property to configure response MIME types per tool
- Extending tool registration methods to accept and use MIME type information
- Adding special handling for image content in tool responses
- Updating documentation with the new configuration options
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Add the ability to specify custom HTTP headers for Anthropic API requests through AnthropicChatOptions.
This allows users to override or add headers for authentication, tracking, or other API-specific requirements.
- Add httpHeaders field to AnthropicChatOptions with appropriate getters/setters
- Implement header merging between default and runtime options
- Update AnthropicApi to accept additional HTTP headers in API calls
- Add integration test demonstrating API key override via custom headers
- Update documentation with the new configuration property
Resolves#2335
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
- Add support for Claude 3.7 Sonnet model and make it the default
- Rename function-related APIs to tool-related APIs for consistency:
- Change functionCallbacks to toolCallbacks
- Change function to toolNames
- Replace FunctionCallingOptions with ToolCallingChatOptions
- Refactor AnthropicChatModel instantiation to use builder pattern
- Update tests to use latest model versions instead of dated versions
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
- Upgrade the java client from 0.8.0 to 4.0.1
- Use io.pinecone.clients.Pinecone to setup the client configuration with the API key
- Remove projectId, environment and other deprecated client configurations
- Update upsert, delete, search operations with the new client
- Remove the projectID and Environment configurations from the builder
- Updated the Pinecone vectorstore autoconfiguration
- Update tests
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
Disable autoconfig IT until the auto-configuration is modularised
Reorganize MCP documentation to better explain Spring AI's integration with the MCP Java SDK.
Add references to client and server boot starters and clarify the distinction between core
SDK architecture and Spring Boot integration.
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>