@@ -1509,6 +1509,31 @@ export interface InferenceConfiguration {
1509
1509
stopSequences ?: string [ ] | undefined ;
1510
1510
}
1511
1511
1512
+ /**
1513
+ * @public
1514
+ * @enum
1515
+ */
1516
+ export const CachePointType = {
1517
+ DEFAULT : "default" ,
1518
+ } as const ;
1519
+
1520
+ /**
1521
+ * @public
1522
+ */
1523
+ export type CachePointType = ( typeof CachePointType ) [ keyof typeof CachePointType ] ;
1524
+
1525
+ /**
1526
+ * <p>Defines a section of content to be cached for reuse in subsequent API calls.</p>
1527
+ * @public
1528
+ */
1529
+ export interface CachePointBlock {
1530
+ /**
1531
+ * <p>Specifies the type of cache point within the CachePointBlock.</p>
1532
+ * @public
1533
+ */
1534
+ type : CachePointType | undefined ;
1535
+ }
1536
+
1512
1537
/**
1513
1538
* @public
1514
1539
* @enum
@@ -2219,6 +2244,7 @@ export interface ToolUseBlock {
2219
2244
* @public
2220
2245
*/
2221
2246
export type ContentBlock =
2247
+ | ContentBlock . CachePointMember
2222
2248
| ContentBlock . DocumentMember
2223
2249
| ContentBlock . GuardContentMember
2224
2250
| ContentBlock . ImageMember
@@ -2245,6 +2271,7 @@ export namespace ContentBlock {
2245
2271
toolUse ?: never ;
2246
2272
toolResult ?: never ;
2247
2273
guardContent ?: never ;
2274
+ cachePoint ?: never ;
2248
2275
reasoningContent ?: never ;
2249
2276
$unknown ?: never ;
2250
2277
}
@@ -2264,6 +2291,7 @@ export namespace ContentBlock {
2264
2291
toolUse ?: never ;
2265
2292
toolResult ?: never ;
2266
2293
guardContent ?: never ;
2294
+ cachePoint ?: never ;
2267
2295
reasoningContent ?: never ;
2268
2296
$unknown ?: never ;
2269
2297
}
@@ -2280,6 +2308,7 @@ export namespace ContentBlock {
2280
2308
toolUse ?: never ;
2281
2309
toolResult ?: never ;
2282
2310
guardContent ?: never ;
2311
+ cachePoint ?: never ;
2283
2312
reasoningContent ?: never ;
2284
2313
$unknown ?: never ;
2285
2314
}
@@ -2296,6 +2325,7 @@ export namespace ContentBlock {
2296
2325
toolUse ?: never ;
2297
2326
toolResult ?: never ;
2298
2327
guardContent ?: never ;
2328
+ cachePoint ?: never ;
2299
2329
reasoningContent ?: never ;
2300
2330
$unknown ?: never ;
2301
2331
}
@@ -2312,6 +2342,7 @@ export namespace ContentBlock {
2312
2342
toolUse : ToolUseBlock ;
2313
2343
toolResult ?: never ;
2314
2344
guardContent ?: never ;
2345
+ cachePoint ?: never ;
2315
2346
reasoningContent ?: never ;
2316
2347
$unknown ?: never ;
2317
2348
}
@@ -2328,6 +2359,7 @@ export namespace ContentBlock {
2328
2359
toolUse ?: never ;
2329
2360
toolResult : ToolResultBlock ;
2330
2361
guardContent ?: never ;
2362
+ cachePoint ?: never ;
2331
2363
reasoningContent ?: never ;
2332
2364
$unknown ?: never ;
2333
2365
}
@@ -2349,6 +2381,24 @@ export namespace ContentBlock {
2349
2381
toolUse ?: never ;
2350
2382
toolResult ?: never ;
2351
2383
guardContent : GuardrailConverseContentBlock ;
2384
+ cachePoint ?: never ;
2385
+ reasoningContent ?: never ;
2386
+ $unknown ?: never ;
2387
+ }
2388
+
2389
+ /**
2390
+ * <p>CachePoint to include in the message.</p>
2391
+ * @public
2392
+ */
2393
+ export interface CachePointMember {
2394
+ text ?: never ;
2395
+ image ?: never ;
2396
+ document ?: never ;
2397
+ video ?: never ;
2398
+ toolUse ?: never ;
2399
+ toolResult ?: never ;
2400
+ guardContent ?: never ;
2401
+ cachePoint : CachePointBlock ;
2352
2402
reasoningContent ?: never ;
2353
2403
$unknown ?: never ;
2354
2404
}
@@ -2365,6 +2415,7 @@ export namespace ContentBlock {
2365
2415
toolUse ?: never ;
2366
2416
toolResult ?: never ;
2367
2417
guardContent ?: never ;
2418
+ cachePoint ?: never ;
2368
2419
reasoningContent : ReasoningContentBlock ;
2369
2420
$unknown ?: never ;
2370
2421
}
@@ -2380,6 +2431,7 @@ export namespace ContentBlock {
2380
2431
toolUse ?: never ;
2381
2432
toolResult ?: never ;
2382
2433
guardContent ?: never ;
2434
+ cachePoint ?: never ;
2383
2435
reasoningContent ?: never ;
2384
2436
$unknown : [ string , any ] ;
2385
2437
}
@@ -2392,6 +2444,7 @@ export namespace ContentBlock {
2392
2444
toolUse : ( value : ToolUseBlock ) => T ;
2393
2445
toolResult : ( value : ToolResultBlock ) => T ;
2394
2446
guardContent : ( value : GuardrailConverseContentBlock ) => T ;
2447
+ cachePoint : ( value : CachePointBlock ) => T ;
2395
2448
reasoningContent : ( value : ReasoningContentBlock ) => T ;
2396
2449
_ : ( name : string , value : any ) => T ;
2397
2450
}
@@ -2404,6 +2457,7 @@ export namespace ContentBlock {
2404
2457
if ( value . toolUse !== undefined ) return visitor . toolUse ( value . toolUse ) ;
2405
2458
if ( value . toolResult !== undefined ) return visitor . toolResult ( value . toolResult ) ;
2406
2459
if ( value . guardContent !== undefined ) return visitor . guardContent ( value . guardContent ) ;
2460
+ if ( value . cachePoint !== undefined ) return visitor . cachePoint ( value . cachePoint ) ;
2407
2461
if ( value . reasoningContent !== undefined ) return visitor . reasoningContent ( value . reasoningContent ) ;
2408
2462
return visitor . _ ( value . $unknown [ 0 ] , value . $unknown [ 1 ] ) ;
2409
2463
} ;
@@ -2524,6 +2578,7 @@ export namespace PromptVariableValues {
2524
2578
* @public
2525
2579
*/
2526
2580
export type SystemContentBlock =
2581
+ | SystemContentBlock . CachePointMember
2527
2582
| SystemContentBlock . GuardContentMember
2528
2583
| SystemContentBlock . TextMember
2529
2584
| SystemContentBlock . $UnknownMember ;
@@ -2539,6 +2594,7 @@ export namespace SystemContentBlock {
2539
2594
export interface TextMember {
2540
2595
text : string ;
2541
2596
guardContent ?: never ;
2597
+ cachePoint ?: never ;
2542
2598
$unknown ?: never ;
2543
2599
}
2544
2600
@@ -2551,6 +2607,18 @@ export namespace SystemContentBlock {
2551
2607
export interface GuardContentMember {
2552
2608
text ?: never ;
2553
2609
guardContent : GuardrailConverseContentBlock ;
2610
+ cachePoint ?: never ;
2611
+ $unknown ?: never ;
2612
+ }
2613
+
2614
+ /**
2615
+ * <p>CachePoint to include in the system prompt.</p>
2616
+ * @public
2617
+ */
2618
+ export interface CachePointMember {
2619
+ text ?: never ;
2620
+ guardContent ?: never ;
2621
+ cachePoint : CachePointBlock ;
2554
2622
$unknown ?: never ;
2555
2623
}
2556
2624
@@ -2560,18 +2628,21 @@ export namespace SystemContentBlock {
2560
2628
export interface $UnknownMember {
2561
2629
text ?: never ;
2562
2630
guardContent ?: never ;
2631
+ cachePoint ?: never ;
2563
2632
$unknown : [ string , any ] ;
2564
2633
}
2565
2634
2566
2635
export interface Visitor < T > {
2567
2636
text : ( value : string ) => T ;
2568
2637
guardContent : ( value : GuardrailConverseContentBlock ) => T ;
2638
+ cachePoint : ( value : CachePointBlock ) => T ;
2569
2639
_ : ( name : string , value : any ) => T ;
2570
2640
}
2571
2641
2572
2642
export const visit = < T > ( value : SystemContentBlock , visitor : Visitor < T > ) : T => {
2573
2643
if ( value . text !== undefined ) return visitor . text ( value . text ) ;
2574
2644
if ( value . guardContent !== undefined ) return visitor . guardContent ( value . guardContent ) ;
2645
+ if ( value . cachePoint !== undefined ) return visitor . cachePoint ( value . cachePoint ) ;
2575
2646
return visitor . _ ( value . $unknown [ 0 ] , value . $unknown [ 1 ] ) ;
2576
2647
} ;
2577
2648
}
@@ -2744,7 +2815,7 @@ export interface ToolSpecification {
2744
2815
* <p>Information about a tool that you can use with the Converse API. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Tool use (function calling)</a> in the Amazon Bedrock User Guide.</p>
2745
2816
* @public
2746
2817
*/
2747
- export type Tool = Tool . ToolSpecMember | Tool . $UnknownMember ;
2818
+ export type Tool = Tool . CachePointMember | Tool . ToolSpecMember | Tool . $UnknownMember ;
2748
2819
2749
2820
/**
2750
2821
* @public
@@ -2756,6 +2827,17 @@ export namespace Tool {
2756
2827
*/
2757
2828
export interface ToolSpecMember {
2758
2829
toolSpec : ToolSpecification ;
2830
+ cachePoint ?: never ;
2831
+ $unknown ?: never ;
2832
+ }
2833
+
2834
+ /**
2835
+ * <p>CachePoint to include in the tool configuration.</p>
2836
+ * @public
2837
+ */
2838
+ export interface CachePointMember {
2839
+ toolSpec ?: never ;
2840
+ cachePoint : CachePointBlock ;
2759
2841
$unknown ?: never ;
2760
2842
}
2761
2843
@@ -2764,16 +2846,19 @@ export namespace Tool {
2764
2846
*/
2765
2847
export interface $UnknownMember {
2766
2848
toolSpec ?: never ;
2849
+ cachePoint ?: never ;
2767
2850
$unknown : [ string , any ] ;
2768
2851
}
2769
2852
2770
2853
export interface Visitor < T > {
2771
2854
toolSpec : ( value : ToolSpecification ) => T ;
2855
+ cachePoint : ( value : CachePointBlock ) => T ;
2772
2856
_ : ( name : string , value : any ) => T ;
2773
2857
}
2774
2858
2775
2859
export const visit = < T > ( value : Tool , visitor : Visitor < T > ) : T => {
2776
2860
if ( value . toolSpec !== undefined ) return visitor . toolSpec ( value . toolSpec ) ;
2861
+ if ( value . cachePoint !== undefined ) return visitor . cachePoint ( value . cachePoint ) ;
2777
2862
return visitor . _ ( value . $unknown [ 0 ] , value . $unknown [ 1 ] ) ;
2778
2863
} ;
2779
2864
}
@@ -3049,6 +3134,18 @@ export interface TokenUsage {
3049
3134
* @public
3050
3135
*/
3051
3136
totalTokens : number | undefined ;
3137
+
3138
+ /**
3139
+ * <p>The number of input tokens read from the cache for the request.</p>
3140
+ * @public
3141
+ */
3142
+ cacheReadInputTokens ?: number | undefined ;
3143
+
3144
+ /**
3145
+ * <p>The number of input tokens written to the cache for the request.</p>
3146
+ * @public
3147
+ */
3148
+ cacheWriteInputTokens ?: number | undefined ;
3052
3149
}
3053
3150
3054
3151
/**
@@ -4543,6 +4640,7 @@ export const ContentBlockFilterSensitiveLog = (obj: ContentBlock): any => {
4543
4640
if ( obj . toolResult !== undefined ) return { toolResult : obj . toolResult } ;
4544
4641
if ( obj . guardContent !== undefined )
4545
4642
return { guardContent : GuardrailConverseContentBlockFilterSensitiveLog ( obj . guardContent ) } ;
4643
+ if ( obj . cachePoint !== undefined ) return { cachePoint : obj . cachePoint } ;
4546
4644
if ( obj . reasoningContent !== undefined ) return { reasoningContent : SENSITIVE_STRING } ;
4547
4645
if ( obj . $unknown !== undefined ) return { [ obj . $unknown [ 0 ] ] : "UNKNOWN" } ;
4548
4646
} ;
@@ -4562,6 +4660,7 @@ export const SystemContentBlockFilterSensitiveLog = (obj: SystemContentBlock): a
4562
4660
if ( obj . text !== undefined ) return { text : obj . text } ;
4563
4661
if ( obj . guardContent !== undefined )
4564
4662
return { guardContent : GuardrailConverseContentBlockFilterSensitiveLog ( obj . guardContent ) } ;
4663
+ if ( obj . cachePoint !== undefined ) return { cachePoint : obj . cachePoint } ;
4565
4664
if ( obj . $unknown !== undefined ) return { [ obj . $unknown [ 0 ] ] : "UNKNOWN" } ;
4566
4665
} ;
4567
4666
0 commit comments