Skip to content

Conversation

tzolov
Copy link
Collaborator

@tzolov tzolov commented Oct 14, 2025

Major changes:

  • Add capability check methods (rootsEnabled, elicitEnabled, sampleEnabled) to both sync and async request contexts
  • Replace Optional return types with direct returns and throw IllegalStateException when capabilities not supported
  • Change from warning logs to exceptions for unsupported operations in stateless contexts
  • Removed stateless context implementations (StatelessAsyncRequestContext, StatelessMcpSyncRequestContext)
  • Add bidirectional parameter filtering for stateless providers (tools, resources, prompts, completions)
  • Update tests to verify new exception-based error handling
  • Updated README

Breaking changes:

  • McpSyncRequestContext methods now return direct types instead of Optional
  • McpAsyncRequestContext methods now return Mono.error() instead of Mono.empty() for unsupported operations
  • Stateless context methods throw IllegalStateException instead of logging warnings

This improves API clarity by making capability checks explicit and error handling more predictable.

@tzolov tzolov added this to the 0.6.0 milestone Oct 14, 2025
Major changes:
- Add capability check methods (rootsEnabled, elicitEnabled, sampleEnabled) to both sync and async request contexts
- Replace Optional return types with direct returns and throw IllegalStateException when capabilities not supported
- Change from warning logs to exceptions for unsupported operations in stateless contexts
- Removed stateless context implementations (StatelessAsyncRequestContext, StatelessMcpSyncRequestContext)
- Add bidirectional parameter filtering for stateless providers (tools, resources, prompts, completions)
- Update tests to verify new exception-based error handling
- Updated README

Breaking changes:
- McpSyncRequestContext methods now return direct types instead of Optional<T>
- McpAsyncRequestContext methods now return Mono.error() instead of Mono.empty() for unsupported operations
- Stateless context methods throw IllegalStateException instead of logging warnings

This improves API clarity by making capability checks explicit and error handling more predictable.

Signed-off-by: Christian Tzolov <[email protected]>
@tzolov tzolov force-pushed the improve-bidirectional-capability branch from b653fa5 to 57d85fa Compare October 14, 2025 18:03
@tzolov tzolov merged commit b5d3011 into spring-ai-community:main Oct 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant