Do not initiate sampling on resource subscription. #2844
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
SubscribeRequestSchemaServer Details
Motivation and Context
Sampling and resource subscription are two different things, and although they might be coupled in some implementation, it does not make sense to do so in the Everything server demo. We are trying to demonstrate everything after all, but not imply a coupling between things that need not be, and in fact probably aren't in real use.
BEFORE: Sample on Subscription Experience
sampling-on-subscribe.mov
This is confusing, because the result of pressing that subscription button leads to a message count on the sampling tab, which you follow like a trained monkey to find a sampling message that seems to be asking the client to let the LLM know you've subscribed to something on the server. Why would the LLM need to know that? It's a head scratcher. And you are set to approve a canned but totally unrelated response. That might be a use-case but it's not the most straightforward one.
AFTER: No Sample on Subscription Experience
no-sampling-on-subscribe.mov
When you hit subscribe, the only thing that changes is the tool call shows up in history followed shortly by server notification about a resource update. This illustrates the two important aspects of subscriptions; when you make them, you start receiving notifications about them when they change. And you can unsubscribe to stop them. All on one page without any mental friction about how sampling is tied in and whether that's something you need to understand to use subscriptions.
How Has This Been Tested?
Locally.
Breaking Changes
Nope.
Types of changes
Checklist
Additional context