Debian Codegraph @

src/anthropic/types/diagnostics_param.py

raw
1 from __future__ import annotations
2
3 from typing import Optional
4 from typing_extensions import TypedDict
5
6 __all__ = ["DiagnosticsParam"]
7
8
9 class DiagnosticsParam(TypedDict, total=False):
10 """Request-level diagnostics.
11
12 Currently carries the previous response
13 id for prompt-cache divergence reporting.
14 """
15
16 previous_message_id: Optional[str]
17 """The `id` (`msg_...`) from this client's previous /v1/messages response.
18
19 The server compares that request's prompt fingerprint against this one and
20 returns `diagnostics.cache_miss_reason` when the prompt-cache prefix could not
21 be reused. Pass `null` on the first turn to opt in without a prior message to
22 compare.
23 """