Fix structured output leaks in tool-calling loops (#5897)

* Fix structured output leaks in tool-calling loops

* addressing comments

* drop scripts

* Update Gemini agent tests to include structured output with thoughts and bump model version to 2.5-flash

* merge

* Update Anthropic test cases to use new model and tool structure

- Changed the model from "claude-3-5-haiku-20241022" to "claude-sonnet-4-6" in the test setup.
- Updated the request and response formats in the YAML test cassette to reflect the new tool structure and improved content formatting.
- Adjusted the expected response body to match the new output format from the assistant, including changes in tool usage and response details.
- Increased rate limit values in the response headers for better testing scenarios.

* adjusted bedrock cassettes

* adjusting cassettes for bedrock

* fix test

* Update VCR configuration to use 'host' instead of 'bedrock_host' for request matching
This commit is contained in:
Lorenze Jay
2026-05-27 13:20:53 -07:00
committed by GitHub
parent 90a37c94c1
commit a1033e4bfe
34 changed files with 1071 additions and 1053 deletions

View File

@@ -5,6 +5,7 @@ from collections.abc import Generator
import gzip
import os
from pathlib import Path
import re
import tempfile
from typing import Any
@@ -20,8 +21,25 @@ except ModuleNotFoundError:
env_test_path = Path(__file__).parent / ".env.test"
load_dotenv(env_test_path, override=True)
load_dotenv(override=True)
load_dotenv(env_test_path, override=False)
load_dotenv(override=False)
BEDROCK_HOST_PLACEHOLDER = "bedrock-runtime.vcr.amazonaws.com"
_BEDROCK_HOST_RE = re.compile(r"^bedrock-runtime\.[a-z0-9-]+\.amazonaws\.com$")
def _normalize_bedrock_host(host: str) -> str:
if _BEDROCK_HOST_RE.match(host):
return BEDROCK_HOST_PLACEHOLDER
return host
def bedrock_host_matcher(r1: Request, r2: Request) -> bool: # type: ignore[no-any-unimported]
"""Match Bedrock requests across AWS regions (CI uses us-east-1, local may use us-west-2)."""
return _normalize_bedrock_host(r1.host or "") == _normalize_bedrock_host(
r2.host or ""
)
def _patched_make_vcr_request(httpx_request: Any, **kwargs: Any) -> Any:
@@ -188,6 +206,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",
@@ -212,6 +231,10 @@ def _filter_request_headers(request: Request) -> Request: # type: ignore[no-any
placeholder_host = "fake-azure-endpoint.openai.azure.com"
request.uri = request.uri.replace(original_host, placeholder_host)
# Normalize Bedrock regional endpoints so cassettes work in any AWS region.
if request.host and _BEDROCK_HOST_RE.match(request.host):
request.uri = request.uri.replace(request.host, BEDROCK_HOST_PLACEHOLDER)
return request
@@ -229,6 +252,11 @@ def _filter_response_headers(response: dict[str, Any]) -> dict[str, Any] | None:
if body == "" or body == b"" or content_length == ["0"]:
return None
status_code = response.get("status", {}).get("code")
if isinstance(status_code, int) and status_code >= 400:
# Avoid persisting auth/model errors when re-recording without valid AWS creds.
return None
for encoding_header in ["Content-Encoding", "content-encoding"]:
if encoding_header in headers:
encoding = headers.pop(encoding_header)
@@ -279,6 +307,11 @@ def vcr_cassette_dir(request: Any) -> str:
return str(cassette_dir)
def pytest_recording_configure(vcr: Any, config: Any) -> None:
"""Register custom VCR matchers for each test cassette session."""
vcr.register_matcher("bedrock_host", bedrock_host_matcher)
@pytest.fixture(scope="module")
def vcr_config(vcr_cassette_dir: str) -> dict[str, Any]:
"""Configure VCR with organized cassette storage."""

View File

@@ -28,6 +28,7 @@ from pydantic import (
ConfigDict,
Field,
PrivateAttr,
ValidationError,
model_validator,
)
from pydantic.functional_serializers import PlainSerializer
@@ -1710,24 +1711,32 @@ class Agent(BaseAgent):
elif response_format:
raw_output = str(output) if not isinstance(output, str) else output
try:
model_schema = generate_model_description(response_format)
schema = json.dumps(model_schema, indent=2)
instructions = I18N_DEFAULT.slice("formatted_task_instructions").format(
output_format=schema
)
formatted_result = response_format.model_validate_json(raw_output)
except ValidationError:
# Direct JSON validation failed; fall back to converter-based parsing below.
formatted_result = None
converter = Converter(
llm=cast(BaseLLM, self.llm),
text=raw_output,
model=response_format,
instructions=instructions,
)
if formatted_result is None:
try:
model_schema = generate_model_description(response_format)
schema = json.dumps(model_schema, indent=2)
instructions = I18N_DEFAULT.slice(
"formatted_task_instructions"
).format(output_format=schema)
conversion_result = converter.to_pydantic()
if isinstance(conversion_result, BaseModel):
formatted_result = conversion_result
except ConverterError:
pass
converter = Converter(
llm=cast(BaseLLM, self.llm),
text=raw_output,
model=response_format,
instructions=instructions,
)
conversion_result = converter.to_pydantic()
if isinstance(conversion_result, BaseModel):
formatted_result = conversion_result
except ConverterError:
# Conversion failure is non-fatal; raw output is preserved below.
pass
else:
raw_output = str(output) if not isinstance(output, str) else output

View File

@@ -350,6 +350,10 @@ class CrewAgentExecutor(BaseAgentExecutor):
enforce_rpm_limit(self.request_within_rpm_limit)
effective_response_model = (
None if self.original_tools else self.response_model
)
answer = get_llm_response(
llm=cast("BaseLLM", self.llm),
messages=self.messages,
@@ -357,11 +361,11 @@ class CrewAgentExecutor(BaseAgentExecutor):
printer=PRINTER,
from_task=self.task,
from_agent=self.agent,
response_model=self.response_model,
response_model=effective_response_model,
executor_context=self,
verbose=self.agent.verbose,
)
if self.response_model is not None:
if effective_response_model is not None:
try:
if isinstance(answer, BaseModel):
output_json = answer.model_dump_json()
@@ -502,7 +506,7 @@ class CrewAgentExecutor(BaseAgentExecutor):
available_functions=None,
from_task=self.task,
from_agent=self.agent,
response_model=self.response_model,
response_model=None,
executor_context=self,
verbose=self.agent.verbose,
)
@@ -1159,6 +1163,10 @@ class CrewAgentExecutor(BaseAgentExecutor):
enforce_rpm_limit(self.request_within_rpm_limit)
effective_response_model = (
None if self.original_tools else self.response_model
)
answer = await aget_llm_response(
llm=cast("BaseLLM", self.llm),
messages=self.messages,
@@ -1166,12 +1174,12 @@ class CrewAgentExecutor(BaseAgentExecutor):
printer=PRINTER,
from_task=self.task,
from_agent=self.agent,
response_model=self.response_model,
response_model=effective_response_model,
executor_context=self,
verbose=self.agent.verbose,
)
if self.response_model is not None:
if effective_response_model is not None:
try:
if isinstance(answer, BaseModel):
output_json = answer.model_dump_json()
@@ -1311,7 +1319,7 @@ class CrewAgentExecutor(BaseAgentExecutor):
available_functions=None,
from_task=self.task,
from_agent=self.agent,
response_model=self.response_model,
response_model=None,
executor_context=self,
verbose=self.agent.verbose,
)

View File

