Deprecated Features
Logging and sampling.
The newest revision also deprecated two more features. Logging, where servers sent log messages to the client. And sampling, where servers asked the client's model to write text. Older code still uses them, so it helps to know what to do instead.

- Logging
- Sampling
- Roots
What to use instead
Instead of protocol logging, write logs to standard error, or your own logging service. Instead of sampling, call a model directly from your server, with your own key. Instead of roots, use configuration.
| Deprecated | Use instead |
|---|---|
| logging | stderr or your own logs |
| sampling | call a model API yourself |
| roots | configuration |
Why they went
Each one needed the server to send requests back to the client, in the middle of a call. That made servers harder to scale, and clients harder to build. Elicitation stayed, in a simpler form.
| key | value |
|---|---|
| Problem | server-to-client requests |
| Cost | hard to scale |
| Kept | elicitation |
| New form | input required |
Summary
Logging, sampling, and roots are deprecated. Use standard error, your own model calls, and configuration. Next, testing a server.
Key takeaways- stderr
- Own model calls
- Config