ResponsesProvider Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides pluggable response state persistence for the Responses API server.
public abstract class ResponsesProvider
type ResponsesProvider = class
Public MustInherit Class ResponsesProvider
- Inheritance
-
ResponsesProvider
Remarks
The SDK delegates all response state operations to the registered ResponsesProvider. Consumers extend this class to support custom backends (e.g., Redis, SQL) for multi-instance deployments.
For event streaming, extend ResponsesStreamProvider. For cancellation signalling, extend ResponsesCancellationSignalProvider.
When no custom implementation is registered, the SDK provides an in-memory default that is automatically registered by AddResponsesServer().
Constructors
| Name | Description |
|---|---|
| ResponsesProvider() | |
Methods
| Name | Description |
|---|---|
| CreateResponseAsync(CreateResponseRequest, IsolationContext, CancellationToken) |
Persists a newly created response along with its resolved input items and history item IDs. |
| DeleteResponseAsync(String, IsolationContext, CancellationToken) |
Deletes a response envelope by its identifier. |
| GetHistoryItemIdsAsync(String, String, Int32, IsolationContext, CancellationToken) |
Retrieves the list of history item IDs for a conversation chain, starting from a previous response and/or conversation ID. |
| GetInputItemsAsync(String, IsolationContext, Int32, Boolean, String, String, CancellationToken) |
Retrieves a paginated list of input items stored for a response. |
| GetItemsAsync(IEnumerable<String>, IsolationContext, CancellationToken) |
Retrieves output items by their identifiers (batch lookup).
Items not found are returned as |
| GetResponseAsync(String, IsolationContext, CancellationToken) |
Retrieves a response by its identifier. |
| UpdateResponseAsync(ResponseObject, IsolationContext, CancellationToken) |
Persists an updated response snapshot. Handles all state transitions including completion — there is no separate mark-completed operation. |