@@ -1273,6 +1273,10 @@ class AgentExecutor(Flow[AgentExecutorState], BaseAgentExecutor):
try:
enforce_rpm_limit(self.request_within_rpm_limit)
effective_response_model = (
None if self.original_tools else self.response_model
)
answer = get_llm_response(
llm=self.llm,
messages=list(self.state.messages),
@@ -1280,7 +1284,7 @@ class AgentExecutor(Flow[AgentExecutorState], BaseAgentExecutor):
printer=PRINTER,
from_task=self.task,
from_agent=self.agent,
response_model=self.response_model,
response_model=effective_response_model,
executor_context=self,
verbose=self.agent.verbose,
)
@@ -1368,7 +1372,7 @@ class AgentExecutor(Flow[AgentExecutorState], BaseAgentExecutor):
available_functions=None,
from_task=self.task,
from_agent=self.agent,
response_model=self.response_model,
response_model=None,
executor_context=self,
verbose=self.agent.verbose,
)

View File

@@ -23,6 +23,7 @@ from pydantic import (
BaseModel,
Field,
PrivateAttr,
ValidationError,
field_serializer,
field_validator,
model_validator,
@@ -639,29 +640,38 @@ class LiteAgent(FlowTrackable, BaseModel):
formatted_result = agent_finish.output
elif active_response_format:
try:
model_schema = generate_model_description(active_response_format)
schema = json.dumps(model_schema, indent=2)
instructions = I18N_DEFAULT.slice("formatted_task_instructions").format(
output_format=schema
formatted_result = active_response_format.model_validate_json(
str(agent_finish.output)
)
except ValidationError:
# Direct JSON validation failed; fall back to converter-based parsing below.
formatted_result = None
converter = Converter(
llm=self.llm,
text=agent_finish.output,
model=active_response_format,
instructions=instructions,
)
if formatted_result is None:
try:
model_schema = generate_model_description(active_response_format)
schema = json.dumps(model_schema, indent=2)
instructions = I18N_DEFAULT.slice(
"formatted_task_instructions"
).format(output_format=schema)
result = converter.to_pydantic()
if isinstance(result, BaseModel):
formatted_result = result
except ConverterError as e:
if self.verbose:
PRINTER.print(
content=f"Failed to parse output into response format after retries: {e.message}",
color="yellow",
converter = Converter(
llm=self.llm,
text=agent_finish.output,
model=active_response_format,
instructions=instructions,
)
result = converter.to_pydantic()
if isinstance(result, BaseModel):
formatted_result = result
except ConverterError as e:
if self.verbose:
PRINTER.print(
content=f"Failed to parse output into response format after retries: {e.message}",
color="yellow",
)
if isinstance(self.llm, BaseLLM):
usage_metrics = self.llm.get_token_usage_summary()
else:

View File

@@ -12,6 +12,7 @@ from typing import Any
from unittest.mock import AsyncMock, Mock, patch
import pytest
from pydantic import BaseModel
from crewai.agents.tools_handler import ToolsHandler as _ToolsHandler
from crewai.agents.step_executor import StepExecutor
@@ -108,6 +109,9 @@ class TestAgentExecutorState:
class TestAgentExecutor:
"""Test AgentExecutor class."""
class StructuredResult(BaseModel):
value: str
@pytest.fixture
def mock_dependencies(self):
"""Create mock dependencies for executor."""
@@ -215,6 +219,49 @@ class TestAgentExecutor:
assert result == "check_iteration"
def test_call_llm_and_parse_does_not_pass_response_model_with_tools(
self, mock_dependencies
):
"""Structured output should not be requested during ReAct tool loops."""
executor = _build_executor(
**mock_dependencies,
original_tools=[Mock()],
response_model=self.StructuredResult,
callbacks=[],
)
executor.state.messages = [{"role": "user", "content": "Use a tool"}]
with patch(
"crewai.experimental.agent_executor.get_llm_response",
return_value="Thought: done\nFinal Answer: complete",
) as get_llm_response_mock:
result = executor.call_llm_and_parse()
assert result == "parsed"
assert get_llm_response_mock.call_args.kwargs["response_model"] is None
def test_call_llm_native_tools_does_not_pass_response_model_with_tools(
self, mock_dependencies
):
"""Structured output should not be requested during native tool calls."""
executor = _build_executor(
**mock_dependencies,
original_tools=[Mock()],
response_model=self.StructuredResult,
callbacks=[],
)
executor._openai_tools = [{"type": "function", "function": {"name": "lookup"}}]
executor.state.messages = [{"role": "user", "content": "Use a tool"}]
with patch(
"crewai.experimental.agent_executor.get_llm_response",
return_value="complete",
) as get_llm_response_mock:
result = executor.call_llm_native_tools()
assert result == "native_finished"
assert get_llm_response_mock.call_args.kwargs["response_model"] is None
def test_finalize_success(self, mock_dependencies):
"""Test finalize with valid AgentFinish."""
with patch.object(AgentExecutor, "_show_logs") as mock_show_logs:

View File

@@ -824,7 +824,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",
@@ -858,7 +858,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,
)
@@ -881,7 +881,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,
)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -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

View File

@@ -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

View File

@@ -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.vcr.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":2732},"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:34:51 GMT
x-amzn-RequestId:
- X-AMZN-REQUESTID-XXX
status:

File diff suppressed because one or more lines are too long

View File

@@ -1,14 +1,10 @@
interactions:
- request:
body: '{"max_tokens":4096,"messages":[{"role":"user","content":"\nCurrent Task:
Calculate 15 + 27 using your add_numbers tool. Report the result."}],"model":"claude-3-5-haiku-20241022","stop_sequences":["\nObservation:"],"stream":false,"system":"You
body: '{"max_tokens":4096,"messages":[{"role":"user","content":[{"type":"text","text":"\nCurrent
Task: Calculate 15 + 27 using your add_numbers tool. Report the result.","cache_control":{"type":"ephemeral"}}]}],"model":"claude-sonnet-4-6","stop_sequences":["\nObservation:"],"stream":false,"system":[{"type":"text","text":"You
are Calculator. You are a calculator assistant that uses tools to compute results.\nYour
personal goal is: Perform calculations using available tools","tool_choice":{"type":"tool","name":"structured_output"},"tools":[{"name":"structured_output","description":"Output
the structured response","input_schema":{"type":"object","description":"Structured
output for calculation results.","title":"CalculationResult","properties":{"operation":{"type":"string","description":"The
mathematical operation performed","title":"Operation"},"result":{"type":"integer","description":"The
result of the calculation","title":"Result"},"explanation":{"type":"string","description":"Brief
explanation of the calculation","title":"Explanation"}},"additionalProperties":false,"required":["operation","result","explanation"]}}]}'
personal goal is: Perform calculations using available tools","cache_control":{"type":"ephemeral"}}],"tools":[{"name":"add_numbers","description":"Add
two numbers together and return the sum.","input_schema":{"properties":{"a":{"type":"integer"},"b":{"type":"integer"}},"required":["a","b"],"type":"object","additionalProperties":false},"strict":true}]}'
headers:
User-Agent:
- X-USER-AGENT-XXX
@@ -21,7 +17,7 @@ interactions:
connection:
- keep-alive
content-length:
- '1050'
- '762'
content-type:
- application/json
host:
@@ -50,8 +46,8 @@ interactions:
uri: https://api.anthropic.com/v1/messages
response:
body:
string: '{"model":"claude-3-5-haiku-20241022","id":"msg_01MsoNSVoPuoMYGCcJLvfXS6","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01TtAsqddWjE7C4GYmCKavdg","name":"structured_output","input":{"operation":"Addition","result":42,"explanation":"Added
15 and 27 together"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":573,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":75,"service_tier":"standard","inference_geo":"not_available"}}'
string: '{"model":"claude-sonnet-4-6","id":"msg_01Hi6qhbcDQJas5A7kqA7Xif","type":"message","role":"assistant","content":[{"type":"text","text":"I''ll
calculate 15 + 27 right away using the `add_numbers` tool!"},{"type":"tool_use","id":"toolu_0111pu1MrxY8aTqNzYSWAgQF","name":"add_numbers","input":{"a":15,"b":27},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":633,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":92,"service_tier":"standard","inference_geo":"global"}}'
headers:
CF-RAY:
- CF-RAY-XXX
@@ -62,7 +58,7 @@ interactions:
Content-Type:
- application/json
Date:
- Thu, 12 Feb 2026 22:11:20 GMT
- Tue, 26 May 2026 16:27:07 GMT
Server:
- cloudflare
Transfer-Encoding:
@@ -84,11 +80,123 @@ interactions:
anthropic-ratelimit-output-tokens-reset:
- ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-RESET-XXX
anthropic-ratelimit-requests-limit:
- '4000'
- '20000'
anthropic-ratelimit-requests-remaining:
- '3999'
- '19999'
anthropic-ratelimit-requests-reset:
- '2026-02-12T22:11:18Z'
- '2026-05-26T16:26:47Z'
anthropic-ratelimit-tokens-limit:
- ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX
anthropic-ratelimit-tokens-remaining:
- ANTHROPIC-RATELIMIT-TOKENS-REMAINING-XXX
anthropic-ratelimit-tokens-reset:
- ANTHROPIC-RATELIMIT-TOKENS-RESET-XXX
cf-cache-status:
- DYNAMIC
request-id:
- REQUEST-ID-XXX
set-cookie:
- SET-COOKIE-XXX
strict-transport-security:
- STS-XXX
traceresponse:
- 00-0c532faf4d60e2359554c05e42d6c2b0-8ed2bd3616e95a40-01
vary:
- Accept-Encoding
x-envoy-upstream-service-time:
- '19361'
status:
code: 200
message: OK
- request:
body: '{"max_tokens":4096,"messages":[{"role":"user","content":[{"type":"text","text":"\nCurrent
Task: Calculate 15 + 27 using your add_numbers tool. Report the result.","cache_control":{"type":"ephemeral"}}]},{"role":"assistant","content":[{"type":"tool_use","id":"toolu_0111pu1MrxY8aTqNzYSWAgQF","name":"add_numbers","input":{"a":15,"b":27}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_0111pu1MrxY8aTqNzYSWAgQF","content":"42"}]}],"model":"claude-sonnet-4-6","stop_sequences":["\nObservation:"],"stream":false,"system":[{"type":"text","text":"You
are Calculator. You are a calculator assistant that uses tools to compute results.\nYour
personal goal is: Perform calculations using available tools","cache_control":{"type":"ephemeral"}}],"tools":[{"name":"add_numbers","description":"Add
two numbers together and return the sum.","input_schema":{"properties":{"a":{"type":"integer"},"b":{"type":"integer"}},"required":["a","b"],"type":"object","additionalProperties":false},"strict":true}]}'
headers:
User-Agent:
- X-USER-AGENT-XXX
accept:
- application/json
accept-encoding:
- ACCEPT-ENCODING-XXX
anthropic-version:
- '2023-06-01'
connection:
- keep-alive
content-length:
- '1011'
content-type:
- application/json
cookie:
- COOKIE-XXX
host:
- api.anthropic.com
x-api-key:
- X-API-KEY-XXX
x-stainless-arch:
- X-STAINLESS-ARCH-XXX
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- X-STAINLESS-OS-XXX
x-stainless-package-version:
- 0.73.0
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.13.3
x-stainless-timeout:
- NOT_GIVEN
method: POST
uri: https://api.anthropic.com/v1/messages
response:
body:
string: "{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01Eqs4XnbiSubo442YWNnn7G\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"The
result of **15 + 27 = 42**! \U0001F9EE\\n\\nUsing the `add_numbers` tool,
I calculated that adding 15 and 27 together gives you a sum of **42**.\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":717,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":52,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}}"
headers:
CF-RAY:
- CF-RAY-XXX
Connection:
- keep-alive
Content-Security-Policy:
- CSP-FILTERED
Content-Type:
- application/json
Date:
- Tue, 26 May 2026 16:27:09 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
X-Robots-Tag:
- none
anthropic-organization-id:
- ANTHROPIC-ORGANIZATION-ID-XXX
anthropic-ratelimit-input-tokens-limit:
- ANTHROPIC-RATELIMIT-INPUT-TOKENS-LIMIT-XXX
anthropic-ratelimit-input-tokens-remaining:
- ANTHROPIC-RATELIMIT-INPUT-TOKENS-REMAINING-XXX
anthropic-ratelimit-input-tokens-reset:
- ANTHROPIC-RATELIMIT-INPUT-TOKENS-RESET-XXX
anthropic-ratelimit-output-tokens-limit:
- ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-LIMIT-XXX
anthropic-ratelimit-output-tokens-remaining:
- ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-REMAINING-XXX
anthropic-ratelimit-output-tokens-reset:
- ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-RESET-XXX
anthropic-ratelimit-requests-limit:
- '20000'
anthropic-ratelimit-requests-remaining:
- '19999'
anthropic-ratelimit-requests-reset:
- '2026-05-26T16:27:07Z'
anthropic-ratelimit-tokens-limit:
- ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX
anthropic-ratelimit-tokens-remaining:
@@ -101,8 +209,143 @@ interactions:
- REQUEST-ID-XXX
strict-transport-security:
- STS-XXX
traceresponse:
- 00-92d206559118bcf8b9b39b7ecd0c6e0e-68dd5efb3bbaff0e-01
vary:
- Accept-Encoding
x-envoy-upstream-service-time:
- '1234'
- '2021'
status:
code: 200
message: OK
- request:
body: "{\"max_tokens\":4096,\"messages\":[{\"role\":\"user\",\"content\":\"The
result of **15 + 27 = 42**! \U0001F9EE\\n\\nUsing the `add_numbers` tool, I
calculated that adding 15 and 27 together gives you a sum of **42**.\"}],\"model\":\"claude-sonnet-4-6\",\"stream\":false,\"system\":\"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.\",\"tool_choice\":{\"type\":\"tool\",\"name\":\"structured_output\"},\"tools\":[{\"name\":\"structured_output\",\"description\":\"Output
the structured response\",\"input_schema\":{\"type\":\"object\",\"description\":\"Structured
output for calculation results.\",\"title\":\"CalculationResult\",\"properties\":{\"operation\":{\"type\":\"string\",\"description\":\"The
mathematical operation performed\",\"title\":\"Operation\"},\"result\":{\"type\":\"integer\",\"description\":\"The
result of the calculation\",\"title\":\"Result\"},\"explanation\":{\"type\":\"string\",\"description\":\"Brief
explanation of the calculation\",\"title\":\"Explanation\"}},\"additionalProperties\":false,\"required\":[\"operation\",\"result\",\"explanation\"]}}]}"
headers:
User-Agent:
- X-USER-AGENT-XXX
accept:
- application/json
accept-encoding:
- ACCEPT-ENCODING-XXX
anthropic-version:
- '2023-06-01'
connection:
- keep-alive
content-length:
- '2289'
content-type:
- application/json
cookie:
- COOKIE-XXX
host:
- api.anthropic.com
x-api-key:
- X-API-KEY-XXX
x-stainless-arch:
- X-STAINLESS-ARCH-XXX
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- X-STAINLESS-OS-XXX
x-stainless-package-version:
- 0.73.0
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.13.3
x-stainless-timeout:
- NOT_GIVEN
method: POST
uri: https://api.anthropic.com/v1/messages
response:
body:
string: '{"model":"claude-sonnet-4-6","id":"msg_012b6HHB7T6qZuKcXB5jkhpx","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01UX2REqVJnQ3qNjHzVV1oNp","name":"structured_output","input":{"operation":"add_numbers","result":42,"explanation":"Adding
15 and 27 together gives you a sum of 42."},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":1123,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":84,"service_tier":"standard","inference_geo":"global"}}'
headers:
CF-RAY:
- CF-RAY-XXX
Connection:
- keep-alive
Content-Security-Policy:
- CSP-FILTERED
Content-Type:
- application/json
Date:
- Tue, 26 May 2026 16:27:11 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
X-Robots-Tag:
- none
anthropic-organization-id:
- ANTHROPIC-ORGANIZATION-ID-XXX
anthropic-ratelimit-input-tokens-limit:
- ANTHROPIC-RATELIMIT-INPUT-TOKENS-LIMIT-XXX
anthropic-ratelimit-input-tokens-remaining:
- ANTHROPIC-RATELIMIT-INPUT-TOKENS-REMAINING-XXX
anthropic-ratelimit-input-tokens-reset:
- ANTHROPIC-RATELIMIT-INPUT-TOKENS-RESET-XXX
anthropic-ratelimit-output-tokens-limit:
- ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-LIMIT-XXX
anthropic-ratelimit-output-tokens-remaining:
- ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-REMAINING-XXX
anthropic-ratelimit-output-tokens-reset:
- ANTHROPIC-RATELIMIT-OUTPUT-TOKENS-RESET-XXX
anthropic-ratelimit-requests-limit:
- '20000'
anthropic-ratelimit-requests-remaining:
- '19999'
anthropic-ratelimit-requests-reset:
- '2026-05-26T16:27:09Z'
anthropic-ratelimit-tokens-limit:
- ANTHROPIC-RATELIMIT-TOKENS-LIMIT-XXX
anthropic-ratelimit-tokens-remaining:
- ANTHROPIC-RATELIMIT-TOKENS-REMAINING-XXX
anthropic-ratelimit-tokens-reset:
- ANTHROPIC-RATELIMIT-TOKENS-RESET-XXX
cf-cache-status:
- DYNAMIC
request-id:
- REQUEST-ID-XXX
strict-transport-security:
- STS-XXX
traceresponse:
- 00-c97065bea414b95b086529ea43832d89-d5c4bad6e383ad9f-01
vary:
- Accept-Encoding
x-envoy-upstream-service-time:
- '2133'
status:
code: 200
message: OK

