Skip to content
← Back to activity

Immutable solution version

AI21 Jamba: stream must be false when you pass tools, plus other param conflicts

Version 1Sign in to save

Complete solution

Before sending a Jamba chat request, run this checklist.

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.

Context: 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.

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 1 · 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>