mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-02 13:48:09 +00:00
adjusted bedrock cassettes
This commit is contained in:
@@ -188,6 +188,7 @@ HEADERS_TO_FILTER = {
|
||||
"anthropic-ratelimit-tokens-remaining": "ANTHROPIC-RATELIMIT-TOKENS-REMAINING-XXX",
|
||||
"anthropic-ratelimit-tokens-reset": "ANTHROPIC-RATELIMIT-TOKENS-RESET-XXX",
|
||||
"x-amz-date": "X-AMZ-DATE-XXX",
|
||||
"x-amz-security-token": "X-AMZ-SECURITY-TOKEN-XXX",
|
||||
"amz-sdk-invocation-id": "AMZ-SDK-INVOCATION-ID-XXX",
|
||||
"accept-encoding": "ACCEPT-ENCODING-XXX",
|
||||
"x-amzn-requestid": "X-AMZN-REQUESTID-XXX",
|
||||
|
||||
@@ -835,7 +835,7 @@ class TestBedrockNativeToolCalling:
|
||||
self, calculator_tool: CalculatorTool
|
||||
) -> None:
|
||||
"""Test Bedrock agent kickoff with mocked LLM call."""
|
||||
llm = LLM(model="bedrock/anthropic.claude-3-haiku-20240307-v1:0")
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-sonnet-4-6")
|
||||
|
||||
agent = Agent(
|
||||
role="Math Assistant",
|
||||
@@ -869,7 +869,7 @@ class TestBedrockNativeToolCalling:
|
||||
goal="Use both tools exactly as instructed",
|
||||
backstory="You follow tool instructions precisely.",
|
||||
tools=parallel_tools,
|
||||
llm=LLM(model="bedrock/anthropic.claude-3-haiku-20240307-v1:0"),
|
||||
llm=LLM(model="bedrock/us.anthropic.claude-sonnet-4-6"),
|
||||
verbose=False,
|
||||
max_iter=3,
|
||||
)
|
||||
@@ -892,7 +892,7 @@ class TestBedrockNativeToolCalling:
|
||||
goal="Use both tools exactly as instructed",
|
||||
backstory="You follow tool instructions precisely.",
|
||||
tools=parallel_tools,
|
||||
llm=LLM(model="bedrock/anthropic.claude-3-haiku-20240307-v1:0"),
|
||||
llm=LLM(model="bedrock/us.anthropic.claude-sonnet-4-6"),
|
||||
verbose=False,
|
||||
max_iter=3,
|
||||
)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,51 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Describe
|
||||
the file(s) you see. Be brief, one sentence max.\n\nInput files (content already
|
||||
loaded in conversation):\n - \"chart\" (revenue_chart.png)\n\nThis is the expected
|
||||
criteria for your final answer: A brief description of the file.\nyou MUST return
|
||||
the actual complete content as the final answer, not a summary.\n\nProvide your
|
||||
complete response:"}]}], "inferenceConfig": {"stopSequences": ["\nObservation:"]},
|
||||
"system": [{"text": "You are File Analyst. Expert at analyzing various file
|
||||
types.\nYour personal goal is: Analyze and describe files accurately"}]}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '636'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":1812},"output":{"message":{"content":[{"text":"A
|
||||
bar chart displaying revenue data over time, showing financial performance
|
||||
metrics across different periods."}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":121,"outputTokens":20,"serverToolUsage":{},"totalTokens":141}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '425'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 26 May 2026 17:06:21 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
@@ -1,57 +0,0 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Describe
|
||||
the file(s) you see. Be brief, one sentence max.\n\nInput files (content already
|
||||
loaded in conversation):\n - \"document\" (document)\n\nThis is the expected
|
||||
criteria for your final answer: A brief description of the file.\nyou MUST return
|
||||
the actual complete content as the final answer, not a summary.\n\nBegin! This
|
||||
is VERY important to you, use the tools available and give your best Final Answer,
|
||||
your job depends on it!\n\nThought:"}, {"document": {"name": "document", "format":
|
||||
"pdf", "source": {"bytes": "JVBERi0xLjQKMSAwIG9iaiA8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4gZW5kb2JqCjIgMCBvYmogPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4gZW5kb2JqCjMgMCBvYmogPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSA+PiBlbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmCjAwMDAwMDAwMDkgMDAwMDAgbgowMDAwMDAwMDU4IDAwMDAwIG4KMDAwMDAwMDExNSAwMDAwMCBuCnRyYWlsZXIgPDwgL1NpemUgNCAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKMTk2CiUlRU9GCg=="}}}]}],
|
||||
"inferenceConfig": {"stopSequences": ["\nObservation:"]}, "system": [{"text":
|
||||
"You are File Analyst. Expert at analyzing various file types.\nYour personal
|
||||
goal is: Analyze and describe files accurately\nTo give my best complete final
|
||||
answer to the task respond using the exact following format:\n\nThought: I now
|
||||
can give a great answer\nFinal Answer: Your final answer must be the great and
|
||||
the most complete as possible, it must be outcome described.\n\nI MUST use these
|
||||
formats, my job depends on it!"}]}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '1545'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":958},"output":{"message":{"content":[{"text":"Thought:
|
||||
I have reviewed the provided documents and can now give a complete answer.\n\nFinal
|
||||
Answer: The file \"document.pdf\" is an empty document with no text or content
|
||||
visible."}],"role":"assistant"}},"stopReason":"end_turn","usage":{"inputTokens":245,"outputTokens":42,"serverToolUsage":{},"totalTokens":287}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '384'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Fri, 23 Jan 2026 19:16:37 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
@@ -0,0 +1,53 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Describe
|
||||
the file(s) you see. Be brief, one sentence max.\n\nInput files (content already
|
||||
loaded in conversation):\n - \"document\" (agents.pdf)\n\nThis is the expected
|
||||
criteria for your final answer: A brief description of the file.\nyou MUST return
|
||||
the actual complete content as the final answer, not a summary.\n\nProvide your
|
||||
complete response:"}]}], "inferenceConfig": {"stopSequences": ["\nObservation:"]},
|
||||
"system": [{"text": "You are File Analyst. Expert at analyzing various file
|
||||
types.\nYour personal goal is: Analyze and describe files accurately"}]}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '632'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":2844},"output":{"message":{"content":[{"text":"The
|
||||
file \"agents.pdf\" is an academic/technical document discussing AI agents,
|
||||
their architectures, components (such as memory, planning, and tool use),
|
||||
and how large language models (LLMs) can be used to power autonomous agent
|
||||
systems."}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":119,"outputTokens":55,"serverToolUsage":{},"totalTokens":174}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '552'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 26 May 2026 17:06:24 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
@@ -2,134 +2,17 @@ interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
|
||||
15 * 8\n\nThis is the expected criteria for your final answer: Result\nyou MUST
|
||||
return the actual complete content as the final answer, not a summary.\n\nThis
|
||||
is VERY important to you, your job depends on it!"}]}], "inferenceConfig": {"stopSequences":
|
||||
["\nObservation:"]}, "system": [{"text": "You are Math Assistant. You calculate.\nYour
|
||||
personal goal is: Calculate math"}], "toolConfig": {"tools": [{"toolSpec": {"name":
|
||||
"calculator", "description": "Perform mathematical calculations. Use this for
|
||||
any math operations.", "inputSchema": {"json": {"properties": {"expression":
|
||||
{"description": "Mathematical expression to evaluate", "title": "Expression",
|
||||
"type": "string"}}, "required": ["expression"], "type": "object"}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '806'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":1540},"output":{"message":{"content":[{"text":"Here
|
||||
is the calculation for 15 * 8:"},{"toolUse":{"input":{"expression":"15 * 8"},"name":"calculator","toolUseId":"tooluse_1OIARGnOTjiITDKGd_FgMA"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"inputTokens":417,"outputTokens":68,"serverToolUsage":{},"totalTokens":485}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '351'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 22 Jan 2026 21:27:56 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
|
||||
15 * 8\n\nThis is the expected criteria for your final answer: Result\nyou MUST
|
||||
return the actual complete content as the final answer, not a summary.\n\nThis
|
||||
is VERY important to you, your job depends on it!"}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_1OIARGnOTjiITDKGd_FgMA", "name":
|
||||
"calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId":
|
||||
"tooluse_1OIARGnOTjiITDKGd_FgMA", "content": [{"text": "Error executing tool:
|
||||
CalculatorTool._run() missing 1 required positional argument: ''expression''"}]}}]},
|
||||
{"role": "user", "content": [{"text": "Analyze the tool result. If requirements
|
||||
are met, provide the Final Answer. Otherwise, call the next tool. Deliver only
|
||||
the answer without meta-commentary."}]}], "inferenceConfig": {"stopSequences":
|
||||
["\nObservation:"]}, "system": [{"text": "You are Math Assistant. You calculate.\nYour
|
||||
personal goal is: Calculate math"}], "toolConfig": {"tools": [{"toolSpec": {"name":
|
||||
"calculator", "description": "Perform mathematical calculations. Use this for
|
||||
any math operations.", "inputSchema": {"json": {"properties": {"expression":
|
||||
{"description": "Mathematical expression to evaluate", "title": "Expression",
|
||||
"type": "string"}}, "required": ["expression"], "type": "object"}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '1358'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":1071},"output":{"message":{"content":[{"toolUse":{"input":{"expression":"15
|
||||
* 8"},"name":"calculator","toolUseId":"tooluse_vjcn57LeQpS-pePkTvny8w"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"inputTokens":527,"outputTokens":55,"serverToolUsage":{},"totalTokens":582}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '304'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 22 Jan 2026 21:27:57 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
|
||||
15 * 8\n\nThis is the expected criteria for your final answer: Result\nyou MUST
|
||||
return the actual complete content as the final answer, not a summary.\n\nThis
|
||||
is VERY important to you, your job depends on it!"}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_1OIARGnOTjiITDKGd_FgMA", "name":
|
||||
"calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId":
|
||||
"tooluse_1OIARGnOTjiITDKGd_FgMA", "content": [{"text": "Error executing tool:
|
||||
CalculatorTool._run() missing 1 required positional argument: ''expression''"}]}}]},
|
||||
{"role": "user", "content": [{"text": "Analyze the tool result. If requirements
|
||||
are met, provide the Final Answer. Otherwise, call the next tool. Deliver only
|
||||
the answer without meta-commentary."}]}, {"role": "assistant", "content": [{"toolUse":
|
||||
{"toolUseId": "tooluse_vjcn57LeQpS-pePkTvny8w", "name": "calculator", "input":
|
||||
{}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId": "tooluse_vjcn57LeQpS-pePkTvny8w",
|
||||
"content": [{"text": "Error executing tool: CalculatorTool._run() missing 1
|
||||
required positional argument: ''expression''"}]}}]}, {"role": "user", "content":
|
||||
[{"text": "Analyze the tool result. If requirements are met, provide the Final
|
||||
Answer. Otherwise, call the next tool. Deliver only the answer without meta-commentary."}]}],
|
||||
return the actual complete content as the final answer, not a summary."}]}],
|
||||
"inferenceConfig": {"stopSequences": ["\nObservation:"]}, "system": [{"text":
|
||||
"You are Math Assistant. You calculate.\nYour personal goal is: Calculate math"}],
|
||||
"toolConfig": {"tools": [{"toolSpec": {"name": "calculator", "description":
|
||||
"Perform mathematical calculations. Use this for any math operations.", "inputSchema":
|
||||
{"json": {"properties": {"expression": {"description": "Mathematical expression
|
||||
to evaluate", "title": "Expression", "type": "string"}}, "required": ["expression"],
|
||||
"type": "object"}}}}]}}'
|
||||
"type": "object", "additionalProperties": false}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '1910'
|
||||
- '779'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
@@ -144,21 +27,23 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":927},"output":{"message":{"content":[{"toolUse":{"input":{"expression":"15
|
||||
* 8"},"name":"calculator","toolUseId":"tooluse__4aP-hcTR4Ozp5gTlESXbg"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"inputTokens":637,"outputTokens":57,"serverToolUsage":{},"totalTokens":694}}'
|
||||
string: '{"metrics":{"latencyMs":1957},"output":{"message":{"content":[{"text":"I''ll
|
||||
calculate 15 * 8 right away!"},{"toolUse":{"input":{"expression":"15 * 8"},"name":"calculator","toolUseId":"tooluse_XaQHWn1gW8bA6RHCR5fue8","type":"tool_use"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":642,"outputTokens":69,"serverToolUsage":{},"totalTokens":711}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '303'
|
||||
- '477'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 22 Jan 2026 21:27:58 GMT
|
||||
- Tue, 26 May 2026 17:05:59 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
@@ -167,112 +52,21 @@ interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
|
||||
15 * 8\n\nThis is the expected criteria for your final answer: Result\nyou MUST
|
||||
return the actual complete content as the final answer, not a summary.\n\nThis
|
||||
is VERY important to you, your job depends on it!"}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_1OIARGnOTjiITDKGd_FgMA", "name":
|
||||
"calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId":
|
||||
"tooluse_1OIARGnOTjiITDKGd_FgMA", "content": [{"text": "Error executing tool:
|
||||
CalculatorTool._run() missing 1 required positional argument: ''expression''"}]}}]},
|
||||
{"role": "user", "content": [{"text": "Analyze the tool result. If requirements
|
||||
are met, provide the Final Answer. Otherwise, call the next tool. Deliver only
|
||||
the answer without meta-commentary."}]}, {"role": "assistant", "content": [{"toolUse":
|
||||
{"toolUseId": "tooluse_vjcn57LeQpS-pePkTvny8w", "name": "calculator", "input":
|
||||
{}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId": "tooluse_vjcn57LeQpS-pePkTvny8w",
|
||||
"content": [{"text": "Error executing tool: CalculatorTool._run() missing 1
|
||||
required positional argument: ''expression''"}]}}]}, {"role": "user", "content":
|
||||
[{"text": "Analyze the tool result. If requirements are met, provide the Final
|
||||
Answer. Otherwise, call the next tool. Deliver only the answer without meta-commentary."}]},
|
||||
{"role": "assistant", "content": [{"toolUse": {"toolUseId": "tooluse__4aP-hcTR4Ozp5gTlESXbg",
|
||||
"name": "calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult":
|
||||
{"toolUseId": "tooluse__4aP-hcTR4Ozp5gTlESXbg", "content": [{"text": "Error
|
||||
executing tool: CalculatorTool._run() missing 1 required positional argument:
|
||||
''expression''"}]}}]}, {"role": "user", "content": [{"text": "Analyze the tool
|
||||
result. If requirements are met, provide the Final Answer. Otherwise, call the
|
||||
next tool. Deliver only the answer without meta-commentary."}]}], "inferenceConfig":
|
||||
{"stopSequences": ["\nObservation:"]}, "system": [{"text": "You are Math Assistant.
|
||||
You calculate.\nYour personal goal is: Calculate math"}], "toolConfig": {"tools":
|
||||
[{"toolSpec": {"name": "calculator", "description": "Perform mathematical calculations.
|
||||
Use this for any math operations.", "inputSchema": {"json": {"properties": {"expression":
|
||||
{"description": "Mathematical expression to evaluate", "title": "Expression",
|
||||
"type": "string"}}, "required": ["expression"], "type": "object"}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '2462'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":1226},"output":{"message":{"content":[{"toolUse":{"input":{"expression":"15
|
||||
* 8"},"name":"calculator","toolUseId":"tooluse_fEJhgDNjSUic0g97dN8Xww"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"inputTokens":747,"outputTokens":55,"serverToolUsage":{},"totalTokens":802}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '304'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 22 Jan 2026 21:28:00 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
|
||||
15 * 8\n\nThis is the expected criteria for your final answer: Result\nyou MUST
|
||||
return the actual complete content as the final answer, not a summary.\n\nThis
|
||||
is VERY important to you, your job depends on it!"}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_1OIARGnOTjiITDKGd_FgMA", "name":
|
||||
"calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId":
|
||||
"tooluse_1OIARGnOTjiITDKGd_FgMA", "content": [{"text": "Error executing tool:
|
||||
CalculatorTool._run() missing 1 required positional argument: ''expression''"}]}}]},
|
||||
{"role": "user", "content": [{"text": "Analyze the tool result. If requirements
|
||||
are met, provide the Final Answer. Otherwise, call the next tool. Deliver only
|
||||
the answer without meta-commentary."}]}, {"role": "assistant", "content": [{"toolUse":
|
||||
{"toolUseId": "tooluse_vjcn57LeQpS-pePkTvny8w", "name": "calculator", "input":
|
||||
{}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId": "tooluse_vjcn57LeQpS-pePkTvny8w",
|
||||
"content": [{"text": "Error executing tool: CalculatorTool._run() missing 1
|
||||
required positional argument: ''expression''"}]}}]}, {"role": "user", "content":
|
||||
[{"text": "Analyze the tool result. If requirements are met, provide the Final
|
||||
Answer. Otherwise, call the next tool. Deliver only the answer without meta-commentary."}]},
|
||||
{"role": "assistant", "content": [{"toolUse": {"toolUseId": "tooluse__4aP-hcTR4Ozp5gTlESXbg",
|
||||
"name": "calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult":
|
||||
{"toolUseId": "tooluse__4aP-hcTR4Ozp5gTlESXbg", "content": [{"text": "Error
|
||||
executing tool: CalculatorTool._run() missing 1 required positional argument:
|
||||
''expression''"}]}}]}, {"role": "user", "content": [{"text": "Analyze the tool
|
||||
result. If requirements are met, provide the Final Answer. Otherwise, call the
|
||||
next tool. Deliver only the answer without meta-commentary."}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_fEJhgDNjSUic0g97dN8Xww", "name":
|
||||
"calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId":
|
||||
"tooluse_fEJhgDNjSUic0g97dN8Xww", "content": [{"text": "Error executing tool:
|
||||
CalculatorTool._run() missing 1 required positional argument: ''expression''"}]}}]},
|
||||
{"role": "user", "content": [{"text": "Analyze the tool result. If requirements
|
||||
are met, provide the Final Answer. Otherwise, call the next tool. Deliver only
|
||||
the answer without meta-commentary."}]}], "inferenceConfig": {"stopSequences":
|
||||
return the actual complete content as the final answer, not a summary."}]},
|
||||
{"role": "assistant", "content": [{"toolUse": {"toolUseId": "tooluse_XaQHWn1gW8bA6RHCR5fue8",
|
||||
"name": "calculator", "input": {"expression": "15 * 8"}}}]}, {"role": "user",
|
||||
"content": [{"toolResult": {"toolUseId": "tooluse_XaQHWn1gW8bA6RHCR5fue8", "content":
|
||||
[{"text": "The result of 15 * 8 is 120"}]}}]}], "inferenceConfig": {"stopSequences":
|
||||
["\nObservation:"]}, "system": [{"text": "You are Math Assistant. You calculate.\nYour
|
||||
personal goal is: Calculate math"}], "toolConfig": {"tools": [{"toolSpec": {"name":
|
||||
"calculator", "description": "Perform mathematical calculations. Use this for
|
||||
any math operations.", "inputSchema": {"json": {"properties": {"expression":
|
||||
{"description": "Mathematical expression to evaluate", "title": "Expression",
|
||||
"type": "string"}}, "required": ["expression"], "type": "object"}}}}]}}'
|
||||
"type": "string"}}, "required": ["expression"], "type": "object", "additionalProperties":
|
||||
false}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '3014'
|
||||
- '1084'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
@@ -287,196 +81,22 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":947},"output":{"message":{"content":[{"toolUse":{"input":{"expression":"15
|
||||
* 8"},"name":"calculator","toolUseId":"tooluse_F5QIGY91SBOeM4VcFRB73A"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"inputTokens":857,"outputTokens":55,"serverToolUsage":{},"totalTokens":912}}'
|
||||
string: '{"metrics":{"latencyMs":1689},"output":{"message":{"content":[{"text":"120"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":723,"outputTokens":4,"serverToolUsage":{},"totalTokens":727}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '303'
|
||||
- '317'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 22 Jan 2026 21:28:01 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
|
||||
15 * 8\n\nThis is the expected criteria for your final answer: Result\nyou MUST
|
||||
return the actual complete content as the final answer, not a summary.\n\nThis
|
||||
is VERY important to you, your job depends on it!"}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_1OIARGnOTjiITDKGd_FgMA", "name":
|
||||
"calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId":
|
||||
"tooluse_1OIARGnOTjiITDKGd_FgMA", "content": [{"text": "Error executing tool:
|
||||
CalculatorTool._run() missing 1 required positional argument: ''expression''"}]}}]},
|
||||
{"role": "user", "content": [{"text": "Analyze the tool result. If requirements
|
||||
are met, provide the Final Answer. Otherwise, call the next tool. Deliver only
|
||||
the answer without meta-commentary."}]}, {"role": "assistant", "content": [{"toolUse":
|
||||
{"toolUseId": "tooluse_vjcn57LeQpS-pePkTvny8w", "name": "calculator", "input":
|
||||
{}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId": "tooluse_vjcn57LeQpS-pePkTvny8w",
|
||||
"content": [{"text": "Error executing tool: CalculatorTool._run() missing 1
|
||||
required positional argument: ''expression''"}]}}]}, {"role": "user", "content":
|
||||
[{"text": "Analyze the tool result. If requirements are met, provide the Final
|
||||
Answer. Otherwise, call the next tool. Deliver only the answer without meta-commentary."}]},
|
||||
{"role": "assistant", "content": [{"toolUse": {"toolUseId": "tooluse__4aP-hcTR4Ozp5gTlESXbg",
|
||||
"name": "calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult":
|
||||
{"toolUseId": "tooluse__4aP-hcTR4Ozp5gTlESXbg", "content": [{"text": "Error
|
||||
executing tool: CalculatorTool._run() missing 1 required positional argument:
|
||||
''expression''"}]}}]}, {"role": "user", "content": [{"text": "Analyze the tool
|
||||
result. If requirements are met, provide the Final Answer. Otherwise, call the
|
||||
next tool. Deliver only the answer without meta-commentary."}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_fEJhgDNjSUic0g97dN8Xww", "name":
|
||||
"calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId":
|
||||
"tooluse_fEJhgDNjSUic0g97dN8Xww", "content": [{"text": "Error executing tool:
|
||||
CalculatorTool._run() missing 1 required positional argument: ''expression''"}]}}]},
|
||||
{"role": "user", "content": [{"text": "Analyze the tool result. If requirements
|
||||
are met, provide the Final Answer. Otherwise, call the next tool. Deliver only
|
||||
the answer without meta-commentary."}]}, {"role": "assistant", "content": [{"toolUse":
|
||||
{"toolUseId": "tooluse_F5QIGY91SBOeM4VcFRB73A", "name": "calculator", "input":
|
||||
{}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId": "tooluse_F5QIGY91SBOeM4VcFRB73A",
|
||||
"content": [{"text": "Error executing tool: CalculatorTool._run() missing 1
|
||||
required positional argument: ''expression''"}]}}]}, {"role": "user", "content":
|
||||
[{"text": "Analyze the tool result. If requirements are met, provide the Final
|
||||
Answer. Otherwise, call the next tool. Deliver only the answer without meta-commentary."}]},
|
||||
{"role": "assistant", "content": [{"text": "Now it''s time you MUST give your
|
||||
absolute best final answer. You''ll ignore all previous instructions, stop using
|
||||
any tools, and just return your absolute BEST Final answer."}]}], "inferenceConfig":
|
||||
{"stopSequences": ["\nObservation:"]}, "system": [{"text": "You are Math Assistant.
|
||||
You calculate.\nYour personal goal is: Calculate math"}], "toolConfig": {"tools":
|
||||
[{"toolSpec": {"name": "calculator", "description": "Tool: calculator", "inputSchema":
|
||||
{"json": {"type": "object", "properties": {}}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '3599'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"message":"The model returned the following errors: Your API request
|
||||
included an `assistant` message in the final position, which would pre-fill
|
||||
the `assistant` response. When using tools, pre-filling the `assistant` response
|
||||
is not supported."}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '246'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 22 Jan 2026 21:28:02 GMT
|
||||
x-amzn-ErrorType:
|
||||
- ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 400
|
||||
message: Bad Request
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
|
||||
15 * 8\n\nThis is the expected criteria for your final answer: Result\nyou MUST
|
||||
return the actual complete content as the final answer, not a summary.\n\nThis
|
||||
is VERY important to you, your job depends on it!"}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_1OIARGnOTjiITDKGd_FgMA", "name":
|
||||
"calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId":
|
||||
"tooluse_1OIARGnOTjiITDKGd_FgMA", "content": [{"text": "Error executing tool:
|
||||
CalculatorTool._run() missing 1 required positional argument: ''expression''"}]}}]},
|
||||
{"role": "user", "content": [{"text": "Analyze the tool result. If requirements
|
||||
are met, provide the Final Answer. Otherwise, call the next tool. Deliver only
|
||||
the answer without meta-commentary."}]}, {"role": "assistant", "content": [{"toolUse":
|
||||
{"toolUseId": "tooluse_vjcn57LeQpS-pePkTvny8w", "name": "calculator", "input":
|
||||
{}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId": "tooluse_vjcn57LeQpS-pePkTvny8w",
|
||||
"content": [{"text": "Error executing tool: CalculatorTool._run() missing 1
|
||||
required positional argument: ''expression''"}]}}]}, {"role": "user", "content":
|
||||
[{"text": "Analyze the tool result. If requirements are met, provide the Final
|
||||
Answer. Otherwise, call the next tool. Deliver only the answer without meta-commentary."}]},
|
||||
{"role": "assistant", "content": [{"toolUse": {"toolUseId": "tooluse__4aP-hcTR4Ozp5gTlESXbg",
|
||||
"name": "calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult":
|
||||
{"toolUseId": "tooluse__4aP-hcTR4Ozp5gTlESXbg", "content": [{"text": "Error
|
||||
executing tool: CalculatorTool._run() missing 1 required positional argument:
|
||||
''expression''"}]}}]}, {"role": "user", "content": [{"text": "Analyze the tool
|
||||
result. If requirements are met, provide the Final Answer. Otherwise, call the
|
||||
next tool. Deliver only the answer without meta-commentary."}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_fEJhgDNjSUic0g97dN8Xww", "name":
|
||||
"calculator", "input": {}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId":
|
||||
"tooluse_fEJhgDNjSUic0g97dN8Xww", "content": [{"text": "Error executing tool:
|
||||
CalculatorTool._run() missing 1 required positional argument: ''expression''"}]}}]},
|
||||
{"role": "user", "content": [{"text": "Analyze the tool result. If requirements
|
||||
are met, provide the Final Answer. Otherwise, call the next tool. Deliver only
|
||||
the answer without meta-commentary."}]}, {"role": "assistant", "content": [{"toolUse":
|
||||
{"toolUseId": "tooluse_F5QIGY91SBOeM4VcFRB73A", "name": "calculator", "input":
|
||||
{}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId": "tooluse_F5QIGY91SBOeM4VcFRB73A",
|
||||
"content": [{"text": "Error executing tool: CalculatorTool._run() missing 1
|
||||
required positional argument: ''expression''"}]}}]}, {"role": "user", "content":
|
||||
[{"text": "Analyze the tool result. If requirements are met, provide the Final
|
||||
Answer. Otherwise, call the next tool. Deliver only the answer without meta-commentary."}]},
|
||||
{"role": "assistant", "content": [{"text": "Now it''s time you MUST give your
|
||||
absolute best final answer. You''ll ignore all previous instructions, stop using
|
||||
any tools, and just return your absolute BEST Final answer."}]}, {"role": "user",
|
||||
"content": [{"text": "\nCurrent Task: Calculate 15 * 8\n\nThis is the expected
|
||||
criteria for your final answer: Result\nyou MUST return the actual complete
|
||||
content as the final answer, not a summary.\n\nThis is VERY important to you,
|
||||
your job depends on it!"}]}, {"role": "assistant", "content": [{"text": "Now
|
||||
it''s time you MUST give your absolute best final answer. You''ll ignore all
|
||||
previous instructions, stop using any tools, and just return your absolute BEST
|
||||
Final answer."}]}], "inferenceConfig": {"stopSequences": ["\nObservation:"]},
|
||||
"system": [{"text": "You are Math Assistant. You calculate.\nYour personal goal
|
||||
is: Calculate math\n\nYou are Math Assistant. You calculate.\nYour personal
|
||||
goal is: Calculate math"}], "toolConfig": {"tools": [{"toolSpec": {"name": "calculator",
|
||||
"description": "Tool: calculator", "inputSchema": {"json": {"type": "object",
|
||||
"properties": {}}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '4181'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":715},"output":{"message":{"content":[{"text":"\n\n120"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"inputTokens":1082,"outputTokens":5,"serverToolUsage":{},"totalTokens":1087}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '212'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 22 Jan 2026 21:28:03 GMT
|
||||
- Tue, 26 May 2026 17:06:01 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
|
||||
@@ -39,25 +39,112 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"message":"The security token included in the request is invalid."}'
|
||||
string: '{"metrics":{"latencyMs":2714},"output":{"message":{"content":[{"text":"I''ll
|
||||
execute all 3 parallel searches simultaneously right now!"},{"toolUse":{"input":{"query":"latest
|
||||
OpenAI model release notes"},"name":"parallel_local_search_one","toolUseId":"tooluse_kooGjILXmVRg8edl3YuEf4","type":"tool_use"}},{"toolUse":{"input":{"query":"latest
|
||||
Anthropic model release notes"},"name":"parallel_local_search_two","toolUseId":"tooluse_qa71o2cLA65qg5TyweI63c","type":"tool_use"}},{"toolUse":{"input":{"query":"latest
|
||||
Gemini model release notes"},"name":"parallel_local_search_three","toolUseId":"tooluse_gPf5hAC0sogbIJEjDBTIvO","type":"tool_use"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":914,"outputTokens":169,"serverToolUsage":{},"totalTokens":1083}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '68'
|
||||
- '882'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 19 Feb 2026 00:00:08 GMT
|
||||
x-amzn-ErrorType:
|
||||
- UnrecognizedClientException:http://internal.amazon.com/coral/com.amazon.coral.service/
|
||||
- Tue, 26 May 2026 17:06:04 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 403
|
||||
message: Forbidden
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: This
|
||||
is a tool-calling compliance test. In your next assistant turn, emit exactly
|
||||
3 tool calls in the same response (parallel tool calls), in this order: 1) parallel_local_search_one(query=''latest
|
||||
OpenAI model release notes''), 2) parallel_local_search_two(query=''latest Anthropic
|
||||
model release notes''), 3) parallel_local_search_three(query=''latest Gemini
|
||||
model release notes''). Do not call any other tools and do not answer before
|
||||
those 3 tool calls are emitted. After the tool results return, provide a one
|
||||
paragraph summary."}]}, {"role": "assistant", "content": [{"toolUse": {"toolUseId":
|
||||
"tooluse_kooGjILXmVRg8edl3YuEf4", "name": "parallel_local_search_one", "input":
|
||||
{"query": "latest OpenAI model release notes"}}}, {"toolUse": {"toolUseId":
|
||||
"tooluse_qa71o2cLA65qg5TyweI63c", "name": "parallel_local_search_two", "input":
|
||||
{"query": "latest Anthropic model release notes"}}}, {"toolUse": {"toolUseId":
|
||||
"tooluse_gPf5hAC0sogbIJEjDBTIvO", "name": "parallel_local_search_three", "input":
|
||||
{"query": "latest Gemini model release notes"}}}]}, {"role": "user", "content":
|
||||
[{"toolResult": {"toolUseId": "tooluse_kooGjILXmVRg8edl3YuEf4", "content": [{"text":
|
||||
"[one] latest OpenAI model release notes"}]}}, {"toolResult": {"toolUseId":
|
||||
"tooluse_qa71o2cLA65qg5TyweI63c", "content": [{"text": "[two] latest Anthropic
|
||||
model release notes"}]}}, {"toolResult": {"toolUseId": "tooluse_gPf5hAC0sogbIJEjDBTIvO",
|
||||
"content": [{"text": "[three] latest Gemini model release notes"}]}}]}], "inferenceConfig":
|
||||
{"stopSequences": ["\nObservation:"]}, "system": [{"text": "You are Parallel
|
||||
Tool Agent. You follow tool instructions precisely.\nYour personal goal is:
|
||||
Use both tools exactly as instructed"}], "toolConfig": {"tools": [{"toolSpec":
|
||||
{"name": "parallel_local_search_one", "description": "Local search tool #1 for
|
||||
concurrency testing.", "inputSchema": {"json": {"properties": {"query": {"description":
|
||||
"Search query", "title": "Query", "type": "string"}}, "required": ["query"],
|
||||
"type": "object", "additionalProperties": false}}}}, {"toolSpec": {"name": "parallel_local_search_two",
|
||||
"description": "Local search tool #2 for concurrency testing.", "inputSchema":
|
||||
{"json": {"properties": {"query": {"description": "Search query", "title": "Query",
|
||||
"type": "string"}}, "required": ["query"], "type": "object", "additionalProperties":
|
||||
false}}}}, {"toolSpec": {"name": "parallel_local_search_three", "description":
|
||||
"Local search tool #3 for concurrency testing.", "inputSchema": {"json": {"properties":
|
||||
{"query": {"description": "Search query", "title": "Query", "type": "string"}},
|
||||
"required": ["query"], "type": "object", "additionalProperties": false}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '2711'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: "{\"metrics\":{\"latencyMs\":5051},\"output\":{\"message\":{\"content\":[{\"text\":\"The
|
||||
three parallel searches were executed simultaneously across all tools, querying
|
||||
the latest release notes for OpenAI, Anthropic, and Gemini models respectively.
|
||||
The search results returned placeholder outputs from each tool (indicating
|
||||
a test environment), confirming that all three tools \u2014 **parallel_local_search_one**,
|
||||
**parallel_local_search_two**, and **parallel_local_search_three** \u2014
|
||||
fired concurrently and responded successfully in the correct order. In a live
|
||||
environment, these results would contain detailed release notes for the latest
|
||||
models from each AI provider, such as OpenAI's GPT series updates, Anthropic's
|
||||
Claude model iterations, and Google's Gemini model announcements, allowing
|
||||
for a comprehensive side-by-side comparison of the most recent advancements
|
||||
across the three leading AI platforms.\"}],\"role\":\"assistant\"}},\"stopReason\":\"end_turn\",\"usage\":{\"cacheReadInputTokenCount\":0,\"cacheReadInputTokens\":0,\"cacheWriteInputTokenCount\":0,\"cacheWriteInputTokens\":0,\"inputTokens\":1197,\"outputTokens\":173,\"serverToolUsage\":{},\"totalTokens\":1370}}"
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '1141'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Tue, 26 May 2026 17:06:10 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
|
||||
@@ -41,27 +41,31 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"message":"The security token included in the request is invalid."}'
|
||||
string: '{"metrics":{"latencyMs":2911},"output":{"message":{"content":[{"text":"I''ll
|
||||
execute all 3 parallel searches simultaneously right away!"},{"toolUse":{"input":{"query":"latest
|
||||
OpenAI model release notes"},"name":"parallel_local_search_one","toolUseId":"tooluse_hd4QaBJIe0j2FasplcWi78","type":"tool_use"}},{"toolUse":{"input":{"query":"latest
|
||||
Anthropic model release notes"},"name":"parallel_local_search_two","toolUseId":"tooluse_yB6xS6E1bsIOpv8rWcnpiR","type":"tool_use"}},{"toolUse":{"input":{"query":"latest
|
||||
Gemini model release notes"},"name":"parallel_local_search_three","toolUseId":"tooluse_cjCrMYQMmA8diLWBnKJ86o","type":"tool_use"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":951,"outputTokens":169,"serverToolUsage":{},"totalTokens":1120}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '68'
|
||||
- '883'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 19 Feb 2026 00:00:07 GMT
|
||||
x-amzn-ErrorType:
|
||||
- UnrecognizedClientException:http://internal.amazon.com/coral/com.amazon.coral.service/
|
||||
- Tue, 26 May 2026 17:06:14 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 403
|
||||
message: Forbidden
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: This
|
||||
is a tool-calling compliance test. In your next assistant turn, emit exactly
|
||||
@@ -72,122 +76,35 @@ interactions:
|
||||
those 3 tool calls are emitted. After the tool results return, provide a one
|
||||
paragraph summary.\n\nThis is the expected criteria for your final answer: A
|
||||
one sentence summary of both tool outputs\nyou MUST return the actual complete
|
||||
content as the final answer, not a summary."}]}, {"role": "user", "content":
|
||||
[{"text": "\nCurrent Task: This is a tool-calling compliance test. In your next
|
||||
assistant turn, emit exactly 3 tool calls in the same response (parallel tool
|
||||
calls), in this order: 1) parallel_local_search_one(query=''latest OpenAI model
|
||||
release notes''), 2) parallel_local_search_two(query=''latest Anthropic model
|
||||
release notes''), 3) parallel_local_search_three(query=''latest Gemini model
|
||||
release notes''). Do not call any other tools and do not answer before those
|
||||
3 tool calls are emitted. After the tool results return, provide a one paragraph
|
||||
summary.\n\nThis is the expected criteria for your final answer: A one sentence
|
||||
summary of both tool outputs\nyou MUST return the actual complete content as
|
||||
the final answer, not a summary."}]}], "inferenceConfig": {"stopSequences":
|
||||
["\nObservation:"]}, "system": [{"text": "You are Parallel Tool Agent. You follow
|
||||
tool instructions precisely.\nYour personal goal is: Use both tools exactly
|
||||
as instructed\n\nYou are Parallel Tool Agent. You follow tool instructions precisely.\nYour
|
||||
personal goal is: Use both tools exactly as instructed"}], "toolConfig": {"tools":
|
||||
[{"toolSpec": {"name": "parallel_local_search_one", "description": "Local search
|
||||
tool #1 for concurrency testing.", "inputSchema": {"json": {"properties": {"query":
|
||||
{"description": "Search query", "title": "Query", "type": "string"}}, "required":
|
||||
["query"], "type": "object", "additionalProperties": false}}}}, {"toolSpec":
|
||||
{"name": "parallel_local_search_two", "description": "Local search tool #2 for
|
||||
content as the final answer, not a summary."}]}, {"role": "assistant", "content":
|
||||
[{"toolUse": {"toolUseId": "tooluse_hd4QaBJIe0j2FasplcWi78", "name": "parallel_local_search_one",
|
||||
"input": {"query": "latest OpenAI model release notes"}}}, {"toolUse": {"toolUseId":
|
||||
"tooluse_yB6xS6E1bsIOpv8rWcnpiR", "name": "parallel_local_search_two", "input":
|
||||
{"query": "latest Anthropic model release notes"}}}, {"toolUse": {"toolUseId":
|
||||
"tooluse_cjCrMYQMmA8diLWBnKJ86o", "name": "parallel_local_search_three", "input":
|
||||
{"query": "latest Gemini model release notes"}}}]}, {"role": "user", "content":
|
||||
[{"toolResult": {"toolUseId": "tooluse_hd4QaBJIe0j2FasplcWi78", "content": [{"text":
|
||||
"[one] latest OpenAI model release notes"}]}}, {"toolResult": {"toolUseId":
|
||||
"tooluse_yB6xS6E1bsIOpv8rWcnpiR", "content": [{"text": "[two] latest Anthropic
|
||||
model release notes"}]}}, {"toolResult": {"toolUseId": "tooluse_cjCrMYQMmA8diLWBnKJ86o",
|
||||
"content": [{"text": "[three] latest Gemini model release notes"}]}}]}], "inferenceConfig":
|
||||
{"stopSequences": ["\nObservation:"]}, "system": [{"text": "You are Parallel
|
||||
Tool Agent. You follow tool instructions precisely.\nYour personal goal is:
|
||||
Use both tools exactly as instructed"}], "toolConfig": {"tools": [{"toolSpec":
|
||||
{"name": "parallel_local_search_one", "description": "Local search tool #1 for
|
||||
concurrency testing.", "inputSchema": {"json": {"properties": {"query": {"description":
|
||||
"Search query", "title": "Query", "type": "string"}}, "required": ["query"],
|
||||
"type": "object", "additionalProperties": false}}}}, {"toolSpec": {"name": "parallel_local_search_three",
|
||||
"description": "Local search tool #3 for concurrency testing.", "inputSchema":
|
||||
"type": "object", "additionalProperties": false}}}}, {"toolSpec": {"name": "parallel_local_search_two",
|
||||
"description": "Local search tool #2 for concurrency testing.", "inputSchema":
|
||||
{"json": {"properties": {"query": {"description": "Search query", "title": "Query",
|
||||
"type": "string"}}, "required": ["query"], "type": "object", "additionalProperties":
|
||||
false}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '2855'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"message":"The security token included in the request is invalid."}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '68'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 19 Feb 2026 00:00:07 GMT
|
||||
x-amzn-ErrorType:
|
||||
- UnrecognizedClientException:http://internal.amazon.com/coral/com.amazon.coral.service/
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 403
|
||||
message: Forbidden
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: This
|
||||
is a tool-calling compliance test. In your next assistant turn, emit exactly
|
||||
3 tool calls in the same response (parallel tool calls), in this order: 1) parallel_local_search_one(query=''latest
|
||||
OpenAI model release notes''), 2) parallel_local_search_two(query=''latest Anthropic
|
||||
model release notes''), 3) parallel_local_search_three(query=''latest Gemini
|
||||
model release notes''). Do not call any other tools and do not answer before
|
||||
those 3 tool calls are emitted. After the tool results return, provide a one
|
||||
paragraph summary.\n\nThis is the expected criteria for your final answer: A
|
||||
one sentence summary of both tool outputs\nyou MUST return the actual complete
|
||||
content as the final answer, not a summary."}]}, {"role": "user", "content":
|
||||
[{"text": "\nCurrent Task: This is a tool-calling compliance test. In your next
|
||||
assistant turn, emit exactly 3 tool calls in the same response (parallel tool
|
||||
calls), in this order: 1) parallel_local_search_one(query=''latest OpenAI model
|
||||
release notes''), 2) parallel_local_search_two(query=''latest Anthropic model
|
||||
release notes''), 3) parallel_local_search_three(query=''latest Gemini model
|
||||
release notes''). Do not call any other tools and do not answer before those
|
||||
3 tool calls are emitted. After the tool results return, provide a one paragraph
|
||||
summary.\n\nThis is the expected criteria for your final answer: A one sentence
|
||||
summary of both tool outputs\nyou MUST return the actual complete content as
|
||||
the final answer, not a summary."}]}, {"role": "user", "content": [{"text":
|
||||
"\nCurrent Task: This is a tool-calling compliance test. In your next assistant
|
||||
turn, emit exactly 3 tool calls in the same response (parallel tool calls),
|
||||
in this order: 1) parallel_local_search_one(query=''latest OpenAI model release
|
||||
notes''), 2) parallel_local_search_two(query=''latest Anthropic model release
|
||||
notes''), 3) parallel_local_search_three(query=''latest Gemini model release
|
||||
notes''). Do not call any other tools and do not answer before those 3 tool
|
||||
calls are emitted. After the tool results return, provide a one paragraph summary.\n\nThis
|
||||
is the expected criteria for your final answer: A one sentence summary of both
|
||||
tool outputs\nyou MUST return the actual complete content as the final answer,
|
||||
not a summary."}]}], "inferenceConfig": {"stopSequences": ["\nObservation:"]},
|
||||
"system": [{"text": "You are Parallel Tool Agent. You follow tool instructions
|
||||
precisely.\nYour personal goal is: Use both tools exactly as instructed\n\nYou
|
||||
are Parallel Tool Agent. You follow tool instructions precisely.\nYour personal
|
||||
goal is: Use both tools exactly as instructed\n\nYou are Parallel Tool Agent.
|
||||
You follow tool instructions precisely.\nYour personal goal is: Use both tools
|
||||
exactly as instructed"}], "toolConfig": {"tools": [{"toolSpec": {"name": "parallel_local_search_one",
|
||||
"description": "Local search tool #1 for concurrency testing.", "inputSchema":
|
||||
{"json": {"properties": {"query": {"description": "Search query", "title": "Query",
|
||||
"type": "string"}}, "required": ["query"], "type": "object", "additionalProperties":
|
||||
false}}}}, {"toolSpec": {"name": "parallel_local_search_two", "description":
|
||||
"Local search tool #2 for concurrency testing.", "inputSchema": {"json": {"properties":
|
||||
false}}}}, {"toolSpec": {"name": "parallel_local_search_three", "description":
|
||||
"Local search tool #3 for concurrency testing.", "inputSchema": {"json": {"properties":
|
||||
{"query": {"description": "Search query", "title": "Query", "type": "string"}},
|
||||
"required": ["query"], "type": "object", "additionalProperties": false}}}},
|
||||
{"toolSpec": {"name": "parallel_local_search_three", "description": "Local search
|
||||
tool #3 for concurrency testing.", "inputSchema": {"json": {"properties": {"query":
|
||||
{"description": "Search query", "title": "Query", "type": "string"}}, "required":
|
||||
["query"], "type": "object", "additionalProperties": false}}}}]}}'
|
||||
"required": ["query"], "type": "object", "additionalProperties": false}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '3756'
|
||||
- '2892'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
@@ -202,25 +119,35 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"message":"The security token included in the request is invalid."}'
|
||||
string: "{\"metrics\":{\"latencyMs\":4350},\"output\":{\"message\":{\"content\":[{\"text\":\"Here
|
||||
is the complete content returned by all three tools:\\n\\n- **Tool 1 (parallel_local_search_one):**
|
||||
`[one] latest OpenAI model release notes`\\n- **Tool 2 (parallel_local_search_two):**
|
||||
`[two] latest Anthropic model release notes`\\n- **Tool 3 (parallel_local_search_three):**
|
||||
`[three] latest Gemini model release notes`\\n\\nThe three parallel searches
|
||||
returned placeholder results confirming the queries were received: the first
|
||||
tool acknowledged a search for the latest OpenAI model release notes, the
|
||||
second for the latest Anthropic model release notes, and the third for the
|
||||
latest Gemini model release notes \u2014 indicating the local search tools
|
||||
processed all three concurrent requests successfully but did not return detailed
|
||||
release note content beyond the query echo.\"}],\"role\":\"assistant\"}},\"stopReason\":\"end_turn\",\"usage\":{\"cacheReadInputTokenCount\":0,\"cacheReadInputTokens\":0,\"cacheWriteInputTokenCount\":0,\"cacheWriteInputTokens\":0,\"inputTokens\":1234,\"outputTokens\":181,\"serverToolUsage\":{},\"totalTokens\":1415}}"
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '68'
|
||||
- '1093'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 19 Feb 2026 00:00:07 GMT
|
||||
x-amzn-ErrorType:
|
||||
- UnrecognizedClientException:http://internal.amazon.com/coral/com.amazon.coral.service/
|
||||
- Tue, 26 May 2026 17:06:19 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 403
|
||||
message: Forbidden
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
|
||||
@@ -21,61 +21,22 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":867},"output":{"message":{"content":[{"text":"PDF"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"inputTokens":57,"outputTokens":4,"serverToolUsage":{},"totalTokens":61}}'
|
||||
string: '{"metrics":{"latencyMs":2109},"output":{"message":{"content":[{"text":"Blank"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":1606,"outputTokens":5,"serverToolUsage":{},"totalTokens":1611}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '204'
|
||||
- '321'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Fri, 23 Jan 2026 03:26:35 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "What type of document
|
||||
is this? Answer in one word."}, {"document": {"name": "document", "format":
|
||||
"pdf", "source": {"bytes": "JVBERi0xLjQKMSAwIG9iaiA8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4gZW5kb2JqCjIgMCBvYmogPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4gZW5kb2JqCjMgMCBvYmogPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSA+PiBlbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmCjAwMDAwMDAwMDkgMDAwMDAgbgowMDAwMDAwMDU4IDAwMDAwIG4KMDAwMDAwMDExNSAwMDAwMCBuCnRyYWlsZXIgPDwgL1NpemUgNCAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKMTk2CiUlRU9GCg=="}}}]}],
|
||||
"inferenceConfig": {}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '646'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
User-Agent:
|
||||
- X-USER-AGENT-XXX
|
||||
amz-sdk-invocation-id:
|
||||
- AMZ-SDK-INVOCATION-ID-XXX
|
||||
amz-sdk-request:
|
||||
- !!binary |
|
||||
YXR0ZW1wdD0x
|
||||
authorization:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-haiku-20240307-v1%3A0/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":291},"output":{"message":{"content":[{"text":"Incomplete"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"inputTokens":57,"outputTokens":5,"serverToolUsage":{},"totalTokens":62}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '211'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Fri, 23 Jan 2026 06:02:32 GMT
|
||||
- Tue, 26 May 2026 17:06:30 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,20 +8,10 @@ interactions:
|
||||
[{"toolSpec": {"name": "add_numbers", "description": "Add two numbers together
|
||||
and return the sum.", "inputSchema": {"json": {"properties": {"a": {"title":
|
||||
"A", "type": "integer"}, "b": {"title": "B", "type": "integer"}}, "required":
|
||||
["a", "b"], "type": "object", "additionalProperties": false}}}}, {"toolSpec":
|
||||
{"name": "structured_output", "description": "Use this tool to provide your
|
||||
final structured response. Call this tool when you have gathered all necessary
|
||||
information and are ready to provide the final answer in the required format.",
|
||||
"inputSchema": {"json": {"description": "Structured output for calculation results.",
|
||||
"properties": {"operation": {"description": "The mathematical operation performed",
|
||||
"title": "Operation", "type": "string"}, "result": {"description": "The result
|
||||
of the calculation", "title": "Result", "type": "integer"}, "explanation": {"description":
|
||||
"Brief explanation of the calculation", "title": "Explanation", "type": "string"}},
|
||||
"required": ["operation", "result", "explanation"], "title": "CalculationResult",
|
||||
"type": "object", "additionalProperties": false}}}}]}}'
|
||||
["a", "b"], "type": "object", "additionalProperties": false}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '1509'
|
||||
- '702'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
@@ -36,21 +26,23 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-sonnet-20240229-v1%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":1968},"output":{"message":{"content":[{"text":"Okay,
|
||||
let''s calculate 15 + 27 using the add_numbers tool:"},{"toolUse":{"input":{"a":15,"b":27},"name":"add_numbers","toolUseId":"tooluse_pSseOamVELzpL3kQG5VukN"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"inputTokens":488,"outputTokens":91,"serverToolUsage":{},"totalTokens":579}}'
|
||||
string: '{"metrics":{"latencyMs":2257},"output":{"message":{"content":[{"text":"I''ll
|
||||
calculate 15 + 27 right away using the `add_numbers` tool!"},{"toolUse":{"input":{"a":15,"b":27},"name":"add_numbers","toolUseId":"tooluse_CVmuFOrTItCY07vxuA84mU","type":"tool_use"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":645,"outputTokens":92,"serverToolUsage":{},"totalTokens":737}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '366'
|
||||
- '500'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Feb 2026 22:01:04 GMT
|
||||
- Tue, 26 May 2026 17:04:49 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
@@ -59,29 +51,19 @@ interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
|
||||
15 + 27 using your add_numbers tool. Report the result."}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_pSseOamVELzpL3kQG5VukN", "name":
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_CVmuFOrTItCY07vxuA84mU", "name":
|
||||
"add_numbers", "input": {"a": 15, "b": 27}}}]}, {"role": "user", "content":
|
||||
[{"toolResult": {"toolUseId": "tooluse_pSseOamVELzpL3kQG5VukN", "content": [{"text":
|
||||
[{"toolResult": {"toolUseId": "tooluse_CVmuFOrTItCY07vxuA84mU", "content": [{"text":
|
||||
"42"}]}}]}], "inferenceConfig": {"stopSequences": ["\nObservation:"]}, "system":
|
||||
[{"text": "You are Calculator. You are a calculator assistant that uses tools
|
||||
to compute results.\nYour personal goal is: Perform calculations using available
|
||||
tools"}], "toolConfig": {"tools": [{"toolSpec": {"name": "add_numbers", "description":
|
||||
"Add two numbers together and return the sum.", "inputSchema": {"json": {"properties":
|
||||
{"a": {"title": "A", "type": "integer"}, "b": {"title": "B", "type": "integer"}},
|
||||
"required": ["a", "b"], "type": "object", "additionalProperties": false}}}},
|
||||
{"toolSpec": {"name": "structured_output", "description": "Use this tool to
|
||||
provide your final structured response. Call this tool when you have gathered
|
||||
all necessary information and are ready to provide the final answer in the required
|
||||
format.", "inputSchema": {"json": {"description": "Structured output for calculation
|
||||
results.", "properties": {"operation": {"description": "The mathematical operation
|
||||
performed", "title": "Operation", "type": "string"}, "result": {"description":
|
||||
"The result of the calculation", "title": "Result", "type": "integer"}, "explanation":
|
||||
{"description": "Brief explanation of the calculation", "title": "Explanation",
|
||||
"type": "string"}}, "required": ["operation", "result", "explanation"], "title":
|
||||
"CalculationResult", "type": "object", "additionalProperties": false}}}}]}}'
|
||||
"required": ["a", "b"], "type": "object", "additionalProperties": false}}}}]}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '1784'
|
||||
- '977'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
@@ -96,41 +78,49 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-sonnet-20240229-v1%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":7598},"output":{"message":{"content":[{"toolUse":{"input":{"operation":"Addition","result":42,"explanation":"I
|
||||
added 15 and 27 using the add_numbers tool."},"name":"structured_output","toolUseId":"tooluse_RT8uSPaM37Q8CVuo3rJLtI"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"inputTokens":571,"outputTokens":102,"serverToolUsage":{},"totalTokens":673}}'
|
||||
string: "{\"metrics\":{\"latencyMs\":2393},\"output\":{\"message\":{\"content\":[{\"text\":\"The
|
||||
result of **15 + 27 = 42**! \U0001F9EE\\n\\nUsing the `add_numbers` tool,
|
||||
I computed the sum of 15 and 27, and the result is **42**.\"}],\"role\":\"assistant\"}},\"stopReason\":\"end_turn\",\"usage\":{\"cacheReadInputTokenCount\":0,\"cacheReadInputTokens\":0,\"cacheWriteInputTokenCount\":0,\"cacheWriteInputTokens\":0,\"inputTokens\":729,\"outputTokens\":51,\"serverToolUsage\":{},\"totalTokens\":780}}"
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '387'
|
||||
- '443'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Feb 2026 22:01:12 GMT
|
||||
- Tue, 26 May 2026 17:04:51 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
|
||||
15 + 27 using your add_numbers tool. Report the result."}]}, {"role": "assistant",
|
||||
"content": [{"toolUse": {"toolUseId": "tooluse_pSseOamVELzpL3kQG5VukN", "name":
|
||||
"add_numbers", "input": {"a": 15, "b": 27}}}]}, {"role": "user", "content":
|
||||
[{"toolResult": {"toolUseId": "tooluse_pSseOamVELzpL3kQG5VukN", "content": [{"text":
|
||||
"42"}]}}]}, {"role": "assistant", "content": [{"text": "{\"operation\":\"Addition\",\"result\":42,\"explanation\":\"I
|
||||
added 15 and 27 using the add_numbers tool.\"}"}]}], "inferenceConfig": {"stopSequences":
|
||||
["\nObservation:"]}, "system": [{"text": "You are Calculator. You are a calculator
|
||||
assistant that uses tools to compute results.\nYour personal goal is: Perform
|
||||
calculations using available tools"}], "toolConfig": {"tools": [{"toolSpec":
|
||||
{"name": "add_numbers", "description": "Add two numbers together and return
|
||||
the sum.", "inputSchema": {"json": {"properties": {"a": {"title": "A", "type":
|
||||
"integer"}, "b": {"title": "B", "type": "integer"}}, "required": ["a", "b"],
|
||||
"type": "object", "additionalProperties": false}}}}, {"toolSpec": {"name": "structured_output",
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "The result of **15
|
||||
+ 27 = 42**! \ud83e\uddee\n\nUsing the `add_numbers` tool, I computed the sum
|
||||
of 15 and 27, and the result is **42**."}]}], "inferenceConfig": {}, "system":
|
||||
[{"text": "Format your final answer according to the following OpenAPI schema:
|
||||
{\n \"type\": \"json_schema\",\n \"json_schema\": {\n \"name\": \"CalculationResult\",\n \"strict\":
|
||||
true,\n \"schema\": {\n \"description\": \"Structured output for calculation
|
||||
results.\",\n \"properties\": {\n \"operation\": {\n \"description\":
|
||||
\"The mathematical operation performed\",\n \"title\": \"Operation\",\n \"type\":
|
||||
\"string\"\n },\n \"result\": {\n \"description\": \"The
|
||||
result of the calculation\",\n \"title\": \"Result\",\n \"type\":
|
||||
\"integer\"\n },\n \"explanation\": {\n \"description\":
|
||||
\"Brief explanation of the calculation\",\n \"title\": \"Explanation\",\n \"type\":
|
||||
\"string\"\n }\n },\n \"required\": [\n \"operation\",\n \"result\",\n \"explanation\"\n ],\n \"title\":
|
||||
\"CalculationResult\",\n \"type\": \"object\",\n \"additionalProperties\":
|
||||
false\n }\n }\n}\n\nIMPORTANT: Preserve the original content exactly as-is.
|
||||
Do NOT rewrite, paraphrase, or modify the meaning of the content. Only structure
|
||||
it to match the schema format.\n\nDo not include the OpenAPI schema in the final
|
||||
output. Ensure the final output does not include any code block markers like
|
||||
```json or ```python."}], "toolConfig": {"tools": [{"toolSpec": {"name": "structured_output",
|
||||
"description": "Use this tool to provide your final structured response. Call
|
||||
this tool when you have gathered all necessary information and are ready to
|
||||
provide the final answer in the required format.", "inputSchema": {"json": {"description":
|
||||
@@ -140,10 +130,10 @@ interactions:
|
||||
"type": "integer"}, "explanation": {"description": "Brief explanation of the
|
||||
calculation", "title": "Explanation", "type": "string"}}, "required": ["operation",
|
||||
"result", "explanation"], "title": "CalculationResult", "type": "object", "additionalProperties":
|
||||
false}}}}]}}'
|
||||
false}}}}], "toolChoice": {"tool": {"name": "structured_output"}}}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '1942'
|
||||
- '2510'
|
||||
Content-Type:
|
||||
- !!binary |
|
||||
YXBwbGljYXRpb24vanNvbg==
|
||||
@@ -158,28 +148,27 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-sonnet-20240229-v1%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"message":"The model returned the following errors: Your API request
|
||||
included an `assistant` message in the final position, which would pre-fill
|
||||
the `assistant` response. When using tools, pre-filling the `assistant` response
|
||||
is not supported."}'
|
||||
string: "{\"metrics\":{\"latencyMs\":2107},\"output\":{\"message\":{\"content\":[{\"toolUse\":{\"input\":{\"operation\":\"add_numbers\",\"result\":42,\"explanation\":\"The
|
||||
result of **15 + 27 = 42**! \U0001F9EE\\n\\nUsing the `add_numbers` tool,
|
||||
I computed the sum of 15 and 27, and the result is **42**.\"},\"name\":\"structured_output\",\"toolUseId\":\"tooluse_5OzuYfgauW1f24uhsvXWDo\",\"type\":\"tool_use\"}}],\"role\":\"assistant\"}},\"stopReason\":\"tool_use\",\"usage\":{\"cacheReadInputTokenCount\":0,\"cacheReadInputTokens\":0,\"cacheWriteInputTokenCount\":0,\"cacheWriteInputTokens\":0,\"inputTokens\":1150,\"outputTokens\":116,\"serverToolUsage\":{},\"totalTokens\":1266}}"
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '246'
|
||||
- '603'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Thu, 12 Feb 2026 22:01:12 GMT
|
||||
x-amzn-ErrorType:
|
||||
- ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/
|
||||
- Tue, 26 May 2026 17:04:54 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
code: 400
|
||||
message: Bad Request
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
|
||||
@@ -33,29 +33,37 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-sonnet-20240229-v1%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":3496},"output":{"message":{"content":[{"toolUse":{"input":{"topic":"Benefits
|
||||
of remote work","key_points":"- Increased flexibility and work-life balance\n-
|
||||
Reduced commute time and costs\n- Access to a wider talent pool for companies\n-
|
||||
Increased productivity for some employees\n- Environmental benefits from reduced
|
||||
commuting","summary":"Remote work offers several benefits including improved
|
||||
work-life balance, cost and time savings from eliminating commutes, access
|
||||
to a broader talent pool for employers, productivity gains, and environmental
|
||||
advantages from reduced transportation. However, it also presents challenges
|
||||
like social isolation, blurred work-life boundaries, and potential distractions
|
||||
at home that need to be managed effectively."},"name":"structured_output","toolUseId":"tooluse_Jfg8pUBaRxWkKwR_rp5mCw"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"inputTokens":512,"outputTokens":187,"serverToolUsage":{},"totalTokens":699}}'
|
||||
string: "{\"metrics\":{\"latencyMs\":6183},\"output\":{\"message\":{\"content\":[{\"toolUse\":{\"input\":{\"topic\":\"Benefits
|
||||
of Remote Work\",\"key_points\":[\"Improved Work-Life Balance: Employees gain
|
||||
flexibility to manage personal and professional responsibilities, reducing
|
||||
stress and burnout.\",\"Increased Productivity: Fewer office distractions
|
||||
and elimination of commutes allow workers to focus more effectively on tasks.\",\"Cost
|
||||
Savings: Both employers (reduced office overhead) and employees (lower commuting
|
||||
and wardrobe costs) benefit financially.\",\"Access to Global Talent: Companies
|
||||
can hire the best candidates regardless of geographic location, expanding
|
||||
the talent pool.\",\"Environmental Impact: Reduced commuting leads to lower
|
||||
carbon emissions and a smaller environmental footprint.\",\"Employee Retention
|
||||
& Satisfaction: Greater autonomy and flexibility contribute to higher job
|
||||
satisfaction and lower turnover rates.\"],\"summary\":\"Remote work offers
|
||||
a compelling mix of personal, financial, and organizational advantages. It
|
||||
empowers employees with flexibility and autonomy while enabling businesses
|
||||
to cut costs, access wider talent pools, and boost overall productivity \u2014
|
||||
making it a mutually beneficial arrangement in the modern workforce.\"},\"name\":\"structured_output\",\"toolUseId\":\"tooluse_miAVY9Wyw0HMShZbgbyTwX\",\"type\":\"tool_use\"}}],\"role\":\"assistant\"}},\"stopReason\":\"tool_use\",\"usage\":{\"cacheReadInputTokenCount\":0,\"cacheReadInputTokens\":0,\"cacheWriteInputTokenCount\":0,\"cacheWriteInputTokens\":0,\"inputTokens\":851,\"outputTokens\":268,\"serverToolUsage\":{},\"totalTokens\":1119}}"
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '982'
|
||||
- '1568'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Fri, 30 Jan 2026 01:04:10 GMT
|
||||
- Tue, 26 May 2026 17:05:01 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
|
||||
@@ -19,21 +19,23 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-sonnet-20241022-v2%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":776},"output":{"message":{"content":[{"text":"Hello!
|
||||
How are you today?"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"inputTokens":9,"outputTokens":10,"serverToolUsage":{},"totalTokens":19}}'
|
||||
string: "{\"metrics\":{\"latencyMs\":2397},\"output\":{\"message\":{\"content\":[{\"text\":\"Hello!
|
||||
\U0001F44B How are you doing? Is there something I can help you with today?\"}],\"role\":\"assistant\"}},\"stopReason\":\"end_turn\",\"usage\":{\"cacheReadInputTokenCount\":0,\"cacheReadInputTokens\":0,\"cacheWriteInputTokenCount\":0,\"cacheWriteInputTokens\":0,\"inputTokens\":9,\"outputTokens\":24,\"serverToolUsage\":{},\"totalTokens\":33}}"
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '226'
|
||||
- '388'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 01 Dec 2025 08:50:59 GMT
|
||||
- Tue, 26 May 2026 17:05:24 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
|
||||
@@ -21,21 +21,23 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-sonnet-20241022-v2%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":622},"output":{"message":{"content":[{"text":"Your
|
||||
name is Alice."}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":31,"outputTokens":8,"serverToolUsage":{},"totalTokens":39}}'
|
||||
string: '{"metrics":{"latencyMs":1900},"output":{"message":{"content":[{"text":"Your
|
||||
name is Alice! You told me that at the start of our conversation."}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":31,"outputTokens":19,"serverToolUsage":{},"totalTokens":50}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '330'
|
||||
- '383'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 01 Dec 2025 08:51:04 GMT
|
||||
- Tue, 26 May 2026 17:05:10 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
|
||||
@@ -19,20 +19,23 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-sonnet-20241022-v2%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":583},"output":{"message":{"content":[{"text":"1+1=2"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"inputTokens":14,"outputTokens":9,"serverToolUsage":{},"totalTokens":23}}'
|
||||
string: '{"metrics":{"latencyMs":2148},"output":{"message":{"content":[{"text":"1
|
||||
+ 1 = **2**"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":14,"outputTokens":14,"serverToolUsage":{},"totalTokens":28}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '206'
|
||||
- '326'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 01 Dec 2025 08:51:00 GMT
|
||||
- Tue, 26 May 2026 17:05:12 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
@@ -58,20 +61,23 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-sonnet-20241022-v2%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":869},"output":{"message":{"content":[{"text":"2+2=4"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"inputTokens":14,"outputTokens":9,"serverToolUsage":{},"totalTokens":23}}'
|
||||
string: '{"metrics":{"latencyMs":1443},"output":{"message":{"content":[{"text":"2
|
||||
+ 2 = **4**"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":14,"outputTokens":14,"serverToolUsage":{},"totalTokens":28}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '206'
|
||||
- '326'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 01 Dec 2025 08:51:01 GMT
|
||||
- Tue, 26 May 2026 17:05:14 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
|
||||
@@ -19,21 +19,23 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-sonnet-20241022-v2%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":966},"output":{"message":{"content":[{"text":"Here''s
|
||||
a long story about a dragon:"}],"role":"assistant"}},"stopReason":"max_tokens","usage":{"inputTokens":16,"outputTokens":10,"serverToolUsage":{},"totalTokens":26}}'
|
||||
string: '{"metrics":{"latencyMs":1421},"output":{"message":{"content":[{"text":"#
|
||||
The Last Ember of Varathorn"}],"role":"assistant"}},"stopReason":"max_tokens","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":16,"outputTokens":10,"serverToolUsage":{},"totalTokens":26}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '239'
|
||||
- '344'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 01 Dec 2025 08:50:58 GMT
|
||||
- Tue, 26 May 2026 17:05:16 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"messages": [{"role": "user", "content": [{"text": "Tell me a short fact"}]}],
|
||||
"inferenceConfig": {"maxTokens": 100, "temperature": 0.7, "topP": 0.9}}'
|
||||
"inferenceConfig": {"maxTokens": 100, "temperature": 0.7}}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '151'
|
||||
- '138'
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
@@ -19,22 +19,24 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-sonnet-20241022-v2%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":1360},"output":{"message":{"content":[{"text":"Here''s
|
||||
a short fact: Honeybees can recognize human faces by learning and remembering
|
||||
facial features, similar to how we do."}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":12,"outputTokens":31,"serverToolUsage":{},"totalTokens":43}}'
|
||||
string: "{\"metrics\":{\"latencyMs\":2721},\"output\":{\"message\":{\"content\":[{\"text\":\"Here's
|
||||
a short fact:\\n\\n**Honey never spoils.** Archaeologists have found 3,000-year-old
|
||||
honey in Egyptian tombs that was still perfectly edible. \U0001F36F\"}],\"role\":\"assistant\"}},\"stopReason\":\"end_turn\",\"usage\":{\"cacheReadInputTokenCount\":0,\"cacheReadInputTokens\":0,\"cacheWriteInputTokenCount\":0,\"cacheWriteInputTokens\":0,\"inputTokens\":12,\"outputTokens\":47,\"serverToolUsage\":{},\"totalTokens\":59}}"
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '436'
|
||||
- '463'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 01 Dec 2025 08:50:57 GMT
|
||||
- Tue, 26 May 2026 17:06:27 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
|
||||
@@ -19,21 +19,23 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-sonnet-20241022-v2%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":677},"output":{"message":{"content":[{"text":"2
|
||||
+ 2 = 4"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"inputTokens":20,"outputTokens":13,"serverToolUsage":{},"totalTokens":33}}'
|
||||
string: '{"metrics":{"latencyMs":2975},"output":{"message":{"content":[{"text":"2
|
||||
+ 2 = **4**"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":21,"outputTokens":14,"serverToolUsage":{},"totalTokens":35}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '211'
|
||||
- '326'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 01 Dec 2025 08:51:03 GMT
|
||||
- Tue, 26 May 2026 17:05:21 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
|
||||
@@ -19,20 +19,22 @@ interactions:
|
||||
- AUTHORIZATION-XXX
|
||||
x-amz-date:
|
||||
- X-AMZ-DATE-XXX
|
||||
x-amz-security-token:
|
||||
- X-AMZ-SECURITY-TOKEN-XXX
|
||||
method: POST
|
||||
uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-sonnet-20241022-v2%3A0/converse
|
||||
uri: https://bedrock-runtime.us-west-2.amazonaws.com/model/us.anthropic.claude-sonnet-4-6/converse
|
||||
response:
|
||||
body:
|
||||
string: '{"metrics":{"latencyMs":654},"output":{"message":{"content":[{"text":"test"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"inputTokens":15,"outputTokens":4,"serverToolUsage":{},"totalTokens":19}}'
|
||||
string: '{"metrics":{"latencyMs":1720},"output":{"message":{"content":[{"text":"test"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":15,"outputTokens":4,"serverToolUsage":{},"totalTokens":19}}'
|
||||
headers:
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '205'
|
||||
- '316'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 01 Dec 2025 08:51:02 GMT
|
||||
- Tue, 26 May 2026 17:05:18 GMT
|
||||
x-amzn-RequestId:
|
||||
- X-AMZN-REQUESTID-XXX
|
||||
status:
|
||||
|
||||
@@ -439,7 +439,7 @@ def test_bedrock_aws_credentials_configuration():
|
||||
"""
|
||||
aws_access_key_id = "test-access-key"
|
||||
aws_secret_access_key = "test-secret-key"
|
||||
aws_region_name = "us-east-1"
|
||||
aws_region_name = "us-west-2"
|
||||
|
||||
|
||||
# Test with environment variables
|
||||
@@ -910,7 +910,7 @@ def test_bedrock_agent_kickoff_structured_output_without_tools():
|
||||
role="Analyst",
|
||||
goal="Provide structured analysis on topics",
|
||||
backstory="You are an expert analyst who provides clear, structured insights.",
|
||||
llm=LLM(model="bedrock/anthropic.claude-3-sonnet-20240229-v1:0"),
|
||||
llm=LLM(model="bedrock/us.anthropic.claude-sonnet-4-6"),
|
||||
tools=[],
|
||||
verbose=True,
|
||||
)
|
||||
@@ -952,7 +952,7 @@ def test_bedrock_agent_kickoff_structured_output_with_tools():
|
||||
role="Calculator",
|
||||
goal="Perform calculations using available tools",
|
||||
backstory="You are a calculator assistant that uses tools to compute results.",
|
||||
llm=LLM(model="bedrock/anthropic.claude-3-sonnet-20240229-v1:0"),
|
||||
llm=LLM(model="bedrock/us.anthropic.claude-sonnet-4-6"),
|
||||
tools=[add_numbers],
|
||||
verbose=True,
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@ SKIP_REASON = "VCR does not support aiobotocore async HTTP client"
|
||||
@pytest.mark.skip(reason=SKIP_REASON)
|
||||
async def test_bedrock_async_basic_call():
|
||||
"""Test basic async call with Bedrock."""
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-3-5-sonnet-20241022-v2:0")
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-sonnet-4-6")
|
||||
|
||||
result = await llm.acall("Say hello")
|
||||
|
||||
@@ -31,7 +31,7 @@ async def test_bedrock_async_basic_call():
|
||||
@pytest.mark.skip(reason=SKIP_REASON)
|
||||
async def test_bedrock_async_with_temperature():
|
||||
"""Test async call with temperature parameter."""
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-3-5-sonnet-20241022-v2:0", temperature=0.1)
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-sonnet-4-6", temperature=0.1)
|
||||
|
||||
result = await llm.acall("Say the word 'test' once")
|
||||
|
||||
@@ -44,7 +44,7 @@ async def test_bedrock_async_with_temperature():
|
||||
@pytest.mark.skip(reason=SKIP_REASON)
|
||||
async def test_bedrock_async_with_max_tokens():
|
||||
"""Test async call with max_tokens parameter."""
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-3-5-sonnet-20241022-v2:0", max_tokens=10)
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-sonnet-4-6", max_tokens=10)
|
||||
|
||||
result = await llm.acall("Write a very long story about a dragon.")
|
||||
|
||||
@@ -58,7 +58,7 @@ async def test_bedrock_async_with_max_tokens():
|
||||
@pytest.mark.skip(reason=SKIP_REASON)
|
||||
async def test_bedrock_async_with_system_message():
|
||||
"""Test async call with system message."""
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-3-5-sonnet-20241022-v2:0")
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-sonnet-4-6")
|
||||
|
||||
messages = [
|
||||
{"role": "system", "content": "You are a helpful assistant."},
|
||||
@@ -76,7 +76,7 @@ async def test_bedrock_async_with_system_message():
|
||||
@pytest.mark.skip(reason=SKIP_REASON)
|
||||
async def test_bedrock_async_conversation():
|
||||
"""Test async call with conversation history."""
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-3-5-sonnet-20241022-v2:0")
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-sonnet-4-6")
|
||||
|
||||
messages = [
|
||||
{"role": "user", "content": "My name is Alice."},
|
||||
@@ -95,7 +95,7 @@ async def test_bedrock_async_conversation():
|
||||
@pytest.mark.skip(reason=SKIP_REASON)
|
||||
async def test_bedrock_async_multiple_calls():
|
||||
"""Test making multiple async calls in sequence."""
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-3-5-sonnet-20241022-v2:0")
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-sonnet-4-6")
|
||||
|
||||
result1 = await llm.acall("What is 1+1?")
|
||||
result2 = await llm.acall("What is 2+2?")
|
||||
@@ -112,10 +112,9 @@ async def test_bedrock_async_multiple_calls():
|
||||
async def test_bedrock_async_with_parameters():
|
||||
"""Test async call with multiple parameters."""
|
||||
llm = LLM(
|
||||
model="bedrock/us.anthropic.claude-3-5-sonnet-20241022-v2:0",
|
||||
model="bedrock/us.anthropic.claude-sonnet-4-6",
|
||||
temperature=0.7,
|
||||
max_tokens=100,
|
||||
top_p=0.9
|
||||
)
|
||||
|
||||
result = await llm.acall("Tell me a short fact")
|
||||
|
||||
@@ -290,7 +290,7 @@ class TestBedrockMultimodalIntegration:
|
||||
@pytest.mark.vcr()
|
||||
def test_describe_image(self, test_image_bytes: bytes) -> None:
|
||||
"""Test Bedrock Claude can describe an image."""
|
||||
llm = LLM(model="bedrock/anthropic.claude-3-haiku-20240307-v1:0")
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-sonnet-4-6")
|
||||
files = {"image": ImageFile(source=test_image_bytes)}
|
||||
|
||||
messages = _build_multimodal_message(
|
||||
@@ -308,7 +308,7 @@ class TestBedrockMultimodalIntegration:
|
||||
@pytest.mark.vcr()
|
||||
def test_analyze_pdf(self) -> None:
|
||||
"""Test Bedrock Claude can analyze a PDF."""
|
||||
llm = LLM(model="bedrock/anthropic.claude-3-haiku-20240307-v1:0")
|
||||
llm = LLM(model="bedrock/us.anthropic.claude-sonnet-4-6")
|
||||
files = {"document": PDFFile(source=MINIMAL_PDF)}
|
||||
|
||||
messages = _build_multimodal_message(
|
||||
|
||||
@@ -42,7 +42,7 @@ GEMINI_MODELS = [
|
||||
]
|
||||
|
||||
BEDROCK_MODELS = [
|
||||
"bedrock/anthropic.claude-3-haiku-20240307-v1:0",
|
||||
"bedrock/us.anthropic.claude-sonnet-4-6",
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user