- Improved the documentation in the `MCP Server Boot Starter` regarding `Starter` selection,
and added descriptions of precautions for `spring-ai-starter-mcp-server-webflux`.
Fixes: #3511
Auto-cherry-pick to 1.0.x
Signed-off-by: Sun Yuhan <sunyuhan1998@users.noreply.github.com>
* Update zhipuai-chat docs example with "produces = MediaType.TEXT_EVENT_STREAM_VALUE" ( Content-Type = "text/event-stream" ) in the "@GetMapping" annotation.
Auto-cherry-pick to 1.0.x
Signed-off-by: 老虎是条大狼狗 <494509580@qq.com>
This commit introduces a new `spring-ai-elevenlabs` module to integrate ElevenLabs' TTS service into Spring AI.
Key Features:
- **New Module:** `spring-ai-elevenlabs` with a Spring Boot starter for auto-configuration.
- **Core Classes:**
- `ElevenLabsTextToSpeechModel`: Implements `TextToSpeechModel` and `StreamingTextToSpeechModel`.
- `ElevenLabsTextToSpeechOptions`: Configurable TTS options (voice, format, speed, etc.).
- `ElevenLabsApi` and `ElevenLabsVoicesApi`: Low-level REST clients for ElevenLabs APIs.
- DTOs: `Speech`, `TextToSpeechMessage`, `TextToSpeechPrompt`, `TextToSpeechResponse`.
- **Auto-configuration:**
- `ElevenLabsAutoConfiguration`, `ElevenLabsConnectionProperties`, and `ElevenLabsSpeechProperties`.
- **Functionality:**
- Text-to-speech conversion with ElevenLabs voices.
- Real-time streaming playback support.
- Flexible runtime configuration via properties and model options.
- **Documentation:** Updated Spring AI reference guide with usage examples.
- **Tests:** Includes unit and integration tests for both success and failure scenarios.
Note:
- Some `tts` package classes will be relocated to the `core` module to support shared TTS abstractions, including upcoming OpenAI Speech API support.
- Added metadata support to `TextToSpeechResponse`.
- Added tests and updated documentation.
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
Add necessary types and update stream processing to handle Anthropic's 'thinking' content blocks and deltas in streaming responses. This resolves an issue where an IllegalArgumentException was thrown for unhandled thinking event types.
format
Added docs
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
* feat(anthropic): add support for claude-opus-4-0 and claude-sonnet-4-0 models
- Introduce `CLAUDE_OPUS_4` and `CLAUDE_SONNET_4` to `ChatModel` enum
- Update documentation to include new model options
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
* add model aliases url to anthropic documentation
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
---------
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
- The documentation content regarding RAG has been updated. If you need to use the RetrievalAugmentationAdvisor, you should depend on spring-ai-rag.
Signed-off-by: Sun Yuhan <1085481446@qq.com>
Older STDIO transports can't be pulled, this should be a milestone version and should use `spring-ai-starter-mcp-server`.
Signed-off-by: Yang Buyi <52228969+yangbuyiya@users.noreply.github.com>
Adds a new configuration property `spring.ai.tools.throw-exception-on-error` that controls how tool execution errors are handled:
- When false (default): errors are converted to messages and sent back to the AI model
- When true: errors are thrown as exceptions for the caller to handle
The implementation:
- Adds the property to ToolCallingProperties
- Updates ToolCallingAutoConfiguration to use the property
- Improves error handling in MCP tool callbacks to use ToolExecutionException
- Adds tests to verify both behaviors
- Updates documentation with the new property
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
The RelevancyEvaluator is key for validating RAG flows. This pull request improves it by making the PromptTemplate configurable, improving the format of the default one, introducing a Builder, and extending the documentation with more details on how to use it.
I added some unit tests. The RelevancyEvaluator is used in lots of integration tests in the project to test the QuestionAnswerAdvisor and RetrievalAugmentationAdvisor, that also help assessing the evaluator itself.
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
* Add context about reactive/imperative applications
* Fix typos and improve formatting
* Highlight Spring Boot 3.4 bug as IMPORTANT note
* Clarify tool calling impact on Micrometer observations
- Update Observability section with details about tool calling observability support
- Move "Migrating to ToolCallback API" guide from Tool Calling section to Upgrade Notes
- Update Observability section with details about tool calling observability support
Related to #3230
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Fixes: #3187
This commit addresses the issue with Spring environment variables that directly
mirror Spring AI application properties, which can confuse users into thinking
they should always set environment variables that match Spring property names.
Instead, we've replaced all instances of SPRING_* prefixed environment variables
in the documentation with custom-named alternatives that are referenced using
Spring Expression Language (SpEL) or retrieved programmatically.
Each documentation section now shows multiple configuration approaches:
- Direct property setting in application.properties/yml
- Using custom environment variables with SpEL
- Accessing environment variables programmatically
This gives users more flexibility while making it clear that using SPRING_*
prefixed environment variables is not required or recommended.
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
Add support for configuring request timeout in MCP server with a default of 20 seconds.
This timeout applies to all requests made through the client, including tool calls,
resource access, and prompt operations.
- Add requestTimeout property to McpServerProperties with default of 20s
- Configure server builder with the timeout value
- Add tests for default and custom timeout configurations
- Update documentation with the new property
Resolves#3205
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Fixes: #886
Add ability to configure path prefix for OpenSearch API endpoints via properties.
This allows connecting to OpenSearch instances running behind a reverse proxy
with a non-root path, similar to Spring Elasticsearch's path-prefix property.
- Add pathPrefix property to OpenSearchVectorStoreProperties
- Apply pathPrefix to OpenSearchClient when configured
- Add documentation and unit tests
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
- Add capability configuration to enable/disable tools, resources, prompts, and completions individually
- Refactor server configuration to conditionally register capabilities based on configuration
- Add support for server instructions configuration
- Update documentation with new capability options and completion management
- Add tests for new capabilities and configurations
Resolves#3207
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
- Restructure navigation with clearer hierarchy using "Reference" and "Guides" sections
- Remove deprecated model-specific function calling documentation
- Update all model references to point to centralized Tool Calling documentation
- Rename "Docker Compose" to "Development-time Services" for clarity
- Move "Testing" under Reference section
- Add link to "Awesome Spring AI" community resources
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>