- Newest
- Most votes
- Most comments
Thank you for the detailed bug report. Based on the information provided and the Amazon Bedrock documentation, I can confirm that your implementation appears correct and follows the expected patterns for using the ConverseStream API.
According to the ConverseStream specification, when streaming responses that include tool use, the API should emit events in this order:
messageStart- Contains the rolecontentBlockStart- Marks the start of a content block (including tool use)contentBlockDelta- Contains partial content, including thetoolUsefield with partial input JSONcontentBlockStop- Marks the end of the content blockmessageStop- Contains the stop reasonmetadata- Contains usage and metrics
The contentBlockDelta events should contain partial JSON in the toolUse.input field that, when concatenated together, forms valid JSON. Your observation that the deltas are producing garbled or truncated JSON (like ["{\\n","\":","\""] instead of valid fragments like ["{\\n \\"city", "\\": \\"New York\\"", "\\n}"]) indicates the streaming response is not being properly formatted by the service.
The fact that:
- The non-streaming
ConverseAPI returns correct JSON ({"city":"New York"}) - The same
ConverseStreamcode works correctly with other models (likezai.glm-5) - The
stopReasonis correctly set totool_use - The issue is consistent and reproducible
This strongly suggests a service-side issue specific to the openai.gpt-oss-120b-1:0 model's streaming implementation, rather than a client-side problem.
Since this appears to be a model-specific service issue that emerged recently (around April 13, 2026) without any client code changes, I recommend:
- Opening a support case with AWS to report this as a potential service regression
- Continuing to use your workaround with the non-streaming
ConverseAPI for this specific model - Monitoring for service updates or announcements regarding the
openai.*model family
Your reproduction scripts are excellent and should help AWS engineering teams identify and resolve the issue quickly.
Sources
ConverseStream - Amazon Bedrock
Using the Converse API - Amazon Bedrock
I also faced this issue with converse_stream for toolUse arguments
MODEL_ID = "openai.gpt-oss-120b-1:0"
# MODEL_ID = "us.anthropic.claude-haiku-4-5-20251001-v1:0"
bedrock_config = Config(
region_name=AWS_REGION,
max_pool_connections=100,
retries={"max_attempts": 3, "mode": "standard"},
connect_timeout=3,
read_timeout=60,
tcp_keepalive=True
)
client = boto3.client(
service_name='bedrock-runtime',
region_name=AWS_REGION,
config=bedrock_config,
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
class AwsBedRockLLM:
@classmethod
def make_stream(
cls,
messages,
model,
system_message,
tool_list=None,
instructions=None,
agent_id=None,
call_id=None,
):
system_prompt = instructions if instructions else system_message
payload = {
"modelId": model,
"system": [{"text": system_prompt}] if system_prompt else [],
"messages": cls.convert_messages_for_bedrock(messages),
"inferenceConfig": {
"temperature": 0.5,
"maxTokens": 800,
# "topP": 0.9
},
# "performanceConfig": {"latency": "standard"}
}
# document here: https://docs.aws.amazon.com/bedrock/latest/userguide/inference-parameters.html
if tool_list:
payload["toolConfig"] = {
"tools": tool_list,
"toolChoice": {
"auto": {}
}
}
response = client.converse_stream(**payload)
return response
Hello.
I tested the following code using Boto3, and it seems to be working without any problems.
The issue you encountered is most likely an AWS-side problem, but it could also be an SDK-side issue.
Therefore, please try creating an issue in the following GitHub repository along with contacting AWS support.
https://github.com/aws/aws-sdk-js-v3/issues
import boto3
MODEL_ID = "openai.gpt-oss-120b-1:0"
def main() -> None:
client = boto3.client("bedrock-runtime", region_name="us-east-1")
system = [{"text": "Please answer the question in English."}]
messages = [
{
"role": "user",
"content": [{"text": "Which is cuter, dogs or cats?"}],
}
]
inference_config = {"maxTokens": 1024, "temperature": 1.0, "topP": 1.0}
additional_confg = {"reasoning_effort": "medium"}
response = client.converse_stream(
modelId=MODEL_ID,
system=system,
messages=messages,
inferenceConfig=inference_config,
additionalModelRequestFields=additional_confg,
)
for chunk in response["stream"]:
if "contentBlockDelta" in chunk:
# get reasoningContent and final answer
delta = chunk["contentBlockDelta"]["delta"]
if "text" in delta:
print(delta["text"], end="", flush=True)
if __name__ == "__main__":
main()
Incidentally, when you run it, you will see a response like the following.
python bedrock_test.py
The short answer is: **both can be adorable, and which one you find “cuter” really depends on your personal taste.**
Below is a quick rundown of the typical traits that make dogs and cats endearing to different people. You can use it to decide which side of the cuteness debate resonates with you (or just enjoy both!).
| Feature | Dogs (Why they’re often called “cute”) | Cats (Why they’re often called “cute”) |
|---------|----------------------------------------|----------------------------------------|
| **Facial Expressions** | Big, expressive eyes; wagging tongues; a “puppy‑dog” look that signals friendliness and a desire to please. | Large, almond‑shaped eyes; slow blinks (the “cat kiss”) that signal trust; subtle ear and whisker movements. |
| **Body Language** | Playful bows, tail wags, goofy clumsiness, and the “play‑dead” flop that looks irresistibly helpless. | Graceful stretches, “kneading” paws, and the classic “loaf” pose that’s both sleek and cuddly. |
| **Vocalizations** | Excited barks, whines, and happy panting that can sound like a heartfelt “hey, I’m happy to see you!” | Soft purrs (often a sign of contentment) and gentle chirps when they’re intrigued. |
| **Variety of Sizes & Breeds** | From tiny Chihuahuas with oversized ears to fluffy Newfoundlands that look like giant stuffed toys. | From petite Singapuras that fit in a palm to majestic Maine Coons that seem like mini‑lions. |
| **Social Interaction** | Generally eager to be near you, follow you around, and seek physical contact (petting, hugging, even “lap‑dog” moments). | Often more independent, but when they choose to curl up on your lap, it feels like a special, selective approval. |
| **Playfulness** | High‑energy fetch, zoomies, and goofy “head‑butts” that make them look hilariously enthusiastic. | Light pouncing, laser‑pointer chases, and “pounce‑and‑run” games that showcase their agility and curiosity. |
| **Cuteness Triggers** | Puppy adoptions, big floppy ears, tongue‑out selfies, and “sad dog” eyes when they want a treat. | Kitten videos of tumbling, tiny paws, “binky” moments (when they hop on hind legs), and the classic “sleep‑sprawl.” |
### What People Usually Pick
- **Dog lovers** often cite loyalty, the “always‑happy‑to‑see‑you” vibe, and the opportunity to be an active companion (walking, hiking, etc.) as reasons they find dogs cuter.
- **Cat lovers** often point to the sleek elegance, the soothing purr, and the occasional bursts of playful mischief that feel like a secret shared between the cat and its human.
### A Fun Way to Decide for Yourself
1. **Watch a short video** of a puppy and a kitten side‑by‑side. Notice which one makes you smile, coo, or feel an instant “aww.”
2. **Imagine a day in the life** with each: a dog greeting you at the door with a wagging tail vs. a cat greeting you with a slow blink and a gentle head‑butt. Which scenario feels more heart‑warming?
3. **Consider your lifestyle**: Do you have time for frequent walks and outdoor play (dog‑friendly) or prefer low‑maintenance companionship that enjoys quiet lap‑time (cat‑friendly)?
### Bottom Line
There’s **no objective winner**—the “cuter” animal is the one that captures your heart. Many people love both (think of the classic “dog‑cat duo” in memes!) and find each species adorable in its own way. So whether you’re team **Paw‑fect Pup** or **Purr‑fect Kitty**, the world is richer (and definitely cuter) because we have both.
**If you’re still undecided, try spending a little time with a friendly dog and a mellow cat.** The one that gives you the most warm fuzzies in that moment is probably your personal cuteness champion—at least for today!
Relevant content
- asked 8 months ago

Thank you for testing, but your script doesn't include
toolConfig, it only tests text streaming, which works fine for us too. The bug is specifically about tool input deltas being garbled.Here's a boto3 repro with tool calling:
Output:
converse:{"city": "New York"}converse_stream:'{\n":"\n'Same script with
zai.glm-5: both APIs return valid JSON. Confirmed with 3 SDKs (boto3, JS SDK, Vercel AI SDK) — the corruption is server-side and specific toopenaimodels.