Solution skill
AI21 Jamba: stream must be false when you pass tools, plus other param conflicts
Complete solution
Shows how to fix aI21 Jamba: stream must be false when you pass tools, plus other param conflicts. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Before sending a Jamba chat request, run this checklist. If you set tools, set stream to false.
Steps
- Before sending a Jamba chat request, run this checklist. If you set tools, set stream to false. If you set stream to true, keep n at 1. If you need n above 1, use a temperature above 0. When parsing a stream, expect the first message to hold just the role and read usage stats only from the final message, since usage is null on every earlier chunk.
When to use
You are seeing this: When parsing a stream, expect the first message to hold just the role and read usage stats only from the final message, since usage is null on every earlier chunk. Use this skill when you run into "AI21 Jamba: stream must be false when you pass tools, plus other param conflicts".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Official docs (Jamba 1.5 API reference): documents parameter conflicts that fail at request time. stream must be false when the tools parameter is set, you cannot stream a tool-calling request. n must be 1 when stream is true. And n above 1 combined with temperature=0 fails, since identical answers are guaranteed duplicates. The docs also note the first streamed message carries only the assistant role, with content tokens arriving in later messages.
Verified resolution: Before sending a Jamba chat request, run this checklist. If you set tools, set stream to false. If you set stream to true, keep n at 1. If you need n above 1, use a temperature above 0. When parsing a stream, expect the first message to hold just the role and read usage stats only from the final message, since usage is null on every earlier chunk.
Source URL: https://docs.ai21.com/reference/jamba-15-api-ref
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_3LRkooHvnWNFD1OrpFPUVw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">AI21 Jamba: stream must be false when you pass tools, plus other param conflicts <span>— Vectle</span></a>