Skip to content

Commit 1cbcdeb

Browse files
author
AWS
committed
Amazon Bedrock Runtime Update: New stop reason for Converse and ConverseStream
1 parent ca8a311 commit 1cbcdeb

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Bedrock Runtime",
4+
"contributor": "",
5+
"description": "New stop reason for Converse and ConverseStream"
6+
}

services/bedrockruntime/src/main/resources/codegen-resources/service-2.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
{"shape":"ResourceNotFoundException"},
3232
{"shape":"ThrottlingException"},
3333
{"shape":"InternalServerException"},
34+
{"shape":"ServiceUnavailableException"},
3435
{"shape":"ValidationException"},
3536
{"shape":"ServiceQuotaExceededException"}
3637
],
@@ -97,7 +98,8 @@
9798
{"shape":"ServiceUnavailableException"},
9899
{"shape":"ValidationException"}
99100
],
100-
"documentation":"<p>Returns the token count for a given inference request. This operation helps you estimate token usage before sending requests to foundation models by returning the token count that would be used if the same input were sent to the model in an inference request.</p> <p>Token counting is model-specific because different models use different tokenization strategies. The token count returned by this operation will match the token count that would be charged if the same input were sent to the model in an <code>InvokeModel</code> or <code>Converse</code> request.</p> <p>You can use this operation to:</p> <ul> <li> <p>Estimate costs before sending inference requests.</p> </li> <li> <p>Optimize prompts to fit within token limits.</p> </li> <li> <p>Plan for token usage in your applications.</p> </li> </ul> <p>This operation accepts the same input formats as <code>InvokeModel</code> and <code>Converse</code>, allowing you to count tokens for both raw text inputs and structured conversation formats.</p> <p>The following operations are related to <code>CountTokens</code>:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/API/API_runtime_InvokeModel.html\">InvokeModel</a> - Sends inference requests to foundation models</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/API/API_runtime_Converse.html\">Converse</a> - Sends conversation-based inference requests to foundation models</p> </li> </ul>"
101+
"documentation":"<p>Returns the token count for a given inference request. This operation helps you estimate token usage before sending requests to foundation models by returning the token count that would be used if the same input were sent to the model in an inference request.</p> <p>Token counting is model-specific because different models use different tokenization strategies. The token count returned by this operation will match the token count that would be charged if the same input were sent to the model in an <code>InvokeModel</code> or <code>Converse</code> request.</p> <p>You can use this operation to:</p> <ul> <li> <p>Estimate costs before sending inference requests.</p> </li> <li> <p>Optimize prompts to fit within token limits.</p> </li> <li> <p>Plan for token usage in your applications.</p> </li> </ul> <p>This operation accepts the same input formats as <code>InvokeModel</code> and <code>Converse</code>, allowing you to count tokens for both raw text inputs and structured conversation formats.</p> <p>The following operations are related to <code>CountTokens</code>:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/API/API_runtime_InvokeModel.html\">InvokeModel</a> - Sends inference requests to foundation models</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/API/API_runtime_Converse.html\">Converse</a> - Sends conversation-based inference requests to foundation models</p> </li> </ul>",
102+
"readonly":true
101103
},
102104
"GetAsyncInvoke":{
103105
"name":"GetAsyncInvoke",
@@ -114,7 +116,8 @@
114116
{"shape":"InternalServerException"},
115117
{"shape":"ValidationException"}
116118
],
117-
"documentation":"<p>Retrieve information about an asynchronous invocation.</p>"
119+
"documentation":"<p>Retrieve information about an asynchronous invocation.</p>",
120+
"readonly":true
118121
},
119122
"InvokeModel":{
120123
"name":"InvokeModel",
@@ -202,7 +205,8 @@
202205
{"shape":"InternalServerException"},
203206
{"shape":"ValidationException"}
204207
],
205-
"documentation":"<p>Lists asynchronous invocations.</p>"
208+
"documentation":"<p>Lists asynchronous invocations.</p>",
209+
"readonly":true
206210
},
207211
"StartAsyncInvoke":{
208212
"name":"StartAsyncInvoke",
@@ -246,8 +250,7 @@
246250
},
247251
"AnyToolChoice":{
248252
"type":"structure",
249-
"members":{
250-
},
253+
"members":{},
251254
"documentation":"<p>The model must request at least one tool (no text is generated). For example, <code>{\"any\" : {}}</code>.</p>"
252255
},
253256
"ApplyGuardrailRequest":{
@@ -436,8 +439,7 @@
436439
},
437440
"AutoToolChoice":{
438441
"type":"structure",
439-
"members":{
440-
},
442+
"members":{},
441443
"documentation":"<p>The Model automatically decides if a tool should be called or whether to generate text instead. For example, <code>{\"auto\" : {}}</code>.</p>"
442444
},
443445
"AutomatedReasoningRuleIdentifier":{
@@ -1158,8 +1160,7 @@
11581160
},
11591161
"Document":{
11601162
"type":"structure",
1161-
"members":{
1162-
},
1163+
"members":{},
11631164
"document":true
11641165
},
11651166
"DocumentBlock":{
@@ -1596,8 +1597,7 @@
15961597
},
15971598
"GuardrailAutomatedReasoningNoTranslationsFinding":{
15981599
"type":"structure",
1599-
"members":{
1600-
},
1600+
"members":{},
16011601
"documentation":"<p>Indicates that no relevant logical information could be extracted from the input for validation.</p>"
16021602
},
16031603
"GuardrailAutomatedReasoningPoliciesProcessed":{
@@ -1706,8 +1706,7 @@
17061706
},
17071707
"GuardrailAutomatedReasoningTooComplexFinding":{
17081708
"type":"structure",
1709-
"members":{
1710-
},
1709+
"members":{},
17111710
"documentation":"<p>Indicates that the input exceeds the processing capacity due to the volume or complexity of the logical information.</p>"
17121711
},
17131712
"GuardrailAutomatedReasoningTranslation":{
@@ -3177,8 +3176,7 @@
31773176
},
31783177
"ModelInputPayload":{
31793178
"type":"structure",
3180-
"members":{
3181-
},
3179+
"members":{},
31823180
"document":true,
31833181
"sensitive":true
31843182
},
@@ -3551,7 +3549,8 @@
35513549
"max_tokens",
35523550
"stop_sequence",
35533551
"guardrail_intervened",
3554-
"content_filtered"
3552+
"content_filtered",
3553+
"model_context_window_exceeded"
35553554
]
35563555
},
35573556
"String":{"type":"string"},

0 commit comments

Comments
 (0)