View File

@@ -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

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -8,18 +8,8 @@ interactions:
[{"description": "Add two numbers together and return the sum.", "name": "add_numbers",
"parameters_json_schema": {"properties": {"a": {"title": "A", "type": "integer"},
"b": {"title": "B", "type": "integer"}}, "required": ["a", "b"], "type": "object",
"additionalProperties": false}}, {"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.",
"name": "structured_output", "parameters_json_schema": {"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, "propertyOrdering": ["operation", "result", "explanation"]}}]}], "generationConfig":
{"stopSequences": ["\nObservation:"]}}'
"additionalProperties": false}}]}], "generationConfig": {"stopSequences": ["\nObservation:"],
"thinkingConfig": {"include_thoughts": true}}}'
headers:
User-Agent:
- X-USER-AGENT-XXX
@@ -30,13 +20,13 @@ interactions:
connection:
- keep-alive
content-length:
- '1592'
- '784'
content-type:
- application/json
host:
- generativelanguage.googleapis.com
x-goog-api-client:
- google-genai-sdk/1.49.0 gl-python/3.13.3
- google-genai-sdk/1.65.0 gl-python/3.13.3
x-goog-api-key:
- X-GOOG-API-KEY-XXX
method: POST
@@ -44,27 +34,36 @@ interactions:
response:
body:
string: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\":
[\n {\n \"functionCall\": {\n \"name\": \"add_numbers\",\n
\ \"args\": {\n \"a\": 15,\n \"b\":
27\n }\n },\n \"thoughtSignature\": \"CqMFAb4+9vtoEAola3khZd5LD4cccGlQsdVI9cPJGQBURT0qF5Xqp8o1L7oGN4s5trQpk7NPhKe1CYDMXDJueC7zM/zGlcy2daSJAeuTd9pxAbtndEXCGjM/9Nt8QRpvaDV3Ff2bkKSn/JCOJdzsN5m6G5C6BMRGVt8bZyRHelwu7tjCNYiMEvFqVoQIWN6d+CWKkHnbSwOlSUTDXJEcWvUwP82Ou7s68l2k7XNbDWCY5Tt8LUdPgeqjfH15JoEgZUbPxbVKA0ykRln1svfpvQ4Vm3Hn7PL3voWZWGzP5uLnH6JF2M8H6TokSDYZETvlDo5bK1Cx9IzrdUgHkku6gNbct/e53CPEUgqSKbY1VhsLAXAHieT4PKqeMQ4B+7gyCLXHeL6TOGjqSVGBBOQLtF9yCbKbkXa5pPu3+DnPhoOeH7jEPb+bqIWv6rxERErbKhu0IlP+UNBRAAj+wXNDZxQvLnlrlXrLtWllO9wFshr1DzgDgNZSRsPQeVQq2L0bL+KRobCXAfjMpH/8bhxdTI3sgsCtU3+dKwV5Z8Fg6e5oRyBAss8AE2CmYtdnYpt+iss9IT8NlSpI2DcdmVErEFNsebVcSwnr+9YXoESh4O1i8er9lX59hKTBdYXdP2GJ63cq9cSOalzx/doKxA2FzP3QhdV+H11LiUQzsQCXHqv0D+D290z1QoPhpsHEd7b/1EoW7D/2rub4acV8tpUcG2oe/Mj1kzYQoiEwZkgM56JoUs++5+5tWBMW68e4y1AmkyhDTCDkiNIa4noE6AOdNsLjL/+EHvcNFRmayFXXiUShIcMT0WQ9xNriWQP/dbhd6F5K7BKSajdB1391OYeHVmSEzzXYxjnUWXd+jqORQcsiPNIVRQkZI7ZGl6+4exmZsfrKzbFy\"\n
[\n {\n \"text\": \"Okay, here's my thought process on
tackling this simple addition problem:\\n\\n**Calculating 15 + 27**\\n\\nRight,
so I need to calculate 15 plus 27. It's a straightforward arithmetic operation,
and I know I have a dedicated tool for that \u2013 the `add_numbers` function.
No need to reinvent the wheel, I should use the appropriate tool in my toolbox.\\n\\nTo
use the tool effectively, I need to provide the correct inputs. In this case,
I'll set `a` equal to 15, and `b` equal to 27. That should be a piece of cake
for the function. Now I just need to call it!\\n\",\n \"thought\":
true\n },\n {\n \"functionCall\": {\n \"name\":
\"add_numbers\",\n \"args\": {\n \"a\": 15,\n
\ \"b\": 27\n }\n },\n \"thoughtSignature\":
\"CqwBAQw51sfkbjIDS7wS47oc/Bej+AYsUu5Cs+BC2Ae5NMasRmWa/u5Ct426qkpkIpgzGSNjwwfitf1gK93Abse9EGj5m1swXmPU2XSkqhMYMEXZGH1mW2U2XH8zaXHRIAx2aI0O8VbJ3sL8h1lJgbVCkvLa2RyWwY6E8FRPhQOHtrOQEQtfAUtHdJz928j6UEgS818X/7hEwuWsQhIho0frtziX30UlI7yXOeBBWw==\"\n
\ }\n ],\n \"role\": \"model\"\n },\n \"finishReason\":
\"STOP\",\n \"index\": 0,\n \"finishMessage\": \"Model generated
function call(s).\"\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\":
202,\n \"candidatesTokenCount\": 22,\n \"totalTokenCount\": 403,\n \"promptTokensDetails\":
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 202\n
\ }\n ],\n \"thoughtsTokenCount\": 179\n },\n \"modelVersion\":
\"gemini-2.5-flash\",\n \"responseId\": \"AlCOadrrK7aVjMcPksrU-A0\"\n}\n"
104,\n \"candidatesTokenCount\": 22,\n \"totalTokenCount\": 173,\n \"promptTokensDetails\":
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 104\n
\ }\n ],\n \"thoughtsTokenCount\": 47,\n \"serviceTier\": \"standard\"\n
\ },\n \"modelVersion\": \"gemini-2.5-flash\",\n \"responseId\": \"MpgPapmwO_vN-sAPvrWJmA0\"\n}\n"
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type:
- application/json; charset=UTF-8
Date:
- Thu, 12 Feb 2026 22:11:14 GMT
- Thu, 21 May 2026 23:41:40 GMT
Server:
- scaffolding on HTTPServer2
Server-Timing:
- gfet4t7; dur=1417
- gfet4t7; dur=1920
Transfer-Encoding:
- chunked
Vary:
@@ -75,6 +74,8 @@ interactions:
- X-CONTENT-TYPE-XXX
X-Frame-Options:
- X-FRAME-OPTIONS-XXX
X-Gemini-Service-Tier:
- standard
X-XSS-Protection:
- '0'
status:
@@ -83,7 +84,7 @@ interactions:
- request:
body: '{"contents": [{"parts": [{"text": "\nCurrent Task: Calculate 15 + 27 using
your add_numbers tool. Report the result."}], "role": "user"}, {"parts": [{"functionCall":
{"args": {"a": 15, "b": 27}, "name": "add_numbers"}, "thoughtSignature": "CqMFAb4-9vtoEAola3khZd5LD4cccGlQsdVI9cPJGQBURT0qF5Xqp8o1L7oGN4s5trQpk7NPhKe1CYDMXDJueC7zM_zGlcy2daSJAeuTd9pxAbtndEXCGjM_9Nt8QRpvaDV3Ff2bkKSn_JCOJdzsN5m6G5C6BMRGVt8bZyRHelwu7tjCNYiMEvFqVoQIWN6d-CWKkHnbSwOlSUTDXJEcWvUwP82Ou7s68l2k7XNbDWCY5Tt8LUdPgeqjfH15JoEgZUbPxbVKA0ykRln1svfpvQ4Vm3Hn7PL3voWZWGzP5uLnH6JF2M8H6TokSDYZETvlDo5bK1Cx9IzrdUgHkku6gNbct_e53CPEUgqSKbY1VhsLAXAHieT4PKqeMQ4B-7gyCLXHeL6TOGjqSVGBBOQLtF9yCbKbkXa5pPu3-DnPhoOeH7jEPb-bqIWv6rxERErbKhu0IlP-UNBRAAj-wXNDZxQvLnlrlXrLtWllO9wFshr1DzgDgNZSRsPQeVQq2L0bL-KRobCXAfjMpH_8bhxdTI3sgsCtU3-dKwV5Z8Fg6e5oRyBAss8AE2CmYtdnYpt-iss9IT8NlSpI2DcdmVErEFNsebVcSwnr-9YXoESh4O1i8er9lX59hKTBdYXdP2GJ63cq9cSOalzx_doKxA2FzP3QhdV-H11LiUQzsQCXHqv0D-D290z1QoPhpsHEd7b_1EoW7D_2rub4acV8tpUcG2oe_Mj1kzYQoiEwZkgM56JoUs--5-5tWBMW68e4y1AmkyhDTCDkiNIa4noE6AOdNsLjL_-EHvcNFRmayFXXiUShIcMT0WQ9xNriWQP_dbhd6F5K7BKSajdB1391OYeHVmSEzzXYxjnUWXd-jqORQcsiPNIVRQkZI7ZGl6-4exmZsfrKzbFy"}],
{"args": {"a": 15, "b": 27}, "name": "add_numbers"}, "thoughtSignature": "CqwBAQw51sfkbjIDS7wS47oc_Bej-AYsUu5Cs-BC2Ae5NMasRmWa_u5Ct426qkpkIpgzGSNjwwfitf1gK93Abse9EGj5m1swXmPU2XSkqhMYMEXZGH1mW2U2XH8zaXHRIAx2aI0O8VbJ3sL8h1lJgbVCkvLa2RyWwY6E8FRPhQOHtrOQEQtfAUtHdJz928j6UEgS818X_7hEwuWsQhIho0frtziX30UlI7yXOeBBWw=="}],
"role": "model"}, {"parts": [{"functionResponse": {"name": "add_numbers", "response":
{"result": 42}}}], "role": "user"}], "systemInstruction": {"parts": [{"text":
"You are Calculator. You are a calculator assistant that uses tools to compute
@@ -92,18 +93,8 @@ interactions:
numbers together and return the sum.", "name": "add_numbers", "parameters_json_schema":
{"properties": {"a": {"title": "A", "type": "integer"}, "b": {"title": "B",
"type": "integer"}}, "required": ["a", "b"], "type": "object", "additionalProperties":
false}}, {"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.", "name": "structured_output",
"parameters_json_schema": {"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, "propertyOrdering":
["operation", "result", "explanation"]}}]}], "generationConfig": {"stopSequences":
["\nObservation:"]}}'
false}}]}], "generationConfig": {"stopSequences": ["\nObservation:"], "thinkingConfig":
{"include_thoughts": true}}}'
headers:
User-Agent:
- X-USER-AGENT-XXX
@@ -114,13 +105,13 @@ interactions:
connection:
- keep-alive
content-length:
- '2725'
- '1249'
content-type:
- application/json
host:
- generativelanguage.googleapis.com
x-goog-api-client:
- google-genai-sdk/1.49.0 gl-python/3.13.3
- google-genai-sdk/1.65.0 gl-python/3.13.3
x-goog-api-key:
- X-GOOG-API-KEY-XXX
method: POST
@@ -128,28 +119,24 @@ interactions:
response:
body:
string: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\":
[\n {\n \"functionCall\": {\n \"name\": \"structured_output\",\n
\ \"args\": {\n \"result\": 42,\n \"explanation\":
\"The sum of 15 and 27 is 42.\",\n \"operation\": \"Addition\"\n
\ }\n },\n \"thoughtSignature\": \"CtYCAb4+9vsKJoVFV1W8ORKk+Likt7GS9CuzuE53V9sbS2gFuiEjJ7ghBqWDG2UrgyRYFjPl6EalXUBnEbEq9rZNYGY27VpcweI1tv6p+477bgz1pmZnL0nfAcrp4nuphL+Ij0nXZQoo5cF4Gk29RQSNy49VRn3eP9eUW0hG7EpkPmfJiUSSDuaQENHN1UBBnFS9QUC+Fw+unnQ10B57fauyiXWNrBUkE2PYqgj5vELa5lVMtk5beh4ydWNnZ04t8gvQniCJ38EWWQr8VAXrSqE156oCBMwkFaFM7huPWHZk53n/HAG/VsQgPayf045STWKWjBzp6uTiwH9pYtoI1LBah3uxVbJRKOzH7HI4U0cHsffQqIIUn8cW4SP1UK/nvAivU1l0p6Bot8KIVJ5vqoF+o2oDmTuZv0HkDo5+UvXRqfsO5AylpUdM+JMGaXVAA7oZNqVPQybw\"\n
\ }\n ],\n \"role\": \"model\"\n },\n \"finishReason\":
\"STOP\",\n \"index\": 0,\n \"finishMessage\": \"Model generated
function call(s).\"\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\":
240,\n \"candidatesTokenCount\": 39,\n \"totalTokenCount\": 357,\n \"promptTokensDetails\":
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 240\n
\ }\n ],\n \"thoughtsTokenCount\": 78\n },\n \"modelVersion\":
\"gemini-2.5-flash\",\n \"responseId\": \"A1COaaWbKvKGjMcPsN-EkAs\"\n}\n"
[\n {\n \"text\": \"The sum of 15 and 27 is 42.\"\n }\n
\ ],\n \"role\": \"model\"\n },\n \"finishReason\":
\"STOP\",\n \"index\": 0\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\":
142,\n \"candidatesTokenCount\": 15,\n \"totalTokenCount\": 157,\n \"promptTokensDetails\":
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 142\n
\ }\n ],\n \"serviceTier\": \"standard\"\n },\n \"modelVersion\":
\"gemini-2.5-flash\",\n \"responseId\": \"NZgPasTKBf3F-sAP4Lu48Ak\"\n}\n"
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type:
- application/json; charset=UTF-8
Date:
- Thu, 12 Feb 2026 22:11:15 GMT
- Thu, 21 May 2026 23:41:41 GMT
Server:
- scaffolding on HTTPServer2
Server-Timing:
- gfet4t7; dur=906
- gfet4t7; dur=750
Transfer-Encoding:
- chunked
Vary:
@@ -160,6 +147,107 @@ interactions:
- X-CONTENT-TYPE-XXX
X-Frame-Options:
- X-FRAME-OPTIONS-XXX
X-Gemini-Service-Tier:
- standard
X-XSS-Protection:
- '0'
status:
code: 200
message: OK
- request:
body: '{"contents": [{"parts": [{"text": "The sum of 15 and 27 is 42."}], "role":
"user"}], "systemInstruction": {"parts": [{"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."}], "role": "user"}, "generationConfig": {"responseMimeType":
"application/json", "responseJsonSchema": {"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, "propertyOrdering": ["operation", "result", "explanation"]}, "thinkingConfig":
{"include_thoughts": true}}}'
headers:
User-Agent:
- X-USER-AGENT-XXX
accept:
- '*/*'
accept-encoding:
- ACCEPT-ENCODING-XXX
connection:
- keep-alive
content-length:
- '2247'
content-type:
- application/json
host:
- generativelanguage.googleapis.com
x-goog-api-client:
- google-genai-sdk/1.65.0 gl-python/3.13.3
x-goog-api-key:
- X-GOOG-API-KEY-XXX
method: POST
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent
response:
body:
string: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\":
[\n {\n \"text\": \"**Analyzing the User's Statement**\\n\\nOkay,
so the user has given me the statement: \\\"The sum of 15 and 27 is 42.\\\"
My task is to break this down into a structured JSON object according to the
`CalculationResult` schema I'm working with. This is straightforward; let's
extract the key pieces:\\n\\nFirst, the **operation**: The word \\\"sum\\\"
is a clear indicator that we're dealing with addition. No ambiguity there.\\n\\nNext,
the **result**: The statement explicitly tells us that the result \\\"is 42\\\".
That's a direct, easily extracted value.\\n\\nFinally, the **explanation**:
I can use the entire original statement, \\\"The sum of 15 and 27 is 42.\\\",
as the explanation. It's concise and perfectly encapsulates the context of
the calculation.\\n\",\n \"thought\": true\n },\n {\n
\ \"text\": \"{\\\"operation\\\":\\\"addition\\\",\\\"result\\\":42,\\\"explanation\\\":\\\"The
sum of 15 and 27 is 42.\\\"}\"\n }\n ],\n \"role\":
\"model\"\n },\n \"finishReason\": \"STOP\",\n \"index\": 0\n
\ }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 321,\n \"candidatesTokenCount\":
28,\n \"totalTokenCount\": 480,\n \"promptTokensDetails\": [\n {\n
\ \"modality\": \"TEXT\",\n \"tokenCount\": 321\n }\n ],\n
\ \"thoughtsTokenCount\": 131,\n \"serviceTier\": \"standard\"\n },\n
\ \"modelVersion\": \"gemini-2.5-flash\",\n \"responseId\": \"NZgPasDuKf2VjMcPwc6D4Ak\"\n}\n"
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type:
- application/json; charset=UTF-8
Date:
- Thu, 21 May 2026 23:41:44 GMT
Server:
- scaffolding on HTTPServer2
Server-Timing:
- gfet4t7; dur=2425
Transfer-Encoding:
- chunked
Vary:
- Origin
- X-Origin
- Referer
X-Content-Type-Options:
- X-CONTENT-TYPE-XXX
X-Frame-Options:
- X-FRAME-OPTIONS-XXX
X-Gemini-Service-Tier:
- standard
X-XSS-Protection:
- '0'
status:

View File

@@ -23,17 +23,8 @@ interactions:
numbers together and return the sum.", "name": "add_numbers", "parameters_json_schema":
{"properties": {"a": {"title": "A", "type": "integer"}, "b": {"title": "B",
"type": "integer"}}, "required": ["a", "b"], "type": "object", "additionalProperties":
false}}, {"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.", "name": "structured_output",
"parameters_json_schema": {"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, "propertyOrdering": ["operation", "result", "explanation"]}}]}], "generationConfig":
{"stopSequences": ["\nObservation:"]}}'
false}}]}], "generationConfig": {"stopSequences": ["\nObservation:"], "thinkingConfig":
{"include_thoughts": true}}}'
headers:
User-Agent:
- X-USER-AGENT-XXX
@@ -44,41 +35,67 @@ interactions:
connection:
- keep-alive
content-length:
- '2763'
- '2016'
content-type:
- application/json
host:
- generativelanguage.googleapis.com
x-goog-api-client:
- google-genai-sdk/1.49.0 gl-python/3.13.12
- google-genai-sdk/1.65.0 gl-python/3.13.3
x-goog-api-key:
- X-GOOG-API-KEY-XXX
method: POST
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-001:generateContent
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent
response:
body:
string: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\":
[\n {\n \"functionCall\": {\n \"name\": \"add_numbers\",\n
[\n {\n \"text\": \"**My Calculation Process**\\n\\nAlright,
the user wants me to compute 15 + 27. Simple enough. I have a tool specifically
designed for this: `add_numbers(a: int, b: int)`. This is ideal; I'll utilize
that.\\n\\nSo, first step: I need to call the `add_numbers` tool. The inputs
are straightforward: `a` should be 15 and `b` should be 27. I'll execute that
call immediately.\\n\\nOnce I have the result \u2013 the sum \u2013 in hand,
I need to format the output. The user is specific about the structure; it
needs to be a JSON object conforming to that OpenAPI schema. Specifically,
the JSON should include: an \\\"operation\\\" field set to \\\"Addition\\\",
a \\\"result\\\" field populated with the calculated sum, and an \\\"explanation\\\"
field giving some context, which should be \\\"Added 15 and 27 together.\\\"\\n\\nTherefore,
my workflow is: call the tool with the provided numbers, get the sum, and
then construct the final JSON object in the required format.\\n\",\n \"thought\":
true\n },\n {\n \"text\": \"**My Reasoning for
Calculating 15 + 27**\\n\\nOkay, the user wants me to compute 15 plus 27.
No problem; that's straightforward. I've got a dedicated `add_numbers` tool
for this, which is exactly the right approach. Let's see...I need to call
that tool, providing `a=15` and `b=27` as input parameters. Once I receive
the sum, I can move on to formatting the result.\\n\\nNow, the important part:
the output needs to be a JSON object, specifically structured as dictated
by the OpenAPI schema. I need to make sure I include the \\\"operation\\\",
\\\"result\\\", and \\\"explanation\\\" fields. \\\"operation\\\" will be
\\\"Addition\\\", the \\\"result\\\" will naturally be the sum I get from
the tool, and the \\\"explanation\\\" will simply be \\\"Added 15 and 27 together.\\\"
That should cover everything, and the user should get a perfectly formatted
response.\\n\",\n \"thought\": true\n },\n {\n
\ \"functionCall\": {\n \"name\": \"add_numbers\",\n
\ \"args\": {\n \"a\": 15,\n \"b\":
27\n }\n }\n }\n ],\n \"role\":
\"model\"\n },\n \"finishReason\": \"STOP\",\n \"avgLogprobs\":
4.3579145442760951e-06\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\":
377,\n \"candidatesTokenCount\": 7,\n \"totalTokenCount\": 384,\n \"promptTokensDetails\":
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 377\n
\ }\n ],\n \"candidatesTokensDetails\": [\n {\n \"modality\":
\"TEXT\",\n \"tokenCount\": 7\n }\n ]\n },\n \"modelVersion\":
\"gemini-2.0-flash-001\",\n \"responseId\": \"vVefaYDSOouXjMcPicLCsQY\"\n}\n"
27\n }\n },\n \"thoughtSignature\": \"CtkGAQw51sf8m1RivBZ7Zp+ZkaqxDdZzSlzepmvlCKak9gl6edIuej/pHxR5dg3qZf89XmHvQ6HigZyzqHcYbSvcRHVGbpNkTr62FC0g10oK5ZEp/r1otLIcgXoVgyFGguJPe/NsfWSX3Uc7ZaYgV0Q2MHBsjUmEHicPH0Pj4Xmbe2I1pK/9DPrzSQqZW3duhLBlBIF9RwZUiltPH6mK+k71l8bN/ebsbbZM18FMXf0wg/7lf3OjvY2wdLDNUD/F2M7T8yfi7NelPWorjIuTGOVWlVRsdGW0QEzuVoyYY7OfbBJC+XsmTumYt+vqgIR3jcQZlA5/3yJdj3e/3mrNmzGt+8VvkjUnu3pz0IUkq2SoTG0+6Y/ajsUI0YA/BFiAXHjrRhH1Nx3ihGWT7E7VzpU/E1ZPFMJIOPLRSpRv8G6ITnjZGthozTZtKLgoHCF7kx4Ni8eVdOh2Us6kY7tYpVabM1dmw0gextEEt+fBMoI+qZGkXdL1YW6SEtQBHh3BGKX8khcrqNvqPZDFzSG0iieMJq7abbEYAIc8zRkeGlWEdX6ES6e+njnFN7JX0Nc32GzOjmpgx9gRhYe+wKonqBQ9RwLLNK+lFuflLTrU3D8jMiPCJyvoRsjdjEc+2JtHXo14ibOVXvZ6oYCHsTEB7f+90/qzcrITESyDBD/rmiT/SqgitBa44MZE9CZ9Ml+BW0xd9FfCy4oLy8w4vszVFDw9Eotr4pEzdCeDeWjMn35taJnWf6jUeF0z/0iyHjbi7XRubJXxI2YuKQ+HRCKX1RFaJWLhmxO4JNBDBqfYZqsO/FefqxjWi2pRzE8U/Upp8Tv/hy1FoN9Abs8W6lPoqgOyEiOcpVkM+u0CgUbf87I1X2EiPpuJF4D9dHlEJqumiPqIGazSLnrjW1qqbM5UpQQuPoTC7q+G092CEnNJBIwrufddZPDfD9rqINpmMa+7OswldKViVaCWR3VsgrSXJj7lVRntCyE2atWxTvtQVnR/JLDdyc98CAUChtAPnC4K/K3OVI4jffQQsHmfeOnTyg0n2VnZ6Yhgo0lMdE4IfMrNOWOuNvHodeHisD2yXjvTCgScO8B3s+EJTvenHMert3nRgjNRmFZ0cRNSjbTeG0UlB9s7Uy0uyrn5ODkKIgEMOdbH9yJU53jInG9boFeMXb1qif47Pc72taZkl6ZaMK4=\"\n
\ }\n ],\n \"role\": \"model\"\n },\n \"finishReason\":
\"STOP\",\n \"index\": 0,\n \"finishMessage\": \"Model generated
function call(s).\"\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\":
383,\n \"candidatesTokenCount\": 22,\n \"totalTokenCount\": 658,\n \"promptTokensDetails\":
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 383\n
\ }\n ],\n \"thoughtsTokenCount\": 253,\n \"serviceTier\": \"standard\"\n
\ },\n \"modelVersion\": \"gemini-2.5-flash\",\n \"responseId\": \"qagPas37Ba2R-8YPzYzI8AY\"\n}\n"
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type:
- application/json; charset=UTF-8
Date:
- Wed, 25 Feb 2026 20:12:46 GMT
- Fri, 22 May 2026 00:51:56 GMT
Server:
- scaffolding on HTTPServer2
Server-Timing:
- gfet4t7; dur=718
- gfet4t7; dur=3892
Transfer-Encoding:
- chunked
Vary:
@@ -89,6 +106,8 @@ interactions:
- X-CONTENT-TYPE-XXX
X-Frame-Options:
- X-FRAME-OPTIONS-XXX
X-Gemini-Service-Tier:
- standard
X-XSS-Protection:
- '0'
status:
@@ -112,27 +131,17 @@ interactions:
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."}], "role": "user"}, {"parts": [{"functionCall": {"args": {"a":
15, "b": 27}, "name": "add_numbers"}}], "role": "model"}, {"parts": [{"functionResponse":
{"name": "add_numbers", "response": {"result": 42}}}], "role": "user"}, {"parts":
[{"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": "user"}], "systemInstruction": {"parts": [{"text": "You are Calculator.
You are a calculator assistant that uses tools to compute results.\nYour personal
goal is: Perform calculations using available tools"}], "role": "user"}, "tools":
[{"functionDeclarations": [{"description": "Add two numbers together and return
the sum.", "name": "add_numbers", "parameters_json_schema": {"properties": {"a":
{"title": "A", "type": "integer"}, "b": {"title": "B", "type": "integer"}},
"required": ["a", "b"], "type": "object", "additionalProperties": false}}, {"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.", "name": "structured_output", "parameters_json_schema":
{"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, "propertyOrdering": ["operation",
"result", "explanation"]}}]}], "generationConfig": {"stopSequences": ["\nObservation:"]}}'
15, "b": 27}, "name": "add_numbers"}, "thoughtSignature": "CtkGAQw51sf8m1RivBZ7Zp-ZkaqxDdZzSlzepmvlCKak9gl6edIuej_pHxR5dg3qZf89XmHvQ6HigZyzqHcYbSvcRHVGbpNkTr62FC0g10oK5ZEp_r1otLIcgXoVgyFGguJPe_NsfWSX3Uc7ZaYgV0Q2MHBsjUmEHicPH0Pj4Xmbe2I1pK_9DPrzSQqZW3duhLBlBIF9RwZUiltPH6mK-k71l8bN_ebsbbZM18FMXf0wg_7lf3OjvY2wdLDNUD_F2M7T8yfi7NelPWorjIuTGOVWlVRsdGW0QEzuVoyYY7OfbBJC-XsmTumYt-vqgIR3jcQZlA5_3yJdj3e_3mrNmzGt-8VvkjUnu3pz0IUkq2SoTG0-6Y_ajsUI0YA_BFiAXHjrRhH1Nx3ihGWT7E7VzpU_E1ZPFMJIOPLRSpRv8G6ITnjZGthozTZtKLgoHCF7kx4Ni8eVdOh2Us6kY7tYpVabM1dmw0gextEEt-fBMoI-qZGkXdL1YW6SEtQBHh3BGKX8khcrqNvqPZDFzSG0iieMJq7abbEYAIc8zRkeGlWEdX6ES6e-njnFN7JX0Nc32GzOjmpgx9gRhYe-wKonqBQ9RwLLNK-lFuflLTrU3D8jMiPCJyvoRsjdjEc-2JtHXo14ibOVXvZ6oYCHsTEB7f-90_qzcrITESyDBD_rmiT_SqgitBa44MZE9CZ9Ml-BW0xd9FfCy4oLy8w4vszVFDw9Eotr4pEzdCeDeWjMn35taJnWf6jUeF0z_0iyHjbi7XRubJXxI2YuKQ-HRCKX1RFaJWLhmxO4JNBDBqfYZqsO_FefqxjWi2pRzE8U_Upp8Tv_hy1FoN9Abs8W6lPoqgOyEiOcpVkM-u0CgUbf87I1X2EiPpuJF4D9dHlEJqumiPqIGazSLnrjW1qqbM5UpQQuPoTC7q-G092CEnNJBIwrufddZPDfD9rqINpmMa-7OswldKViVaCWR3VsgrSXJj7lVRntCyE2atWxTvtQVnR_JLDdyc98CAUChtAPnC4K_K3OVI4jffQQsHmfeOnTyg0n2VnZ6Yhgo0lMdE4IfMrNOWOuNvHodeHisD2yXjvTCgScO8B3s-EJTvenHMert3nRgjNRmFZ0cRNSjbTeG0UlB9s7Uy0uyrn5ODkKIgEMOdbH9yJU53jInG9boFeMXb1qif47Pc72taZkl6ZaMK4="}],
"role": "model"}, {"parts": [{"functionResponse": {"name": "add_numbers", "response":
{"result": 42}}}], "role": "user"}], "systemInstruction": {"parts": [{"text":
"You are Calculator. You are a calculator assistant that uses tools to compute
results.\nYour personal goal is: Perform calculations using available tools"}],
"role": "user"}, "tools": [{"functionDeclarations": [{"description": "Add two
numbers together and return the sum.", "name": "add_numbers", "parameters_json_schema":
{"properties": {"a": {"title": "A", "type": "integer"}, "b": {"title": "B",
"type": "integer"}}, "required": ["a", "b"], "type": "object", "additionalProperties":
false}}]}], "generationConfig": {"stopSequences": ["\nObservation:"], "thinkingConfig":
{"include_thoughts": true}}}'
headers:
User-Agent:
- X-USER-AGENT-XXX
@@ -143,42 +152,50 @@ interactions:
connection:
- keep-alive
content-length:
- '3166'
- '3441'
content-type:
- application/json
host:
- generativelanguage.googleapis.com
x-goog-api-client:
- google-genai-sdk/1.49.0 gl-python/3.13.12
- google-genai-sdk/1.65.0 gl-python/3.13.3
x-goog-api-key:
- X-GOOG-API-KEY-XXX
method: POST
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-001:generateContent
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent
response:
body:
string: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\":
[\n {\n \"functionCall\": {\n \"name\": \"structured_output\",\n
\ \"args\": {\n \"result\": 42,\n \"explanation\":
\"15 + 27 = 42\",\n \"operation\": \"addition\"\n }\n
\ }\n }\n ],\n \"role\": \"model\"\n },\n
\ \"finishReason\": \"STOP\",\n \"avgLogprobs\": -0.07498827245500353\n
\ }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 421,\n \"candidatesTokenCount\":
18,\n \"totalTokenCount\": 439,\n \"promptTokensDetails\": [\n {\n
\ \"modality\": \"TEXT\",\n \"tokenCount\": 421\n }\n ],\n
\ \"candidatesTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n
\ \"tokenCount\": 18\n }\n ]\n },\n \"modelVersion\": \"gemini-2.0-flash-001\",\n
\ \"responseId\": \"vlefac7bJb6TjMcPzYWh0Ag\"\n}\n"
[\n {\n \"text\": \"**My Calculation and OpenAPI Formatting**\\n\\nOkay,
so I've just crunched the numbers, 15 plus 27, and the answer, as expected,
is 42. Now comes the formatting, the part I truly appreciate. It's time to
translate this into the precise structure that the OpenAPI schema dictates.\\n\\nLet's
see\u2026 I need to populate three key fields: `operation`, `result`, and
`explanation`. This is straightforward. For `operation`, I'll enter \\\"Addition,\\\"
because, well, that's what I did! For `result`, the answer I painstakingly
produced, 42. And for `explanation`, a concise note, \\\"Added 15 and 27 together.\\\"
Perfect. That should do the trick. Now I can move on to the next task.\\n\",\n
\ \"thought\": true\n },\n {\n \"text\":
\"{\\n \\\"operation\\\": \\\"Addition\\\",\\n \\\"result\\\": 42,\\n \\\"explanation\\\":
\\\"Added 15 and 27 together.\\\"\\n}\",\n \"thoughtSignature\":
\"CrcDAQw51sd+vh7cJvN7WGZKQIJGL6Xtr/+CNnL2r9YWGHv5EBrOm/Qdzr4eK0eyrJhuJGBZg5V5XakEuLMULUvth7stE+FTz16F5Vzx2yKMuM5Ictv/DlI7s4Z5WFaI5HJVJTojOhW9K/1TM8y48+eStJre8Qyz3tOvFg1DPEau6JCk+1uoRil2RoZHxFQpd0LaDhl4sKZkRr1e5c2gtfZiK3NHR3ipbRejIOGjDQah4+q4D6ASTiHZxHCBIjAP4HH8DF40oylF6mQR1WHWezKzvkZ0sz3ydPGExM5+lFOE8z1NUpqH2kJ3PfzdrbX2VccIT+5pWz9NsIW8N1JYbPvb7xKENh7mTI+tmCtuAiO9DTwWUf450OHNWdrHQPxn3MMT10+4RMzKBeDAjEFVZ6M68CyUDTJ0uDtqJZ6SXs3ZdmmLGQY1lAk29r0eklaMJLk226uMUKCXlHKwyDbJVH3+SwGkgU+Am81AiekV5ZWQjfe3gUN8ojOLSNvpAfaf/K8ZvR4uGCEMs2pJ2sqI6sCIE9w9+u2biTattqWtcO+wmPXZ/CwU/ASXHlBqt55cvB2XyFTXO7kQGw==\"\n
\ }\n ],\n \"role\": \"model\"\n },\n \"finishReason\":
\"STOP\",\n \"index\": 0\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\":
421,\n \"candidatesTokenCount\": 36,\n \"totalTokenCount\": 560,\n \"promptTokensDetails\":
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 421\n
\ }\n ],\n \"thoughtsTokenCount\": 103,\n \"serviceTier\": \"standard\"\n
\ },\n \"modelVersion\": \"gemini-2.5-flash\",\n \"responseId\": \"ragPaseeA6nT_uMP653cmAc\"\n}\n"
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type:
- application/json; charset=UTF-8
Date:
- Wed, 25 Feb 2026 20:12:47 GMT
- Fri, 22 May 2026 00:51:59 GMT
Server:
- scaffolding on HTTPServer2
Server-Timing:
- gfet4t7; dur=774
- gfet4t7; dur=2377
Transfer-Encoding:
- chunked
Vary:
@@ -189,6 +206,8 @@ interactions:
- X-CONTENT-TYPE-XXX
X-Frame-Options:
- X-FRAME-OPTIONS-XXX
X-Gemini-Service-Tier:
- standard
X-XSS-Protection:
- '0'
status:

View File

@@ -923,7 +923,7 @@ def test_anthropic_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="anthropic/claude-3-5-haiku-20241022"),
llm=LLM(model="anthropic/claude-sonnet-4-6"),
tools=[add_numbers],
verbose=True,
)

View File

@@ -844,7 +844,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,
)
@@ -886,7 +886,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,
)

View File

@@ -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")

View File

@@ -969,7 +969,7 @@ def test_gemini_crew_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="google/gemini-2.0-flash-001"),
llm=LLM(model="google/gemini-2.5-flash"),
tools=[add_numbers],
)

View File

@@ -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(

View File

@@ -42,7 +42,7 @@ GEMINI_MODELS = [
]
BEDROCK_MODELS = [
"bedrock/anthropic.claude-3-haiku-20240307-v1:0",
"bedrock/us.anthropic.claude-sonnet-4-6",
]