@outputai/llm 0.11.1-next.da26845.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/package.json +7 -3
  2. package/src/agent.js +7 -2
  3. package/src/generate.js +1 -0
  4. package/src/index.d.ts +14 -6
  5. package/src/utils/wrap.js +35 -2
  6. package/src/agent.spec.js +0 -595
  7. package/src/ai_provider.spec.js +0 -217
  8. package/src/ai_sdk_options.spec.js +0 -390
  9. package/src/fixtures/image_response_v7_google_vertex.js +0 -72
  10. package/src/fixtures/image_response_v7_openai.js +0 -77
  11. package/src/fixtures/models_api_light.json +0 -675
  12. package/src/fixtures/models_api_v7_subset.json +0 -259
  13. package/src/fixtures/stream_response_v7_anthropic.js +0 -389
  14. package/src/fixtures/stream_response_v7_google_vertex.js +0 -462
  15. package/src/fixtures/stream_response_v7_openai.js +0 -353
  16. package/src/fixtures/stream_response_v7_perplexity.js +0 -671
  17. package/src/fixtures/text_response_v7_anthropic.js +0 -359
  18. package/src/fixtures/text_response_v7_anthropic_cache.js +0 -719
  19. package/src/fixtures/text_response_v7_google_vertex.js +0 -435
  20. package/src/fixtures/text_response_v7_openai.js +0 -347
  21. package/src/fixtures/text_response_v7_perplexity.js +0 -764
  22. package/src/generate.spec.js +0 -525
  23. package/src/prompt/content.spec.js +0 -208
  24. package/src/prompt/interpolations.spec.js +0 -109
  25. package/src/prompt/loader.full.spec.js +0 -309
  26. package/src/prompt/loader.spec.js +0 -258
  27. package/src/prompt/markup/attributes.spec.js +0 -132
  28. package/src/prompt/markup/nodes.spec.js +0 -333
  29. package/src/prompt/markup/tokenizer.spec.js +0 -149
  30. package/src/prompt/markup/tokens.spec.js +0 -250
  31. package/src/prompt/validations.spec.js +0 -812
  32. package/src/utils/cost.full.spec.js +0 -272
  33. package/src/utils/cost.spec.js +0 -290
  34. package/src/utils/error_handler.spec.js +0 -230
  35. package/src/utils/file.spec.js +0 -89
  36. package/src/utils/image.spec.js +0 -20
  37. package/src/utils/legacy_cost_attribute.spec.js +0 -278
  38. package/src/utils/models.spec.js +0 -119
  39. package/src/utils/models_pricing.spec.js +0 -162
  40. package/src/utils/skills.spec.js +0 -168
  41. package/src/utils/sources.spec.js +0 -122
  42. package/src/utils/stream.spec.js +0 -55
  43. package/src/utils/tools.spec.js +0 -167
  44. package/src/utils/usage.full.spec.js +0 -215
  45. package/src/utils/usage.spec.js +0 -246
  46. package/src/utils/wrap.spec.js +0 -467
  47. package/src/validations.spec.js +0 -631
