add integration test recordings for Bedrock provider

This commit is contained in:
skamenan7 2025-11-05 15:21:04 -05:00
parent fb89143949
commit c9495e04a8
10 changed files with 3620 additions and 0 deletions

View file

@ -0,0 +1,182 @@
{
"test_id": "tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming[client_with_models-txt=bedrock-inference/openai.gpt-oss-20b-1:0-inference:chat_completion:streaming_01]",
"request": {
"method": "POST",
"url": "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "openai.gpt-oss-20b-1:0",
"messages": [
{
"role": "user",
"content": "What's the name of the Sun in latin?"
}
],
"stream": true
},
"endpoint": "/v1/chat/completions",
"model": "openai.gpt-oss-20b-1:0"
},
"response": {
"body": [
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-085098d43435",
"choices": [
{
"delta": {
"content": "",
"function_call": null,
"refusal": null,
"role": "assistant",
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-085098d43435",
"choices": [
{
"delta": {
"content": "<reasoning>We need to answer: \"What's the name of the Sun in Latin?\" The Latin word for Sun (the celestial body) is \"sol\", also \"sol\" as noun for sun. So answer: Sol. Also the Latin name \"Sol\"</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-085098d43435",
"choices": [
{
"delta": {
"content": "<reasoning> (genitive \"Solis\"). Might mention \"sol\" or \"solis\" if genitive. So answer. Use brief.</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-085098d43435",
"choices": [
{
"delta": {
"content": "In Latin the Sun",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-085098d43435",
"choices": [
{
"delta": {
"content": " is called **Sol** (genitive *Solis*).",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-085098d43435",
"choices": [
{
"delta": {
"content": null,
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": "stop",
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
}
],
"is_streaming": true
},
"id_normalization_mapping": {}
}

View file

@ -0,0 +1,61 @@
{
"test_id": "tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_non_streaming[client_with_models-txt=bedrock-inference/openai.gpt-oss-20b-1:0-inference:chat_completion:non_streaming_02]",
"request": {
"method": "POST",
"url": "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "openai.gpt-oss-20b-1:0",
"messages": [
{
"role": "user",
"content": "Which planet has rings around it with a name starting with letter S?"
}
],
"stream": false
},
"endpoint": "/v1/chat/completions",
"model": "openai.gpt-oss-20b-1:0"
},
"response": {
"body": {
"__type__": "openai.types.chat.chat_completion.ChatCompletion",
"__data__": {
"id": "rec-0fc8d107245c",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "<reasoning>User asks: \"Which planet has rings around it with a name starting with letter S?\" They mean: which planet has a ring system, presumably among the known ringed planets. Names starting with letter S. Which planet has rings around it and the ring's name begins with S? Or possibly the planet's name starts with S. But no planets in solar system start with S. maybe Saturn? But Saturn starts with S. Yes Saturn rings. So answer: Saturn has rings. But question: \"Which planet has rings around it with a name starting with letter S?\" Another interpretation: the ring's name starts with S. Saturn's rings are named A, B, C, D, etc. They don't start with \"S\". However, the ring system may include the \"Saturn's ring\" known as the \"Saturn rings\" starting with S. The question may be ambiguous. Let's analyze. The planet has rings around it; this planet's name starts with S. Which planet has rings? Saturn is the only planet with a prominent ring system. So answer: Saturn.\n\nThus produce a concise answer.</reasoning>**Saturn** \u2013 it is the solar\u2011system planet whose name starts with an \u201cS\u201d and is famously encircled by a complex system of rings.",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": null
}
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion",
"service_tier": "auto",
"system_fingerprint": null,
"usage": {
"completion_tokens": 268,
"prompt_tokens": 83,
"total_tokens": 351,
"completion_tokens_details": null,
"prompt_tokens_details": {
"audio_tokens": 0,
"cached_tokens": 48
}
}
}
},
"is_streaming": false
},
"id_normalization_mapping": {}
}

View file

@ -0,0 +1,158 @@
{
"test_id": "tests/integration/inference/test_openai_completion.py::test_inference_store_tool_calls[client_with_models-txt=bedrock-inference/openai.gpt-oss-20b-1:0-True]",
"request": {
"method": "POST",
"url": "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "openai.gpt-oss-20b-1:0",
"messages": [
{
"role": "user",
"content": "What's the weather in Tokyo? Use the get_weather function to get the weather."
}
],
"stream": true,
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the weather in a given city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city to get the weather for"
}
}
}
}
}
]
},
"endpoint": "/v1/chat/completions",
"model": "openai.gpt-oss-20b-1:0"
},
"response": {
"body": [
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-311f61d4ec64",
"choices": [
{
"delta": {
"content": "",
"function_call": null,
"refusal": null,
"role": "assistant",
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-311f61d4ec64",
"choices": [
{
"delta": {
"content": "<reasoning>We must use the function. Let's call get_weather with city: \"Tokyo\".</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-311f61d4ec64",
"choices": [
{
"delta": {
"content": null,
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": [
{
"index": 0,
"id": "chatcmpl-tool-4bc2a7f1c98946d3a54ef4802d320079",
"function": {
"arguments": "{\"city\":\"Tokyo\"}",
"name": "get_weather"
},
"type": "function"
}
]
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-311f61d4ec64",
"choices": [
{
"delta": {
"content": null,
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": "tool_calls",
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
}
],
"is_streaming": true
},
"id_normalization_mapping": {}
}

View file

@ -0,0 +1,130 @@
{
"test_id": "tests/integration/inference/test_openai_completion.py::test_inference_store[client_with_models-txt=bedrock-inference/openai.gpt-oss-20b-1:0-True]",
"request": {
"method": "POST",
"url": "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "openai.gpt-oss-20b-1:0",
"messages": [
{
"role": "user",
"content": "Hello, world!"
}
],
"stream": true
},
"endpoint": "/v1/chat/completions",
"model": "openai.gpt-oss-20b-1:0"
},
"response": {
"body": [
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-31d205d1ff90",
"choices": [
{
"delta": {
"content": "",
"function_call": null,
"refusal": null,
"role": "assistant",
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-31d205d1ff90",
"choices": [
{
"delta": {
"content": "<reasoning>They just said \"Hello, world!\" They want a response. Probably just a friendly greeting.</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-31d205d1ff90",
"choices": [
{
"delta": {
"content": "Hello! \ud83c\udf1f How can I help you today?",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-31d205d1ff90",
"choices": [
{
"delta": {
"content": null,
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": "stop",
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
}
],
"is_streaming": true
},
"id_normalization_mapping": {}
}

View file

@ -0,0 +1,443 @@
{
"test_id": "tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming_with_n[client_with_models-txt=bedrock-inference/openai.gpt-oss-20b-1:0-inference:chat_completion:streaming_02]",
"request": {
"method": "POST",
"url": "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "openai.gpt-oss-20b-1:0",
"messages": [
{
"role": "user",
"content": "What is the name of the US captial?"
}
],
"n": 2,
"stream": true
},
"endpoint": "/v1/chat/completions",
"model": "openai.gpt-oss-20b-1:0"
},
"response": {
"body": [
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "",
"function_call": null,
"refusal": null,
"role": "assistant",
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "<reasoning>The user asks \"UserWhat is the name: of the US capital \"What is the name?\" Probably of the US captial?\" looking They for Washington likely mean \"capital\" of, D.C. They the spelled \"capt US,ial\" incorrectly. Should i correct.e., Washington,. Provide answer. D.C. Need</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "The",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "<reasoning> to respond</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 1,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": " capital",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "<reasoning> succinct</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 1,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": " of the United States is",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "<reasoning>ly. Also correct</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 1,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": " **Washington,\u202f",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "<reasoning> the</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 1,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "D.C.**",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": null,
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": "stop",
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "<reasoning> typo. So answer: Washington, D.C.</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 1,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "The capital of the United States is Washington,",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 1,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": "\u202fD.C.",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 1,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-35167e9c8bcd",
"choices": [
{
"delta": {
"content": null,
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": "stop",
"index": 1,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
}
],
"is_streaming": true
},
"id_normalization_mapping": {}
}

View file

@ -0,0 +1,85 @@
{
"test_id": "tests/integration/inference/test_openai_completion.py::test_inference_store_tool_calls[client_with_models-txt=bedrock-inference/openai.gpt-oss-20b-1:0-False]",
"request": {
"method": "POST",
"url": "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "openai.gpt-oss-20b-1:0",
"messages": [
{
"role": "user",
"content": "What's the weather in Tokyo? Use the get_weather function to get the weather."
}
],
"stream": false,
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the weather in a given city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city to get the weather for"
}
}
}
}
}
]
},
"endpoint": "/v1/chat/completions",
"model": "openai.gpt-oss-20b-1:0"
},
"response": {
"body": {
"__type__": "openai.types.chat.chat_completion.ChatCompletion",
"__data__": {
"id": "rec-44e059fd47e6",
"choices": [
{
"finish_reason": "tool_calls",
"index": 0,
"logprobs": null,
"message": {
"content": "<reasoning>The user requests the weather in Tokyo and says to use get_weather function. So I should call the function.</reasoning>",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": [
{
"id": "chatcmpl-tool-2a1c21780929400d8311f566be9711bf",
"function": {
"arguments": "{\"city\":\"Tokyo\"}",
"name": "get_weather"
},
"type": "function"
}
]
}
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion",
"service_tier": "auto",
"system_fingerprint": null,
"usage": {
"completion_tokens": 46,
"prompt_tokens": 145,
"total_tokens": 191,
"completion_tokens_details": null,
"prompt_tokens_details": null
}
}
},
"is_streaming": false
},
"id_normalization_mapping": {}
}

View file

@ -0,0 +1,182 @@
{
"test_id": "tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming[client_with_models-txt=bedrock-inference/openai.gpt-oss-20b-1:0-inference:chat_completion:streaming_02]",
"request": {
"method": "POST",
"url": "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "openai.gpt-oss-20b-1:0",
"messages": [
{
"role": "user",
"content": "What is the name of the US captial?"
}
],
"stream": true
},
"endpoint": "/v1/chat/completions",
"model": "openai.gpt-oss-20b-1:0"
},
"response": {
"body": [
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-62ea1f6cc098",
"choices": [
{
"delta": {
"content": "",
"function_call": null,
"refusal": null,
"role": "assistant",
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-62ea1f6cc098",
"choices": [
{
"delta": {
"content": "<reasoning>The user asks: \"What is the name of the US captial?\" Likely a typo \"captial\" meant \"capital\". The answer: Washington, D.C. But need to address the misspelling or correct. Should provide correct info with</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-62ea1f6cc098",
"choices": [
{
"delta": {
"content": "<reasoning> brief explanation. Also mention that Washington, D.C., is named after George Washington. Should not mention policy. Just answer.</reasoning>",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-62ea1f6cc098",
"choices": [
{
"delta": {
"content": "The capital of the United States is **Washington, D.C.** It is named after George Washington and serves as the seat of the federal government",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-62ea1f6cc098",
"choices": [
{
"delta": {
"content": ".",
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
},
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "rec-62ea1f6cc098",
"choices": [
{
"delta": {
"content": null,
"function_call": null,
"refusal": null,
"role": null,
"tool_calls": null
},
"finish_reason": "stop",
"index": 0,
"logprobs": null
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion.chunk",
"service_tier": "auto",
"system_fingerprint": null,
"usage": null
}
}
],
"is_streaming": true
},
"id_normalization_mapping": {}
}

View file

@ -0,0 +1,58 @@
{
"test_id": "tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_non_streaming[client_with_models-txt=bedrock-inference/openai.gpt-oss-20b-1:0-inference:chat_completion:non_streaming_01]",
"request": {
"method": "POST",
"url": "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "openai.gpt-oss-20b-1:0",
"messages": [
{
"role": "user",
"content": "Which planet do humans live on?"
}
],
"stream": false
},
"endpoint": "/v1/chat/completions",
"model": "openai.gpt-oss-20b-1:0"
},
"response": {
"body": {
"__type__": "openai.types.chat.chat_completion.ChatCompletion",
"__data__": {
"id": "rec-8be772a5c559",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "<reasoning>The user asks: \"Which planet do humans live on?\" It's a simple factual question: Humans live on Earth. But we need to consider context: We have no further context. Likely a straightforward answer: Earth. However maybe they want details? The policy says no disallowed content. It's fine. Just answer. Probably best to give a short answer. Also could include explanation of Earth as the sixth planet from the Sun, etc. It expects a simple relevant answer. So answer: Earth.</reasoning>Human beings live on **Earth** \u2013 the planet that\u2019s the third from the Sun, average distance about 150\u202fmillion\u202fkm, and the only known world with an environment that supports life as we know it.",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": null
}
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion",
"service_tier": "auto",
"system_fingerprint": null,
"usage": {
"completion_tokens": 154,
"prompt_tokens": 76,
"total_tokens": 230,
"completion_tokens_details": null,
"prompt_tokens_details": null
}
}
},
"is_streaming": false
},
"id_normalization_mapping": {}
}

View file

@ -0,0 +1,58 @@
{
"test_id": "tests/integration/inference/test_openai_completion.py::test_inference_store[client_with_models-txt=bedrock-inference/openai.gpt-oss-20b-1:0-False]",
"request": {
"method": "POST",
"url": "https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "openai.gpt-oss-20b-1:0",
"messages": [
{
"role": "user",
"content": "Hello, world!"
}
],
"stream": false
},
"endpoint": "/v1/chat/completions",
"model": "openai.gpt-oss-20b-1:0"
},
"response": {
"body": {
"__type__": "openai.types.chat.chat_completion.ChatCompletion",
"__data__": {
"id": "rec-ec41014ac617",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "<reasoning>The user says \"Hello, world!\" Expect a greeting reply. Also a friendly encouragement. Sure.</reasoning>Hello! \ud83d\udc4b How can I help you today?",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": null
}
}
],
"created": 0,
"model": "openai.gpt-oss-20b-1:0",
"object": "chat.completion",
"service_tier": "auto",
"system_fingerprint": null,
"usage": {
"completion_tokens": 41,
"prompt_tokens": 73,
"total_tokens": 114,
"completion_tokens_details": null,
"prompt_tokens_details": null
}
}
},
"is_streaming": false
},
"id_normalization_mapping": {}
}