mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
13 lines
2.3 KiB
Plaintext
13 lines
2.3 KiB
Plaintext
---
|
|
title: "AnthropicCacheControlDirective"
|
|
---
|
|
|
|
Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
|
|
|
|
|
|
## Fields
|
|
|
|
| Field | Type | Required | Description | Example |
|
|
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
| `ttl` | [Optional[components.AnthropicCacheControlTTL]](../components/anthropiccachecontrolttl.mdx) | :heavy_minus_sign: | N/A | 5m |
|
|
| `type` | [components.AnthropicCacheControlDirectiveType](../components/anthropiccachecontroldirectivetype.mdx) | :heavy_check_mark: | N/A | | |