7/11/2026, 8:14:09 PM · 15 tests · run 61842902-5e2e-4cc1-b05b-7a06d2f2d11b
Plain streaming generation with a soft length constraint (~100 words).
{ "wordCount": 99, "outputTokens": 133 }
Asserts usage tokens populate and cost computes from the ChatReq contract.
{ "inputTokens": 14, "outputTokens": 9, "reasoningTokens": 0, "costUsd": 0.000068, "paid": true }
Asserts a streaming call captures events that reconstruct into the final text.
{ "mode": "streaming", "streamEventCount": 35, "textBlocks": 1, "textLen": 35 }
Same prompt via stream() and complete() both return valid, matching results.
{ "streamText": "Paris", "completeText": "Paris" }
Asserts the model's reasoning knob behaves as its reasoning-config declares.
{ "class": "toggleable", "mode": "deterministic", "offOutputTokens": 263, "midOutputTokens": 473, "midReasoningTokens": 223 }
Offers a calculator tool and checks the model calls it for an arithmetic question.
{ "toolCalled": true, "toolName": "multiply", "args": { "a": 23, "b": 17 }, "correct": true }
Forces a tool call, feeds the result back, and checks the continuation uses it.
{ "toolName": "multiply", "args": { "a": 23, "b": 17 }, "product": 391, "continuation": "23 multiplied by 17 is 391.", "usesResult": true, "forced": true }
Enables server-side web search and checks invocation counts, the per-request cost surcharge, and provider-executed output blocks.
{ "skipped": "no server-side web search support" }
Reasoning model: continuity token captured on a tool call and replayed so the follow-up succeeds.
{ "signatureType": "openai", "tokenCaptured": false, "reasoned": true, "answered": true, "continuation": "Original balance: **$1,234**\n\nCalculation after 7 years at 5% annual compound growth:\n\n\\[\n1234(1.05)^7 = \\$1,734.15\n\\]\n\nRounded to the neare" }
Repeat a large prefix; assert cache-read tokens are reported and cost drops.
{ "cacheStyle": "implicit", "cacheReadPerAttempt": [ 10173 ], "cacheReadTokens": 10173, "cacheHitCost": 0.0012843000000000002 }
Requests a strict JSON object and checks it parses with the required keys.
{ "parsed": { "name": "Anthropic", "founded": 2021, "headquarters": "San Francisco, California, United States" }, "validJson": true, "missingKeys": [], "bareJson": true }
Summarizes an ~11k-token essay to ~500 words (long input, reasoning minimized).
{ "wordCount": 576, "inputTokens": 10208, "outputTokens": 734, "latencyMs": 5487 }
Tiny maxTokens on a long prompt yields finishReason:"length".
{ "finishReason": "length", "outputTokens": 100 }
Streaming-only models reject complete(); all others accept it.
{ "streamingOnly": false, "completeThrew": false }
A pre-aborted signal rejects the call (abort is threaded + honored).
{ "rejected": true, "errorName": "AbortError" }