@@ -1,671 +0,0 @@
1
- export default {
2
- callId: 'call-id',
3
- toolsContext: {},
4
- stepNumber: 0,
5
- model: {
6
- provider: 'perplexity',
7
- modelId: 'sonar'
8
- },
9
- runtimeContext: {},
10
- finishReason: 'stop',
11
- rawFinishReason: 'stop',
12
- usage: {
13
- inputTokens: 1025,
14
- inputTokenDetails: {
15
- noCacheTokens: 1025
16
- },
17
- outputTokens: 448,
18
- outputTokenDetails: {
19
- textTokens: 448,
20
- reasoningTokens: 0
21
- },
22
- totalTokens: 1473
23
- },
24
- totalUsage: {
25
- inputTokens: 1025,
26
- inputTokenDetails: {
27
- noCacheTokens: 1025
28
- },
29
- outputTokens: 448,
30
- outputTokenDetails: {
31
- textTokens: 448,
32
- reasoningTokens: 0
33
- },
34
- totalTokens: 1473
35
- },
36
- content: [
37
- {
38
- type: 'source',
39
- sourceType: 'url',
40
- id: 'llaHOaZXzin2oaWy',
41
- url: 'https://en.wikipedia.org/wiki/Carburetor'
42
- },
43
- {
44
- type: 'source',
45
- sourceType: 'url',
46
- id: 'SpA4gAD21my2L5cF',
47
- url: 'https://www.explainthatstuff.com/how-carburetors-work.html'
48
- },
49
- {
50
- type: 'source',
51
- sourceType: 'url',
52
- id: 'ykWhsa6cVZKUdVTT',
53
- url: 'https://www.uti.edu/blog/automotive/carburetors'
54
- },
55
- {
56
- type: 'source',
57
- sourceType: 'url',
58
- id: 'vWuKleLDnapZ7EEd',
59
- url: 'https://www.hagerty.com/resources/car-knowledge/what-is-a-carburetor-and-how-does-it-work'
60
- },
61
- {
62
- type: 'source',
63
- sourceType: 'url',
64
- id: 'A9vfDwvXjTzOwZ6x',
65
- url: 'https://www.autozone.com/diy/fuel-systems/what-is-a-carburetor'
66
- },
67
- {
68
- type: 'source',
69
- sourceType: 'url',
70
- id: 'kPGJkQcrY9sjNvi9',
71
- url: 'https://www.britannica.com/technology/carburetor'
72
- },
73
- {
74
- type: 'source',
75
- sourceType: 'url',
76
- id: 'T5I7M5RJ2nMMFtSl',
77
- url: 'https://www.autoevolution.com/news/carburetors-a-short-history-and-an-explanation-about-how-they-work-84729.html'
78
- },
79
- {
80
- type: 'source',
81
- sourceType: 'url',
82
- id: 'zZThSSqXDW0eZxDe',
83
- url: 'https://www.carparts.com/blog/whats-a-carburetor-how-it-works-common-types-and-diy-diagnostics-quickref/'
84
- },
85
- {
86
- type: 'source',
87
- sourceType: 'url',
88
- id: 'ExKGbqW0DI2Ga3RE',
89
- url: 'https://auto.howstuffworks.com/question377.htm'
90
- },
91
- {
92
- type: 'source',
93
- sourceType: 'url',
94
- id: 'tyFSN5rzN9Tnblma',
95
- url: 'https://www.autozone.com/diy/fuel-systems/what-does-a-carburetor-do'
96
- },
97
- {
98
- type: 'source',
99
- sourceType: 'url',
100
- id: 'xfduKK3qHF8NESgU',
101
- url: 'https://www.merriam-webster.com/dictionary/carburetor'
102
- },
103
- {
104
- type: 'source',
105
- sourceType: 'url',
106
- id: 'KvVGxmgST0KB2hNx',
107
- url: 'https://www.revzilla.com/common-tread/how-does-a-carburetor-work'
108
- },
109
- {
110
- type: 'source',
111
- sourceType: 'url',
112
- id: 'ta8UTfe7qcOo93MY',
113
- url: 'https://www.hagerty.com/media/maintenance-and-tech/understanding-the-carburetor/'
114
- },
115
- {
116
- type: 'source',
117
- sourceType: 'url',
118
- id: 'uDfUmmUM8um7eSML',
119
- url: 'https://www.reddit.com/r/explainlikeimfive/comments/zvizwr/eli5_how_does_a_carburetor_work/'
120
- },
121
- {
122
- type: 'text',
123
- text: 'A **carburetor** is a mechanical device that mixes **air** and **gasoline** in the right proportion so a spark-ignition engine can burn it and make power.[1][6][11] It matters because this air-fuel mixture has to be controlled across different engine conditions like starting, idling, cruising, and acceleration.[8][13]\n\nThe simplest way to think about it is this: a carburetor is a carefully shaped **air tube** that uses airflow to pull fuel into the stream, then meters how much mixture reaches the engine.[2][8] It is a *mechanical* system, so it does this with physical parts rather than electronics.[4]\n\nHow it works, in plain terms:\n\n- Air enters the carburetor and passes through a narrowed section called a **venturi**.[1][6][13]\n- As air speeds up in that narrow spot, pressure drops, which helps draw fuel from a small fuel reservoir or bowl through tiny openings called **jets**.[4][5][13]\n- The fuel is broken into a fine mist, or **atomized**, and mixed with the air.[12][13]\n- A **throttle plate** opens and closes to control how much air-mix goes into the engine when you press the gas pedal.[4][7][13]\n\nA useful example is this: when you press the accelerator in an older car, you are opening the throttle so more air can flow through the carburetor, which also pulls in more fuel and gives the engine more power.[4][7]\n\nCarburetors were the standard fuel-delivery system for most of the 20th century, but many modern engines use **fuel injection** instead because it can control fuel more precisely.[5][14] Carburetors are still important to understand because they are common in older cars, motorcycles, small engines, and classic vehicle restoration.[4][8]\n\nIf you want, I can also explain **the parts of a carburetor** or **how it differs from fuel injection**.'
124
- }
125
- ],
126
- text: 'A **carburetor** is a mechanical device that mixes **air** and **gasoline** in the right proportion so a spark-ignition engine can burn it and make power.[1][6][11] It matters because this air-fuel mixture has to be controlled across different engine conditions like starting, idling, cruising, and acceleration.[8][13]\n\nThe simplest way to think about it is this: a carburetor is a carefully shaped **air tube** that uses airflow to pull fuel into the stream, then meters how much mixture reaches the engine.[2][8] It is a *mechanical* system, so it does this with physical parts rather than electronics.[4]\n\nHow it works, in plain terms:\n\n- Air enters the carburetor and passes through a narrowed section called a **venturi**.[1][6][13]\n- As air speeds up in that narrow spot, pressure drops, which helps draw fuel from a small fuel reservoir or bowl through tiny openings called **jets**.[4][5][13]\n- The fuel is broken into a fine mist, or **atomized**, and mixed with the air.[12][13]\n- A **throttle plate** opens and closes to control how much air-mix goes into the engine when you press the gas pedal.[4][7][13]\n\nA useful example is this: when you press the accelerator in an older car, you are opening the throttle so more air can flow through the carburetor, which also pulls in more fuel and gives the engine more power.[4][7]\n\nCarburetors were the standard fuel-delivery system for most of the 20th century, but many modern engines use **fuel injection** instead because it can control fuel more precisely.[5][14] Carburetors are still important to understand because they are common in older cars, motorcycles, small engines, and classic vehicle restoration.[4][8]\n\nIf you want, I can also explain **the parts of a carburetor** or **how it differs from fuel injection**.',
127
- reasoning: [],
128
- files: [],
129
- sources: [
130
- {
131
- type: 'source',
132
- sourceType: 'url',
133
- id: 'llaHOaZXzin2oaWy',
134
- url: 'https://en.wikipedia.org/wiki/Carburetor'
135
- },
136
- {
137
- type: 'source',
138
- sourceType: 'url',
139
- id: 'SpA4gAD21my2L5cF',
140
- url: 'https://www.explainthatstuff.com/how-carburetors-work.html'
141
- },
142
- {
143
- type: 'source',
144
- sourceType: 'url',
145
- id: 'ykWhsa6cVZKUdVTT',
146
- url: 'https://www.uti.edu/blog/automotive/carburetors'
147
- },
148
- {
149
- type: 'source',
150
- sourceType: 'url',
151
- id: 'vWuKleLDnapZ7EEd',
152
- url: 'https://www.hagerty.com/resources/car-knowledge/what-is-a-carburetor-and-how-does-it-work'
153
- },
154
- {
155
- type: 'source',
156
- sourceType: 'url',
157
- id: 'A9vfDwvXjTzOwZ6x',
158
- url: 'https://www.autozone.com/diy/fuel-systems/what-is-a-carburetor'
159
- },
160
- {
161
- type: 'source',
162
- sourceType: 'url',
163
- id: 'kPGJkQcrY9sjNvi9',
164
- url: 'https://www.britannica.com/technology/carburetor'
165
- },
166
- {
167
- type: 'source',
168
- sourceType: 'url',
169
- id: 'T5I7M5RJ2nMMFtSl',
170
- url: 'https://www.autoevolution.com/news/carburetors-a-short-history-and-an-explanation-about-how-they-work-84729.html'
171
- },
172
- {
173
- type: 'source',
174
- sourceType: 'url',
175
- id: 'zZThSSqXDW0eZxDe',
176
- url: 'https://www.carparts.com/blog/whats-a-carburetor-how-it-works-common-types-and-diy-diagnostics-quickref/'
177
- },
178
- {
179
- type: 'source',
180
- sourceType: 'url',
181
- id: 'ExKGbqW0DI2Ga3RE',
182
- url: 'https://auto.howstuffworks.com/question377.htm'
183
- },
184
- {
185
- type: 'source',
186
- sourceType: 'url',
187
- id: 'tyFSN5rzN9Tnblma',
188
- url: 'https://www.autozone.com/diy/fuel-systems/what-does-a-carburetor-do'
189
- },
190
- {
191
- type: 'source',
192
- sourceType: 'url',
193
- id: 'xfduKK3qHF8NESgU',
194
- url: 'https://www.merriam-webster.com/dictionary/carburetor'
195
- },
196
- {
197
- type: 'source',
198
- sourceType: 'url',
199
- id: 'KvVGxmgST0KB2hNx',
200
- url: 'https://www.revzilla.com/common-tread/how-does-a-carburetor-work'
201
- },
202
- {
203
- type: 'source',
204
- sourceType: 'url',
205
- id: 'ta8UTfe7qcOo93MY',
206
- url: 'https://www.hagerty.com/media/maintenance-and-tech/understanding-the-carburetor/'
207
- },
208
- {
209
- type: 'source',
210
- sourceType: 'url',
211
- id: 'uDfUmmUM8um7eSML',
212
- url: 'https://www.reddit.com/r/explainlikeimfive/comments/zvizwr/eli5_how_does_a_carburetor_work/'
213
- }
214
- ],
215
- toolCalls: [],
216
- staticToolCalls: [],
217
- dynamicToolCalls: [],
218
- toolResults: [],
219
- staticToolResults: [],
220
- dynamicToolResults: [],
221
- responseMessages: [
222
- {
223
- role: 'assistant',
224
- content: [
225
- {
226
- type: 'text',
227
- text: 'A **carburetor** is a mechanical device that mixes **air** and **gasoline** in the right proportion so a spark-ignition engine can burn it and make power.[1][6][11] It matters because this air-fuel mixture has to be controlled across different engine conditions like starting, idling, cruising, and acceleration.[8][13]\n\nThe simplest way to think about it is this: a carburetor is a carefully shaped **air tube** that uses airflow to pull fuel into the stream, then meters how much mixture reaches the engine.[2][8] It is a *mechanical* system, so it does this with physical parts rather than electronics.[4]\n\nHow it works, in plain terms:\n\n- Air enters the carburetor and passes through a narrowed section called a **venturi**.[1][6][13]\n- As air speeds up in that narrow spot, pressure drops, which helps draw fuel from a small fuel reservoir or bowl through tiny openings called **jets**.[4][5][13]\n- The fuel is broken into a fine mist, or **atomized**, and mixed with the air.[12][13]\n- A **throttle plate** opens and closes to control how much air-mix goes into the engine when you press the gas pedal.[4][7][13]\n\nA useful example is this: when you press the accelerator in an older car, you are opening the throttle so more air can flow through the carburetor, which also pulls in more fuel and gives the engine more power.[4][7]\n\nCarburetors were the standard fuel-delivery system for most of the 20th century, but many modern engines use **fuel injection** instead because it can control fuel more precisely.[5][14] Carburetors are still important to understand because they are common in older cars, motorcycles, small engines, and classic vehicle restoration.[4][8]\n\nIf you want, I can also explain **the parts of a carburetor** or **how it differs from fuel injection**.'
228
- }
229
- ]
230
- }
231
- ],
232
- warnings: [],
233
- request: {},
234
- response: {
235
- id: 'res-id',
236
- timestamp: '2026-08-25T00:00:00.000Z',
237
- modelId: 'sonar',
238
- headers: {
239
- 'cache-control': 'no-cache',
240
- 'cf-cache-status': 'DYNAMIC',
241
- 'cf-ray': 'cf-id',
242
- connection: 'keep-alive',
243
- 'content-type': 'text/event-stream',
244
- date: 'Tue, 25 Aug 2026 00:00:00 GMT',
245
- server: 'cloudflare',
246
- 'set-cookie': '__cflb=token; HttpOnly; SameSite=None; Secure; Path=/; Expires=Tue, 25 Aug 2026 00:00:00 GMT',
247
- 'strict-transport-security': 'max-age=15552000; includeSubDomains; preload',
248
- 'transfer-encoding': 'chunked',
249
- 'x-ratelimit-limit': '67',
250
- 'x-ratelimit-remaining': '66',
251
- 'x-ratelimit-reset': '1787656970',
252
- 'x-ratelimit-used': '1',
253
- 'x-request-id': 'req-id'
254
- },
255
- messages: [
256
- {
257
- role: 'assistant',
258
- content: [
259
- {
260
- type: 'text',
261
- text: 'A **carburetor** is a mechanical device that mixes **air** and **gasoline** in the right proportion so a spark-ignition engine can burn it and make power.[1][6][11] It matters because this air-fuel mixture has to be controlled across different engine conditions like starting, idling, cruising, and acceleration.[8][13]\n\nThe simplest way to think about it is this: a carburetor is a carefully shaped **air tube** that uses airflow to pull fuel into the stream, then meters how much mixture reaches the engine.[2][8] It is a *mechanical* system, so it does this with physical parts rather than electronics.[4]\n\nHow it works, in plain terms:\n\n- Air enters the carburetor and passes through a narrowed section called a **venturi**.[1][6][13]\n- As air speeds up in that narrow spot, pressure drops, which helps draw fuel from a small fuel reservoir or bowl through tiny openings called **jets**.[4][5][13]\n- The fuel is broken into a fine mist, or **atomized**, and mixed with the air.[12][13]\n- A **throttle plate** opens and closes to control how much air-mix goes into the engine when you press the gas pedal.[4][7][13]\n\nA useful example is this: when you press the accelerator in an older car, you are opening the throttle so more air can flow through the carburetor, which also pulls in more fuel and gives the engine more power.[4][7]\n\nCarburetors were the standard fuel-delivery system for most of the 20th century, but many modern engines use **fuel injection** instead because it can control fuel more precisely.[5][14] Carburetors are still important to understand because they are common in older cars, motorcycles, small engines, and classic vehicle restoration.[4][8]\n\nIf you want, I can also explain **the parts of a carburetor** or **how it differs from fuel injection**.'
262
- }
263
- ]
264
- }
265
- ]
266
- },
267
- providerMetadata: {
268
- perplexity: {
269
- usage: {
270
- citationTokens: null,
271
- numSearchQueries: null
272
- },
273
- cost: {
274
- inputTokensCost: 0.00103,
275
- outputTokensCost: 0.00045,
276
- requestCost: 0.005,
277
- totalCost: 0.00647
278
- },
279
- images: null
280
- }
281
- },
282
- steps: [
283
- {
284
- callId: 'call-id',
285
- stepNumber: 0,
286
- model: {
287
- provider: 'perplexity',
288
- modelId: 'sonar'
289
- },
290
- runtimeContext: {},
291
- toolsContext: {},
292
- content: [
293
- {
294
- type: 'source',
295
- sourceType: 'url',
296
- id: 'llaHOaZXzin2oaWy',
297
- url: 'https://en.wikipedia.org/wiki/Carburetor'
298
- },
299
- {
300
- type: 'source',
301
- sourceType: 'url',
302
- id: 'SpA4gAD21my2L5cF',
303
- url: 'https://www.explainthatstuff.com/how-carburetors-work.html'
304
- },
305
- {
306
- type: 'source',
307
- sourceType: 'url',
308
- id: 'ykWhsa6cVZKUdVTT',
309
- url: 'https://www.uti.edu/blog/automotive/carburetors'
310
- },
311
- {
312
- type: 'source',
313
- sourceType: 'url',
314
- id: 'vWuKleLDnapZ7EEd',
315
- url: 'https://www.hagerty.com/resources/car-knowledge/what-is-a-carburetor-and-how-does-it-work'
316
- },
317
- {
318
- type: 'source',
319
- sourceType: 'url',
320
- id: 'A9vfDwvXjTzOwZ6x',
321
- url: 'https://www.autozone.com/diy/fuel-systems/what-is-a-carburetor'
322
- },
323
- {
324
- type: 'source',
325
- sourceType: 'url',
326
- id: 'kPGJkQcrY9sjNvi9',
327
- url: 'https://www.britannica.com/technology/carburetor'
328
- },
329
- {
330
- type: 'source',
331
- sourceType: 'url',
332
- id: 'T5I7M5RJ2nMMFtSl',
333
- url: 'https://www.autoevolution.com/news/carburetors-a-short-history-and-an-explanation-about-how-they-work-84729.html'
334
- },
335
- {
336
- type: 'source',
337
- sourceType: 'url',
338
- id: 'zZThSSqXDW0eZxDe',
339
- url: 'https://www.carparts.com/blog/whats-a-carburetor-how-it-works-common-types-and-diy-diagnostics-quickref/'
340
- },
341
- {
342
- type: 'source',
343
- sourceType: 'url',
344
- id: 'ExKGbqW0DI2Ga3RE',
345
- url: 'https://auto.howstuffworks.com/question377.htm'
346
- },
347
- {
348
- type: 'source',
349
- sourceType: 'url',
350
- id: 'tyFSN5rzN9Tnblma',
351
- url: 'https://www.autozone.com/diy/fuel-systems/what-does-a-carburetor-do'
352
- },
353
- {
354
- type: 'source',
355
- sourceType: 'url',
356
- id: 'xfduKK3qHF8NESgU',
357
- url: 'https://www.merriam-webster.com/dictionary/carburetor'
358
- },
359
- {
360
- type: 'source',
361
- sourceType: 'url',
362
- id: 'KvVGxmgST0KB2hNx',
363
- url: 'https://www.revzilla.com/common-tread/how-does-a-carburetor-work'
364
- },
365
- {
366
- type: 'source',
367
- sourceType: 'url',
368
- id: 'ta8UTfe7qcOo93MY',
369
- url: 'https://www.hagerty.com/media/maintenance-and-tech/understanding-the-carburetor/'
370
- },
371
- {
372
- type: 'source',
373
- sourceType: 'url',
374
- id: 'uDfUmmUM8um7eSML',
375
- url: 'https://www.reddit.com/r/explainlikeimfive/comments/zvizwr/eli5_how_does_a_carburetor_work/'
376
- },
377
- {
378
- type: 'text',
379
- text: 'A **carburetor** is a mechanical device that mixes **air** and **gasoline** in the right proportion so a spark-ignition engine can burn it and make power.[1][6][11] It matters because this air-fuel mixture has to be controlled across different engine conditions like starting, idling, cruising, and acceleration.[8][13]\n\nThe simplest way to think about it is this: a carburetor is a carefully shaped **air tube** that uses airflow to pull fuel into the stream, then meters how much mixture reaches the engine.[2][8] It is a *mechanical* system, so it does this with physical parts rather than electronics.[4]\n\nHow it works, in plain terms:\n\n- Air enters the carburetor and passes through a narrowed section called a **venturi**.[1][6][13]\n- As air speeds up in that narrow spot, pressure drops, which helps draw fuel from a small fuel reservoir or bowl through tiny openings called **jets**.[4][5][13]\n- The fuel is broken into a fine mist, or **atomized**, and mixed with the air.[12][13]\n- A **throttle plate** opens and closes to control how much air-mix goes into the engine when you press the gas pedal.[4][7][13]\n\nA useful example is this: when you press the accelerator in an older car, you are opening the throttle so more air can flow through the carburetor, which also pulls in more fuel and gives the engine more power.[4][7]\n\nCarburetors were the standard fuel-delivery system for most of the 20th century, but many modern engines use **fuel injection** instead because it can control fuel more precisely.[5][14] Carburetors are still important to understand because they are common in older cars, motorcycles, small engines, and classic vehicle restoration.[4][8]\n\nIf you want, I can also explain **the parts of a carburetor** or **how it differs from fuel injection**.'
380
- }
381
- ],
382
- finishReason: 'stop',
383
- rawFinishReason: 'stop',
384
- usage: {
385
- inputTokens: 1025,
386
- inputTokenDetails: {
387
- noCacheTokens: 1025
388
- },
389
- outputTokens: 448,
390
- outputTokenDetails: {
391
- textTokens: 448,
392
- reasoningTokens: 0
393
- },
394
- totalTokens: 1473,
395
- raw: {
396
- prompt_tokens: 1025,
397
- completion_tokens: 448,
398
- total_tokens: 1473,
399
- cost: {
400
- input_tokens_cost: 0.00103,
401
- output_tokens_cost: 0.00045,
402
- request_cost: 0.005,
403
- total_cost: 0.00647
404
- }
405
- }
406
- },
407
- performance: {
408
- stepTimeMs: 6419.195962000001,
409
- toolExecutionMs: {},
410
- responseTimeMs: 6417.619837,
411
- effectiveOutputTokensPerSecond: 69.80781214510571,
412
- outputTokensPerSecond: 81.15589907947513,
413
- inputTokensPerSecond: 1142.213575632024,
414
- effectiveTotalTokensPerSecond: 229.52434662888555,
415
- timeToFirstOutputMs: 897.380334,
416
- timeBetweenOutputChunksMs: {
417
- min: 0.03650000000016007,
418
- p10: 0.0782920000001468,
419
- median: 0.3643339999998716,
420
- avg: 13.929768734848484,
421
- p90: 93.51433300000099,
422
- max: 169.21358299999974
423
- }
424
- },
425
- warnings: [],
426
- request: {},
427
- response: {
428
- id: 'res-id',
429
- timestamp: '2026-08-25T00:00:00.000Z',
430
- modelId: 'sonar',
431
- headers: {
432
- 'cache-control': 'no-cache',
433
- 'cf-cache-status': 'DYNAMIC',
434
- 'cf-ray': 'cf-id',
435
- connection: 'keep-alive',
436
- 'content-type': 'text/event-stream',
437
- date: 'Tue, 25 Aug 2026 00:00:00 GMT',
438
- server: 'cloudflare',
439
- 'set-cookie': '__cflb=token; HttpOnly; SameSite=None; Secure; Path=/; Expires=Tue, 25 Aug 2026 00:00:00 GMT',
440
- 'strict-transport-security': 'max-age=15552000; includeSubDomains; preload',
441
- 'transfer-encoding': 'chunked',
442
- 'x-ratelimit-limit': '67',
443
- 'x-ratelimit-remaining': '66',
444
- 'x-ratelimit-reset': '1787656970',
445
- 'x-ratelimit-used': '1',
446
- 'x-request-id': 'req-id'
447
- },
448
- messages: [
449
- {
450
- role: 'assistant',
451
- content: [
452
- {
453
- type: 'text',
454
- text: 'A **carburetor** is a mechanical device that mixes **air** and **gasoline** in the right proportion so a spark-ignition engine can burn it and make power.[1][6][11] It matters because this air-fuel mixture has to be controlled across different engine conditions like starting, idling, cruising, and acceleration.[8][13]\n\nThe simplest way to think about it is this: a carburetor is a carefully shaped **air tube** that uses airflow to pull fuel into the stream, then meters how much mixture reaches the engine.[2][8] It is a *mechanical* system, so it does this with physical parts rather than electronics.[4]\n\nHow it works, in plain terms:\n\n- Air enters the carburetor and passes through a narrowed section called a **venturi**.[1][6][13]\n- As air speeds up in that narrow spot, pressure drops, which helps draw fuel from a small fuel reservoir or bowl through tiny openings called **jets**.[4][5][13]\n- The fuel is broken into a fine mist, or **atomized**, and mixed with the air.[12][13]\n- A **throttle plate** opens and closes to control how much air-mix goes into the engine when you press the gas pedal.[4][7][13]\n\nA useful example is this: when you press the accelerator in an older car, you are opening the throttle so more air can flow through the carburetor, which also pulls in more fuel and gives the engine more power.[4][7]\n\nCarburetors were the standard fuel-delivery system for most of the 20th century, but many modern engines use **fuel injection** instead because it can control fuel more precisely.[5][14] Carburetors are still important to understand because they are common in older cars, motorcycles, small engines, and classic vehicle restoration.[4][8]\n\nIf you want, I can also explain **the parts of a carburetor** or **how it differs from fuel injection**.'
455
- }
456
- ]
457
- }
458
- ]
459
- },
460
- providerMetadata: {
461
- perplexity: {
462
- usage: {
463
- citationTokens: null,
464
- numSearchQueries: null
465
- },
466
- cost: {
467
- inputTokensCost: 0.00103,
468
- outputTokensCost: 0.00045,
469
- requestCost: 0.005,
470
- totalCost: 0.00647
471
- },
472
- images: null
473
- }
474
- }
475
- }
476
- ],
477
- finalStep: {
478
- callId: 'call-id',
479
- stepNumber: 0,
480
- model: {
481
- provider: 'perplexity',
482
- modelId: 'sonar'
483
- },
484
- runtimeContext: {},
485
- toolsContext: {},
486
- content: [
487
- {
488
- type: 'source',
489
- sourceType: 'url',
490
- id: 'llaHOaZXzin2oaWy',
491
- url: 'https://en.wikipedia.org/wiki/Carburetor'
492
- },
493
- {
494
- type: 'source',
495
- sourceType: 'url',
496
- id: 'SpA4gAD21my2L5cF',
497
- url: 'https://www.explainthatstuff.com/how-carburetors-work.html'
498
- },
499
- {
500
- type: 'source',
501
- sourceType: 'url',
502
- id: 'ykWhsa6cVZKUdVTT',
503
- url: 'https://www.uti.edu/blog/automotive/carburetors'
504
- },
505
- {
506
- type: 'source',
507
- sourceType: 'url',
508
- id: 'vWuKleLDnapZ7EEd',
509
- url: 'https://www.hagerty.com/resources/car-knowledge/what-is-a-carburetor-and-how-does-it-work'
510
- },
511
- {
512
- type: 'source',
513
- sourceType: 'url',
514
- id: 'A9vfDwvXjTzOwZ6x',
515
- url: 'https://www.autozone.com/diy/fuel-systems/what-is-a-carburetor'
516
- },
517
- {
518
- type: 'source',
519
- sourceType: 'url',
520
- id: 'kPGJkQcrY9sjNvi9',
521
- url: 'https://www.britannica.com/technology/carburetor'
522
- },
523
- {
524
- type: 'source',
525
- sourceType: 'url',
526
- id: 'T5I7M5RJ2nMMFtSl',
527
- url: 'https://www.autoevolution.com/news/carburetors-a-short-history-and-an-explanation-about-how-they-work-84729.html'
528
- },
529
- {
530
- type: 'source',
531
- sourceType: 'url',
532
- id: 'zZThSSqXDW0eZxDe',
533
- url: 'https://www.carparts.com/blog/whats-a-carburetor-how-it-works-common-types-and-diy-diagnostics-quickref/'
534
- },
535
- {
536
- type: 'source',
537
- sourceType: 'url',
538
- id: 'ExKGbqW0DI2Ga3RE',
539
- url: 'https://auto.howstuffworks.com/question377.htm'
540
- },
541
- {
542
- type: 'source',
543
- sourceType: 'url',
544
- id: 'tyFSN5rzN9Tnblma',
545
- url: 'https://www.autozone.com/diy/fuel-systems/what-does-a-carburetor-do'
546
- },
547
- {
548
- type: 'source',
549
- sourceType: 'url',
550
- id: 'xfduKK3qHF8NESgU',
551
- url: 'https://www.merriam-webster.com/dictionary/carburetor'
552
- },
553
- {
554
- type: 'source',
555
- sourceType: 'url',
556
- id: 'KvVGxmgST0KB2hNx',
557
- url: 'https://www.revzilla.com/common-tread/how-does-a-carburetor-work'
558
- },
559
- {
560
- type: 'source',
561
- sourceType: 'url',
562
- id: 'ta8UTfe7qcOo93MY',
563
- url: 'https://www.hagerty.com/media/maintenance-and-tech/understanding-the-carburetor/'
564
- },
565
- {
566
- type: 'source',
567
- sourceType: 'url',
568
- id: 'uDfUmmUM8um7eSML',
569
- url: 'https://www.reddit.com/r/explainlikeimfive/comments/zvizwr/eli5_how_does_a_carburetor_work/'
570
- },
571
- {
572
- type: 'text',
573
- text: 'A **carburetor** is a mechanical device that mixes **air** and **gasoline** in the right proportion so a spark-ignition engine can burn it and make power.[1][6][11] It matters because this air-fuel mixture has to be controlled across different engine conditions like starting, idling, cruising, and acceleration.[8][13]\n\nThe simplest way to think about it is this: a carburetor is a carefully shaped **air tube** that uses airflow to pull fuel into the stream, then meters how much mixture reaches the engine.[2][8] It is a *mechanical* system, so it does this with physical parts rather than electronics.[4]\n\nHow it works, in plain terms:\n\n- Air enters the carburetor and passes through a narrowed section called a **venturi**.[1][6][13]\n- As air speeds up in that narrow spot, pressure drops, which helps draw fuel from a small fuel reservoir or bowl through tiny openings called **jets**.[4][5][13]\n- The fuel is broken into a fine mist, or **atomized**, and mixed with the air.[12][13]\n- A **throttle plate** opens and closes to control how much air-mix goes into the engine when you press the gas pedal.[4][7][13]\n\nA useful example is this: when you press the accelerator in an older car, you are opening the throttle so more air can flow through the carburetor, which also pulls in more fuel and gives the engine more power.[4][7]\n\nCarburetors were the standard fuel-delivery system for most of the 20th century, but many modern engines use **fuel injection** instead because it can control fuel more precisely.[5][14] Carburetors are still important to understand because they are common in older cars, motorcycles, small engines, and classic vehicle restoration.[4][8]\n\nIf you want, I can also explain **the parts of a carburetor** or **how it differs from fuel injection**.'
574
- }
575
- ],
576
- finishReason: 'stop',
577
- rawFinishReason: 'stop',
578
- usage: {
579
- inputTokens: 1025,
580
- inputTokenDetails: {
581
- noCacheTokens: 1025
582
- },
583
- outputTokens: 448,
584
- outputTokenDetails: {
585
- textTokens: 448,
586
- reasoningTokens: 0
587
- },
588
- totalTokens: 1473,
589
- raw: {
590
- prompt_tokens: 1025,
591
- completion_tokens: 448,
592
- total_tokens: 1473,
593
- cost: {
594
- input_tokens_cost: 0.00103,
595
- output_tokens_cost: 0.00045,
596
- request_cost: 0.005,
597
- total_cost: 0.00647
598
- }
599
- }
600
- },
601
- performance: {
602
- stepTimeMs: 6419.195962000001,
603
- toolExecutionMs: {},
604
- responseTimeMs: 6417.619837,
605
- effectiveOutputTokensPerSecond: 69.80781214510571,
606
- outputTokensPerSecond: 81.15589907947513,
607
- inputTokensPerSecond: 1142.213575632024,
608
- effectiveTotalTokensPerSecond: 229.52434662888555,
609
- timeToFirstOutputMs: 897.380334,
610
- timeBetweenOutputChunksMs: {
611
- min: 0.03650000000016007,
612
- p10: 0.0782920000001468,
613
- median: 0.3643339999998716,
614
- avg: 13.929768734848484,
615
- p90: 93.51433300000099,
616
- max: 169.21358299999974
617
- }
618
- },
619
- warnings: [],
620
- request: {},
621
- response: {
622
- id: 'res-id',
623
- timestamp: '2026-08-25T00:00:00.000Z',
624
- modelId: 'sonar',
625
- headers: {
626
- 'cache-control': 'no-cache',
627
- 'cf-cache-status': 'DYNAMIC',
628
- 'cf-ray': 'cf-id',
629
- connection: 'keep-alive',
630
- 'content-type': 'text/event-stream',
631
- date: 'Tue, 25 Aug 2026 00:00:00 GMT',
632
- server: 'cloudflare',
633
- 'set-cookie': '__cflb=token; HttpOnly; SameSite=None; Secure; Path=/; Expires=Tue, 25 Aug 2026 00:00:00 GMT',
634
- 'strict-transport-security': 'max-age=15552000; includeSubDomains; preload',
635
- 'transfer-encoding': 'chunked',
636
- 'x-ratelimit-limit': '67',
637
- 'x-ratelimit-remaining': '66',
638
- 'x-ratelimit-reset': '1787656970',
639
- 'x-ratelimit-used': '1',
640
- 'x-request-id': 'req-id'
641
- },
642
- messages: [
643
- {
644
- role: 'assistant',
645
- content: [
646
- {
647
- type: 'text',
648
- text: 'A **carburetor** is a mechanical device that mixes **air** and **gasoline** in the right proportion so a spark-ignition engine can burn it and make power.[1][6][11] It matters because this air-fuel mixture has to be controlled across different engine conditions like starting, idling, cruising, and acceleration.[8][13]\n\nThe simplest way to think about it is this: a carburetor is a carefully shaped **air tube** that uses airflow to pull fuel into the stream, then meters how much mixture reaches the engine.[2][8] It is a *mechanical* system, so it does this with physical parts rather than electronics.[4]\n\nHow it works, in plain terms:\n\n- Air enters the carburetor and passes through a narrowed section called a **venturi**.[1][6][13]\n- As air speeds up in that narrow spot, pressure drops, which helps draw fuel from a small fuel reservoir or bowl through tiny openings called **jets**.[4][5][13]\n- The fuel is broken into a fine mist, or **atomized**, and mixed with the air.[12][13]\n- A **throttle plate** opens and closes to control how much air-mix goes into the engine when you press the gas pedal.[4][7][13]\n\nA useful example is this: when you press the accelerator in an older car, you are opening the throttle so more air can flow through the carburetor, which also pulls in more fuel and gives the engine more power.[4][7]\n\nCarburetors were the standard fuel-delivery system for most of the 20th century, but many modern engines use **fuel injection** instead because it can control fuel more precisely.[5][14] Carburetors are still important to understand because they are common in older cars, motorcycles, small engines, and classic vehicle restoration.[4][8]\n\nIf you want, I can also explain **the parts of a carburetor** or **how it differs from fuel injection**.'
649
- }
650
- ]
651
- }
652
- ]
653
- },
654
- providerMetadata: {
655
- perplexity: {
656
- usage: {
657
- citationTokens: null,
658
- numSearchQueries: null
659
- },
660
- cost: {
661
- inputTokensCost: 0.00103,
662
- outputTokensCost: 0.00045,
663
- requestCost: 0.005,
664
- totalCost: 0.00647
665
- },
666
- images: null
667
- }
668
- }
669
- },
670
- output: 'A **carburetor** is a mechanical device that mixes **air** and **gasoline** in the right proportion so a spark-ignition engine can burn it and make power.[1][6][11] It matters because this air-fuel mixture has to be controlled across different engine conditions like starting, idling, cruising, and acceleration.[8][13]\n\nThe simplest way to think about it is this: a carburetor is a carefully shaped **air tube** that uses airflow to pull fuel into the stream, then meters how much mixture reaches the engine.[2][8] It is a *mechanical* system, so it does this with physical parts rather than electronics.[4]\n\nHow it works, in plain terms:\n\n- Air enters the carburetor and passes through a narrowed section called a **venturi**.[1][6][13]\n- As air speeds up in that narrow spot, pressure drops, which helps draw fuel from a small fuel reservoir or bowl through tiny openings called **jets**.[4][5][13]\n- The fuel is broken into a fine mist, or **atomized**, and mixed with the air.[12][13]\n- A **throttle plate** opens and closes to control how much air-mix goes into the engine when you press the gas pedal.[4][7][13]\n\nA useful example is this: when you press the accelerator in an older car, you are opening the throttle so more air can flow through the carburetor, which also pulls in more fuel and gives the engine more power.[4][7]\n\nCarburetors were the standard fuel-delivery system for most of the 20th century, but many modern engines use **fuel injection** instead because it can control fuel more precisely.[5][14] Carburetors are still important to understand because they are common in older cars, motorcycles, small engines, and classic vehicle restoration.[4][8]\n\nIf you want, I can also explain **the parts of a carburetor** or **how it differs from fuel injection**.'
671
- };