@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,462 +0,0 @@
1
- export default {
2
- callId: 'call-id',
3
- toolsContext: {},
4
- stepNumber: 0,
5
- model: {
6
- provider: 'google.vertex.chat',
7
- modelId: 'gemini-2.5-flash'
8
- },
9
- runtimeContext: {},
10
- finishReason: 'stop',
11
- rawFinishReason: 'STOP',
12
- usage: {
13
- inputTokens: 1032,
14
- inputTokenDetails: {
15
- noCacheTokens: 1032,
16
- cacheReadTokens: 0
17
- },
18
- outputTokens: 1347,
19
- outputTokenDetails: {
20
- textTokens: 858,
21
- reasoningTokens: 489
22
- },
23
- totalTokens: 2379
24
- },
25
- totalUsage: {
26
- inputTokens: 1032,
27
- inputTokenDetails: {
28
- noCacheTokens: 1032,
29
- cacheReadTokens: 0
30
- },
31
- outputTokens: 1347,
32
- outputTokenDetails: {
33
- textTokens: 858,
34
- reasoningTokens: 489
35
- },
36
- totalTokens: 2379
37
- },
38
- content: [
39
- {
40
- type: 'text',
41
- text: 'A carburetor is a mechanical device that mixes air and fuel in the correct proportions before they enter an internal combustion engine, allowing the engine to run. It matters because it was, for many decades, the primary way gasoline engines received their fuel mixture, and it\'s still found in many smaller engines today.\n\nImagine you\'re drinking through a straw. When you suck on the straw, you create an area of lower pressure inside it, and the higher pressure outside pushes the liquid up the straw into your mouth. A carburetor works on a similar principle, but instead of you sucking, the engine\'s pistons moving down create suction, and instead of liquid coming up a straw, fuel is drawn into a stream of air.\n\nHere\'s a slightly more detailed mental model: think of a carburetor as a specialized pipe with a narrow waist. Air gets pulled through this pipe by the engine. As the air speeds up through the narrow waist, it creates a drop in pressure. This low-pressure area then sucks fuel from a small reservoir, mixing it with the incoming air.\n\nLet\'s break down the main parts and how they work together:\n\n1. **Air Intake:** Air from outside the engine is drawn into the carburetor.\n2. **Venturi:** This is the narrow waist in the carburetor\'s main passage. As air rushes through this constricted area, its speed increases, and its pressure drops. This phenomenon is called the **Venturi effect**.\n3. **Fuel Jet:** Located in the low-pressure area of the Venturi, this is a small opening connected to a fuel supply. The reduced air pressure in the Venturi draws fuel out of the jet and into the airflow, turning it into a fine mist.\n4. **Float Bowl:** This small tank, usually located at the bottom of the carburetor, holds a constant supply of fuel. A **float** (like the one in a toilet tank) and a needle valve maintain the fuel level, ensuring there\'s always enough fuel ready to be drawn into the Venturi.\n5. **Throttle Valve:** This is a movable plate, often butterfly-shaped, located after the Venturi. You control it with the accelerator pedal (or hand throttle on a lawnmower). When you open the throttle, more air and fuel mixture can enter the engine, making it run faster. When you close it, less mixture enters, and the engine slows down.\n6. **Choke Valve:** This is another plate, usually located at the air intake before the Venturi. When the engine is cold, gasoline doesn\'t vaporize easily. Closing the choke restricts airflow, making the air-fuel mixture much richer (more fuel, less air). This helps the cold engine start and run until it warms up. Once warm, you open the choke to prevent the engine from running too rich and wasting fuel.\n\n**A concrete example:**\nImagine an old aerosol spray can, like for paint. When you press the button, you create a low-pressure area, and the paint (fuel) is drawn up and mixed with the propellant (air) into a fine spray. A carburetor does something similar, but it\'s the engine\'s suction that pulls the air, and the shape of the Venturi that creates the low pressure to draw in the fuel.\n\nWhile carburetors are ingenious devices, they have largely been replaced in modern cars by **fuel injection systems**. Fuel injection offers more precise control over the air-fuel mixture, leading to better fuel efficiency, lower emissions, and more consistent engine performance across different conditions. However, you\'ll still find carburetors in many small engines like those in lawnmowers, chainsaws, and some motorcycles, where their simplicity and lower cost are advantageous.\n\nWhat we haven\'t covered here are the many variations of carburetors (e.g., downdraft, sidedraft, updraft), or the complex internal passages and circuits that provide fuel for different engine speeds and loads beyond the basic Venturi effect. If you\'re interested in learning more, exploring how these different circuits (like idle circuits or power valves) work would be a great next step.'
42
- }
43
- ],
44
- text: 'A carburetor is a mechanical device that mixes air and fuel in the correct proportions before they enter an internal combustion engine, allowing the engine to run. It matters because it was, for many decades, the primary way gasoline engines received their fuel mixture, and it\'s still found in many smaller engines today.\n\nImagine you\'re drinking through a straw. When you suck on the straw, you create an area of lower pressure inside it, and the higher pressure outside pushes the liquid up the straw into your mouth. A carburetor works on a similar principle, but instead of you sucking, the engine\'s pistons moving down create suction, and instead of liquid coming up a straw, fuel is drawn into a stream of air.\n\nHere\'s a slightly more detailed mental model: think of a carburetor as a specialized pipe with a narrow waist. Air gets pulled through this pipe by the engine. As the air speeds up through the narrow waist, it creates a drop in pressure. This low-pressure area then sucks fuel from a small reservoir, mixing it with the incoming air.\n\nLet\'s break down the main parts and how they work together:\n\n1. **Air Intake:** Air from outside the engine is drawn into the carburetor.\n2. **Venturi:** This is the narrow waist in the carburetor\'s main passage. As air rushes through this constricted area, its speed increases, and its pressure drops. This phenomenon is called the **Venturi effect**.\n3. **Fuel Jet:** Located in the low-pressure area of the Venturi, this is a small opening connected to a fuel supply. The reduced air pressure in the Venturi draws fuel out of the jet and into the airflow, turning it into a fine mist.\n4. **Float Bowl:** This small tank, usually located at the bottom of the carburetor, holds a constant supply of fuel. A **float** (like the one in a toilet tank) and a needle valve maintain the fuel level, ensuring there\'s always enough fuel ready to be drawn into the Venturi.\n5. **Throttle Valve:** This is a movable plate, often butterfly-shaped, located after the Venturi. You control it with the accelerator pedal (or hand throttle on a lawnmower). When you open the throttle, more air and fuel mixture can enter the engine, making it run faster. When you close it, less mixture enters, and the engine slows down.\n6. **Choke Valve:** This is another plate, usually located at the air intake before the Venturi. When the engine is cold, gasoline doesn\'t vaporize easily. Closing the choke restricts airflow, making the air-fuel mixture much richer (more fuel, less air). This helps the cold engine start and run until it warms up. Once warm, you open the choke to prevent the engine from running too rich and wasting fuel.\n\n**A concrete example:**\nImagine an old aerosol spray can, like for paint. When you press the button, you create a low-pressure area, and the paint (fuel) is drawn up and mixed with the propellant (air) into a fine spray. A carburetor does something similar, but it\'s the engine\'s suction that pulls the air, and the shape of the Venturi that creates the low pressure to draw in the fuel.\n\nWhile carburetors are ingenious devices, they have largely been replaced in modern cars by **fuel injection systems**. Fuel injection offers more precise control over the air-fuel mixture, leading to better fuel efficiency, lower emissions, and more consistent engine performance across different conditions. However, you\'ll still find carburetors in many small engines like those in lawnmowers, chainsaws, and some motorcycles, where their simplicity and lower cost are advantageous.\n\nWhat we haven\'t covered here are the many variations of carburetors (e.g., downdraft, sidedraft, updraft), or the complex internal passages and circuits that provide fuel for different engine speeds and loads beyond the basic Venturi effect. If you\'re interested in learning more, exploring how these different circuits (like idle circuits or power valves) work would be a great next step.',
45
- reasoning: [],
46
- files: [],
47
- sources: [],
48
- toolCalls: [],
49
- staticToolCalls: [],
50
- dynamicToolCalls: [],
51
- toolResults: [],
52
- staticToolResults: [],
53
- dynamicToolResults: [],
54
- responseMessages: [
55
- {
56
- role: 'assistant',
57
- content: [
58
- {
59
- type: 'text',
60
- text: 'A carburetor is a mechanical device that mixes air and fuel in the correct proportions before they enter an internal combustion engine, allowing the engine to run. It matters because it was, for many decades, the primary way gasoline engines received their fuel mixture, and it\'s still found in many smaller engines today.\n\nImagine you\'re drinking through a straw. When you suck on the straw, you create an area of lower pressure inside it, and the higher pressure outside pushes the liquid up the straw into your mouth. A carburetor works on a similar principle, but instead of you sucking, the engine\'s pistons moving down create suction, and instead of liquid coming up a straw, fuel is drawn into a stream of air.\n\nHere\'s a slightly more detailed mental model: think of a carburetor as a specialized pipe with a narrow waist. Air gets pulled through this pipe by the engine. As the air speeds up through the narrow waist, it creates a drop in pressure. This low-pressure area then sucks fuel from a small reservoir, mixing it with the incoming air.\n\nLet\'s break down the main parts and how they work together:\n\n1. **Air Intake:** Air from outside the engine is drawn into the carburetor.\n2. **Venturi:** This is the narrow waist in the carburetor\'s main passage. As air rushes through this constricted area, its speed increases, and its pressure drops. This phenomenon is called the **Venturi effect**.\n3. **Fuel Jet:** Located in the low-pressure area of the Venturi, this is a small opening connected to a fuel supply. The reduced air pressure in the Venturi draws fuel out of the jet and into the airflow, turning it into a fine mist.\n4. **Float Bowl:** This small tank, usually located at the bottom of the carburetor, holds a constant supply of fuel. A **float** (like the one in a toilet tank) and a needle valve maintain the fuel level, ensuring there\'s always enough fuel ready to be drawn into the Venturi.\n5. **Throttle Valve:** This is a movable plate, often butterfly-shaped, located after the Venturi. You control it with the accelerator pedal (or hand throttle on a lawnmower). When you open the throttle, more air and fuel mixture can enter the engine, making it run faster. When you close it, less mixture enters, and the engine slows down.\n6. **Choke Valve:** This is another plate, usually located at the air intake before the Venturi. When the engine is cold, gasoline doesn\'t vaporize easily. Closing the choke restricts airflow, making the air-fuel mixture much richer (more fuel, less air). This helps the cold engine start and run until it warms up. Once warm, you open the choke to prevent the engine from running too rich and wasting fuel.\n\n**A concrete example:**\nImagine an old aerosol spray can, like for paint. When you press the button, you create a low-pressure area, and the paint (fuel) is drawn up and mixed with the propellant (air) into a fine spray. A carburetor does something similar, but it\'s the engine\'s suction that pulls the air, and the shape of the Venturi that creates the low pressure to draw in the fuel.\n\nWhile carburetors are ingenious devices, they have largely been replaced in modern cars by **fuel injection systems**. Fuel injection offers more precise control over the air-fuel mixture, leading to better fuel efficiency, lower emissions, and more consistent engine performance across different conditions. However, you\'ll still find carburetors in many small engines like those in lawnmowers, chainsaws, and some motorcycles, where their simplicity and lower cost are advantageous.\n\nWhat we haven\'t covered here are the many variations of carburetors (e.g., downdraft, sidedraft, updraft), or the complex internal passages and circuits that provide fuel for different engine speeds and loads beyond the basic Venturi effect. If you\'re interested in learning more, exploring how these different circuits (like idle circuits or power valves) work would be a great next step.'
61
- }
62
- ]
63
- }
64
- ],
65
- warnings: [],
66
- request: {},
67
- response: {
68
- id: 'res-id',
69
- timestamp: '2026-08-25T00:00:00.000Z',
70
- modelId: 'gemini-2.5-flash',
71
- headers: {
72
- 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
73
- 'content-disposition': 'attachment',
74
- 'content-type': 'text/event-stream',
75
- date: 'Tue, 25 Aug 2026 00:00:00 GMT',
76
- server: 'scaffolding on HTTPServer2',
77
- 'transfer-encoding': 'chunked',
78
- vary: 'Origin, X-Origin, Referer',
79
- 'x-content-type-options': 'nosniff',
80
- 'x-frame-options': 'SAMEORIGIN',
81
- 'x-xss-protection': '0'
82
- },
83
- messages: [
84
- {
85
- role: 'assistant',
86
- content: [
87
- {
88
- type: 'text',
89
- text: 'A carburetor is a mechanical device that mixes air and fuel in the correct proportions before they enter an internal combustion engine, allowing the engine to run. It matters because it was, for many decades, the primary way gasoline engines received their fuel mixture, and it\'s still found in many smaller engines today.\n\nImagine you\'re drinking through a straw. When you suck on the straw, you create an area of lower pressure inside it, and the higher pressure outside pushes the liquid up the straw into your mouth. A carburetor works on a similar principle, but instead of you sucking, the engine\'s pistons moving down create suction, and instead of liquid coming up a straw, fuel is drawn into a stream of air.\n\nHere\'s a slightly more detailed mental model: think of a carburetor as a specialized pipe with a narrow waist. Air gets pulled through this pipe by the engine. As the air speeds up through the narrow waist, it creates a drop in pressure. This low-pressure area then sucks fuel from a small reservoir, mixing it with the incoming air.\n\nLet\'s break down the main parts and how they work together:\n\n1. **Air Intake:** Air from outside the engine is drawn into the carburetor.\n2. **Venturi:** This is the narrow waist in the carburetor\'s main passage. As air rushes through this constricted area, its speed increases, and its pressure drops. This phenomenon is called the **Venturi effect**.\n3. **Fuel Jet:** Located in the low-pressure area of the Venturi, this is a small opening connected to a fuel supply. The reduced air pressure in the Venturi draws fuel out of the jet and into the airflow, turning it into a fine mist.\n4. **Float Bowl:** This small tank, usually located at the bottom of the carburetor, holds a constant supply of fuel. A **float** (like the one in a toilet tank) and a needle valve maintain the fuel level, ensuring there\'s always enough fuel ready to be drawn into the Venturi.\n5. **Throttle Valve:** This is a movable plate, often butterfly-shaped, located after the Venturi. You control it with the accelerator pedal (or hand throttle on a lawnmower). When you open the throttle, more air and fuel mixture can enter the engine, making it run faster. When you close it, less mixture enters, and the engine slows down.\n6. **Choke Valve:** This is another plate, usually located at the air intake before the Venturi. When the engine is cold, gasoline doesn\'t vaporize easily. Closing the choke restricts airflow, making the air-fuel mixture much richer (more fuel, less air). This helps the cold engine start and run until it warms up. Once warm, you open the choke to prevent the engine from running too rich and wasting fuel.\n\n**A concrete example:**\nImagine an old aerosol spray can, like for paint. When you press the button, you create a low-pressure area, and the paint (fuel) is drawn up and mixed with the propellant (air) into a fine spray. A carburetor does something similar, but it\'s the engine\'s suction that pulls the air, and the shape of the Venturi that creates the low pressure to draw in the fuel.\n\nWhile carburetors are ingenious devices, they have largely been replaced in modern cars by **fuel injection systems**. Fuel injection offers more precise control over the air-fuel mixture, leading to better fuel efficiency, lower emissions, and more consistent engine performance across different conditions. However, you\'ll still find carburetors in many small engines like those in lawnmowers, chainsaws, and some motorcycles, where their simplicity and lower cost are advantageous.\n\nWhat we haven\'t covered here are the many variations of carburetors (e.g., downdraft, sidedraft, updraft), or the complex internal passages and circuits that provide fuel for different engine speeds and loads beyond the basic Venturi effect. If you\'re interested in learning more, exploring how these different circuits (like idle circuits or power valves) work would be a great next step.'
90
- }
91
- ]
92
- }
93
- ]
94
- },
95
- providerMetadata: {
96
- googleVertex: {
97
- promptFeedback: null,
98
- groundingMetadata: null,
99
- urlContextMetadata: null,
100
- safetyRatings: null,
101
- usageMetadata: {
102
- thoughtsTokenCount: 489,
103
- promptTokenCount: 1032,
104
- candidatesTokenCount: 858,
105
- totalTokenCount: 2379,
106
- trafficType: 'ON_DEMAND',
107
- promptTokensDetails: [
108
- {
109
- modality: 'TEXT',
110
- tokenCount: 1032
111
- }
112
- ],
113
- candidatesTokensDetails: [
114
- {
115
- modality: 'TEXT',
116
- tokenCount: 858
117
- }
118
- ]
119
- },
120
- finishMessage: null,
121
- serviceTier: null
122
- },
123
- vertex: {
124
- promptFeedback: null,
125
- groundingMetadata: null,
126
- urlContextMetadata: null,
127
- safetyRatings: null,
128
- usageMetadata: {
129
- thoughtsTokenCount: 489,
130
- promptTokenCount: 1032,
131
- candidatesTokenCount: 858,
132
- totalTokenCount: 2379,
133
- trafficType: 'ON_DEMAND',
134
- promptTokensDetails: [
135
- {
136
- modality: 'TEXT',
137
- tokenCount: 1032
138
- }
139
- ],
140
- candidatesTokensDetails: [
141
- {
142
- modality: 'TEXT',
143
- tokenCount: 858
144
- }
145
- ]
146
- },
147
- finishMessage: null,
148
- serviceTier: null
149
- }
150
- },
151
- steps: [
152
- {
153
- callId: 'call-id',
154
- stepNumber: 0,
155
- model: {
156
- provider: 'google.vertex.chat',
157
- modelId: 'gemini-2.5-flash'
158
- },
159
- runtimeContext: {},
160
- toolsContext: {},
161
- content: [
162
- {
163
- type: 'text',
164
- text: 'A carburetor is a mechanical device that mixes air and fuel in the correct proportions before they enter an internal combustion engine, allowing the engine to run. It matters because it was, for many decades, the primary way gasoline engines received their fuel mixture, and it\'s still found in many smaller engines today.\n\nImagine you\'re drinking through a straw. When you suck on the straw, you create an area of lower pressure inside it, and the higher pressure outside pushes the liquid up the straw into your mouth. A carburetor works on a similar principle, but instead of you sucking, the engine\'s pistons moving down create suction, and instead of liquid coming up a straw, fuel is drawn into a stream of air.\n\nHere\'s a slightly more detailed mental model: think of a carburetor as a specialized pipe with a narrow waist. Air gets pulled through this pipe by the engine. As the air speeds up through the narrow waist, it creates a drop in pressure. This low-pressure area then sucks fuel from a small reservoir, mixing it with the incoming air.\n\nLet\'s break down the main parts and how they work together:\n\n1. **Air Intake:** Air from outside the engine is drawn into the carburetor.\n2. **Venturi:** This is the narrow waist in the carburetor\'s main passage. As air rushes through this constricted area, its speed increases, and its pressure drops. This phenomenon is called the **Venturi effect**.\n3. **Fuel Jet:** Located in the low-pressure area of the Venturi, this is a small opening connected to a fuel supply. The reduced air pressure in the Venturi draws fuel out of the jet and into the airflow, turning it into a fine mist.\n4. **Float Bowl:** This small tank, usually located at the bottom of the carburetor, holds a constant supply of fuel. A **float** (like the one in a toilet tank) and a needle valve maintain the fuel level, ensuring there\'s always enough fuel ready to be drawn into the Venturi.\n5. **Throttle Valve:** This is a movable plate, often butterfly-shaped, located after the Venturi. You control it with the accelerator pedal (or hand throttle on a lawnmower). When you open the throttle, more air and fuel mixture can enter the engine, making it run faster. When you close it, less mixture enters, and the engine slows down.\n6. **Choke Valve:** This is another plate, usually located at the air intake before the Venturi. When the engine is cold, gasoline doesn\'t vaporize easily. Closing the choke restricts airflow, making the air-fuel mixture much richer (more fuel, less air). This helps the cold engine start and run until it warms up. Once warm, you open the choke to prevent the engine from running too rich and wasting fuel.\n\n**A concrete example:**\nImagine an old aerosol spray can, like for paint. When you press the button, you create a low-pressure area, and the paint (fuel) is drawn up and mixed with the propellant (air) into a fine spray. A carburetor does something similar, but it\'s the engine\'s suction that pulls the air, and the shape of the Venturi that creates the low pressure to draw in the fuel.\n\nWhile carburetors are ingenious devices, they have largely been replaced in modern cars by **fuel injection systems**. Fuel injection offers more precise control over the air-fuel mixture, leading to better fuel efficiency, lower emissions, and more consistent engine performance across different conditions. However, you\'ll still find carburetors in many small engines like those in lawnmowers, chainsaws, and some motorcycles, where their simplicity and lower cost are advantageous.\n\nWhat we haven\'t covered here are the many variations of carburetors (e.g., downdraft, sidedraft, updraft), or the complex internal passages and circuits that provide fuel for different engine speeds and loads beyond the basic Venturi effect. If you\'re interested in learning more, exploring how these different circuits (like idle circuits or power valves) work would be a great next step.'
165
- }
166
- ],
167
- finishReason: 'stop',
168
- rawFinishReason: 'STOP',
169
- usage: {
170
- inputTokens: 1032,
171
- inputTokenDetails: {
172
- noCacheTokens: 1032,
173
- cacheReadTokens: 0
174
- },
175
- outputTokens: 1347,
176
- outputTokenDetails: {
177
- textTokens: 858,
178
- reasoningTokens: 489
179
- },
180
- totalTokens: 2379,
181
- raw: {
182
- thoughtsTokenCount: 489,
183
- promptTokenCount: 1032,
184
- candidatesTokenCount: 858,
185
- totalTokenCount: 2379,
186
- trafficType: 'ON_DEMAND',
187
- promptTokensDetails: [
188
- {
189
- modality: 'TEXT',
190
- tokenCount: 1032
191
- }
192
- ],
193
- candidatesTokensDetails: [
194
- {
195
- modality: 'TEXT',
196
- tokenCount: 858
197
- }
198
- ]
199
- }
200
- },
201
- performance: {
202
- stepTimeMs: 10250.28692,
203
- toolExecutionMs: {},
204
- responseTimeMs: 10248.312296000002,
205
- effectiveOutputTokensPerSecond: 131.4362756612857,
206
- outputTokensPerSecond: 235.95484400877328,
207
- inputTokensPerSecond: 227.333161356531,
208
- effectiveTotalTokensPerSecond: 232.13578307215937,
209
- timeToFirstOutputMs: 4539.592877000001,
210
- timeBetweenOutputChunksMs: {
211
- min: 111.65045800000007,
212
- p10: 398.0607090000012,
213
- median: 429.28362500000003,
214
- avg: 428.3790097692307,
215
- p90: 510.9665420000001,
216
- max: 637.5124589999996
217
- }
218
- },
219
- warnings: [],
220
- request: {},
221
- response: {
222
- id: 'res-id',
223
- timestamp: '2026-08-25T00:00:00.000Z',
224
- modelId: 'gemini-2.5-flash',
225
- headers: {
226
- 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
227
- 'content-disposition': 'attachment',
228
- 'content-type': 'text/event-stream',
229
- date: 'Tue, 25 Aug 2026 00:00:00 GMT',
230
- server: 'scaffolding on HTTPServer2',
231
- 'transfer-encoding': 'chunked',
232
- vary: 'Origin, X-Origin, Referer',
233
- 'x-content-type-options': 'nosniff',
234
- 'x-frame-options': 'SAMEORIGIN',
235
- 'x-xss-protection': '0'
236
- },
237
- messages: [
238
- {
239
- role: 'assistant',
240
- content: [
241
- {
242
- type: 'text',
243
- text: 'A carburetor is a mechanical device that mixes air and fuel in the correct proportions before they enter an internal combustion engine, allowing the engine to run. It matters because it was, for many decades, the primary way gasoline engines received their fuel mixture, and it\'s still found in many smaller engines today.\n\nImagine you\'re drinking through a straw. When you suck on the straw, you create an area of lower pressure inside it, and the higher pressure outside pushes the liquid up the straw into your mouth. A carburetor works on a similar principle, but instead of you sucking, the engine\'s pistons moving down create suction, and instead of liquid coming up a straw, fuel is drawn into a stream of air.\n\nHere\'s a slightly more detailed mental model: think of a carburetor as a specialized pipe with a narrow waist. Air gets pulled through this pipe by the engine. As the air speeds up through the narrow waist, it creates a drop in pressure. This low-pressure area then sucks fuel from a small reservoir, mixing it with the incoming air.\n\nLet\'s break down the main parts and how they work together:\n\n1. **Air Intake:** Air from outside the engine is drawn into the carburetor.\n2. **Venturi:** This is the narrow waist in the carburetor\'s main passage. As air rushes through this constricted area, its speed increases, and its pressure drops. This phenomenon is called the **Venturi effect**.\n3. **Fuel Jet:** Located in the low-pressure area of the Venturi, this is a small opening connected to a fuel supply. The reduced air pressure in the Venturi draws fuel out of the jet and into the airflow, turning it into a fine mist.\n4. **Float Bowl:** This small tank, usually located at the bottom of the carburetor, holds a constant supply of fuel. A **float** (like the one in a toilet tank) and a needle valve maintain the fuel level, ensuring there\'s always enough fuel ready to be drawn into the Venturi.\n5. **Throttle Valve:** This is a movable plate, often butterfly-shaped, located after the Venturi. You control it with the accelerator pedal (or hand throttle on a lawnmower). When you open the throttle, more air and fuel mixture can enter the engine, making it run faster. When you close it, less mixture enters, and the engine slows down.\n6. **Choke Valve:** This is another plate, usually located at the air intake before the Venturi. When the engine is cold, gasoline doesn\'t vaporize easily. Closing the choke restricts airflow, making the air-fuel mixture much richer (more fuel, less air). This helps the cold engine start and run until it warms up. Once warm, you open the choke to prevent the engine from running too rich and wasting fuel.\n\n**A concrete example:**\nImagine an old aerosol spray can, like for paint. When you press the button, you create a low-pressure area, and the paint (fuel) is drawn up and mixed with the propellant (air) into a fine spray. A carburetor does something similar, but it\'s the engine\'s suction that pulls the air, and the shape of the Venturi that creates the low pressure to draw in the fuel.\n\nWhile carburetors are ingenious devices, they have largely been replaced in modern cars by **fuel injection systems**. Fuel injection offers more precise control over the air-fuel mixture, leading to better fuel efficiency, lower emissions, and more consistent engine performance across different conditions. However, you\'ll still find carburetors in many small engines like those in lawnmowers, chainsaws, and some motorcycles, where their simplicity and lower cost are advantageous.\n\nWhat we haven\'t covered here are the many variations of carburetors (e.g., downdraft, sidedraft, updraft), or the complex internal passages and circuits that provide fuel for different engine speeds and loads beyond the basic Venturi effect. If you\'re interested in learning more, exploring how these different circuits (like idle circuits or power valves) work would be a great next step.'
244
- }
245
- ]
246
- }
247
- ]
248
- },
249
- providerMetadata: {
250
- googleVertex: {
251
- promptFeedback: null,
252
- groundingMetadata: null,
253
- urlContextMetadata: null,
254
- safetyRatings: null,
255
- usageMetadata: {
256
- thoughtsTokenCount: 489,
257
- promptTokenCount: 1032,
258
- candidatesTokenCount: 858,
259
- totalTokenCount: 2379,
260
- trafficType: 'ON_DEMAND',
261
- promptTokensDetails: [
262
- {
263
- modality: 'TEXT',
264
- tokenCount: 1032
265
- }
266
- ],
267
- candidatesTokensDetails: [
268
- {
269
- modality: 'TEXT',
270
- tokenCount: 858
271
- }
272
- ]
273
- },
274
- finishMessage: null,
275
- serviceTier: null
276
- },
277
- vertex: {
278
- promptFeedback: null,
279
- groundingMetadata: null,
280
- urlContextMetadata: null,
281
- safetyRatings: null,
282
- usageMetadata: {
283
- thoughtsTokenCount: 489,
284
- promptTokenCount: 1032,
285
- candidatesTokenCount: 858,
286
- totalTokenCount: 2379,
287
- trafficType: 'ON_DEMAND',
288
- promptTokensDetails: [
289
- {
290
- modality: 'TEXT',
291
- tokenCount: 1032
292
- }
293
- ],
294
- candidatesTokensDetails: [
295
- {
296
- modality: 'TEXT',
297
- tokenCount: 858
298
- }
299
- ]
300
- },
301
- finishMessage: null,
302
- serviceTier: null
303
- }
304
- }
305
- }
306
- ],
307
- finalStep: {
308
- callId: 'call-id',
309
- stepNumber: 0,
310
- model: {
311
- provider: 'google.vertex.chat',
312
- modelId: 'gemini-2.5-flash'
313
- },
314
- runtimeContext: {},
315
- toolsContext: {},
316
- content: [
317
- {
318
- type: 'text',
319
- text: 'A carburetor is a mechanical device that mixes air and fuel in the correct proportions before they enter an internal combustion engine, allowing the engine to run. It matters because it was, for many decades, the primary way gasoline engines received their fuel mixture, and it\'s still found in many smaller engines today.\n\nImagine you\'re drinking through a straw. When you suck on the straw, you create an area of lower pressure inside it, and the higher pressure outside pushes the liquid up the straw into your mouth. A carburetor works on a similar principle, but instead of you sucking, the engine\'s pistons moving down create suction, and instead of liquid coming up a straw, fuel is drawn into a stream of air.\n\nHere\'s a slightly more detailed mental model: think of a carburetor as a specialized pipe with a narrow waist. Air gets pulled through this pipe by the engine. As the air speeds up through the narrow waist, it creates a drop in pressure. This low-pressure area then sucks fuel from a small reservoir, mixing it with the incoming air.\n\nLet\'s break down the main parts and how they work together:\n\n1. **Air Intake:** Air from outside the engine is drawn into the carburetor.\n2. **Venturi:** This is the narrow waist in the carburetor\'s main passage. As air rushes through this constricted area, its speed increases, and its pressure drops. This phenomenon is called the **Venturi effect**.\n3. **Fuel Jet:** Located in the low-pressure area of the Venturi, this is a small opening connected to a fuel supply. The reduced air pressure in the Venturi draws fuel out of the jet and into the airflow, turning it into a fine mist.\n4. **Float Bowl:** This small tank, usually located at the bottom of the carburetor, holds a constant supply of fuel. A **float** (like the one in a toilet tank) and a needle valve maintain the fuel level, ensuring there\'s always enough fuel ready to be drawn into the Venturi.\n5. **Throttle Valve:** This is a movable plate, often butterfly-shaped, located after the Venturi. You control it with the accelerator pedal (or hand throttle on a lawnmower). When you open the throttle, more air and fuel mixture can enter the engine, making it run faster. When you close it, less mixture enters, and the engine slows down.\n6. **Choke Valve:** This is another plate, usually located at the air intake before the Venturi. When the engine is cold, gasoline doesn\'t vaporize easily. Closing the choke restricts airflow, making the air-fuel mixture much richer (more fuel, less air). This helps the cold engine start and run until it warms up. Once warm, you open the choke to prevent the engine from running too rich and wasting fuel.\n\n**A concrete example:**\nImagine an old aerosol spray can, like for paint. When you press the button, you create a low-pressure area, and the paint (fuel) is drawn up and mixed with the propellant (air) into a fine spray. A carburetor does something similar, but it\'s the engine\'s suction that pulls the air, and the shape of the Venturi that creates the low pressure to draw in the fuel.\n\nWhile carburetors are ingenious devices, they have largely been replaced in modern cars by **fuel injection systems**. Fuel injection offers more precise control over the air-fuel mixture, leading to better fuel efficiency, lower emissions, and more consistent engine performance across different conditions. However, you\'ll still find carburetors in many small engines like those in lawnmowers, chainsaws, and some motorcycles, where their simplicity and lower cost are advantageous.\n\nWhat we haven\'t covered here are the many variations of carburetors (e.g., downdraft, sidedraft, updraft), or the complex internal passages and circuits that provide fuel for different engine speeds and loads beyond the basic Venturi effect. If you\'re interested in learning more, exploring how these different circuits (like idle circuits or power valves) work would be a great next step.'
320
- }
321
- ],
322
- finishReason: 'stop',
323
- rawFinishReason: 'STOP',
324
- usage: {
325
- inputTokens: 1032,
326
- inputTokenDetails: {
327
- noCacheTokens: 1032,
328
- cacheReadTokens: 0
329
- },
330
- outputTokens: 1347,
331
- outputTokenDetails: {
332
- textTokens: 858,
333
- reasoningTokens: 489
334
- },
335
- totalTokens: 2379,
336
- raw: {
337
- thoughtsTokenCount: 489,
338
- promptTokenCount: 1032,
339
- candidatesTokenCount: 858,
340
- totalTokenCount: 2379,
341
- trafficType: 'ON_DEMAND',
342
- promptTokensDetails: [
343
- {
344
- modality: 'TEXT',
345
- tokenCount: 1032
346
- }
347
- ],
348
- candidatesTokensDetails: [
349
- {
350
- modality: 'TEXT',
351
- tokenCount: 858
352
- }
353
- ]
354
- }
355
- },
356
- performance: {
357
- stepTimeMs: 10250.28692,
358
- toolExecutionMs: {},
359
- responseTimeMs: 10248.312296000002,
360
- effectiveOutputTokensPerSecond: 131.4362756612857,
361
- outputTokensPerSecond: 235.95484400877328,
362
- inputTokensPerSecond: 227.333161356531,
363
- effectiveTotalTokensPerSecond: 232.13578307215937,
364
- timeToFirstOutputMs: 4539.592877000001,
365
- timeBetweenOutputChunksMs: {
366
- min: 111.65045800000007,
367
- p10: 398.0607090000012,
368
- median: 429.28362500000003,
369
- avg: 428.3790097692307,
370
- p90: 510.9665420000001,
371
- max: 637.5124589999996
372
- }
373
- },
374
- warnings: [],
375
- request: {},
376
- response: {
377
- id: 'res-id',
378
- timestamp: '2026-08-25T00:00:00.000Z',
379
- modelId: 'gemini-2.5-flash',
380
- headers: {
381
- 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
382
- 'content-disposition': 'attachment',
383
- 'content-type': 'text/event-stream',
384
- date: 'Tue, 25 Aug 2026 00:00:00 GMT',
385
- server: 'scaffolding on HTTPServer2',
386
- 'transfer-encoding': 'chunked',
387
- vary: 'Origin, X-Origin, Referer',
388
- 'x-content-type-options': 'nosniff',
389
- 'x-frame-options': 'SAMEORIGIN',
390
- 'x-xss-protection': '0'
391
- },
392
- messages: [
393
- {
394
- role: 'assistant',
395
- content: [
396
- {
397
- type: 'text',
398
- text: 'A carburetor is a mechanical device that mixes air and fuel in the correct proportions before they enter an internal combustion engine, allowing the engine to run. It matters because it was, for many decades, the primary way gasoline engines received their fuel mixture, and it\'s still found in many smaller engines today.\n\nImagine you\'re drinking through a straw. When you suck on the straw, you create an area of lower pressure inside it, and the higher pressure outside pushes the liquid up the straw into your mouth. A carburetor works on a similar principle, but instead of you sucking, the engine\'s pistons moving down create suction, and instead of liquid coming up a straw, fuel is drawn into a stream of air.\n\nHere\'s a slightly more detailed mental model: think of a carburetor as a specialized pipe with a narrow waist. Air gets pulled through this pipe by the engine. As the air speeds up through the narrow waist, it creates a drop in pressure. This low-pressure area then sucks fuel from a small reservoir, mixing it with the incoming air.\n\nLet\'s break down the main parts and how they work together:\n\n1. **Air Intake:** Air from outside the engine is drawn into the carburetor.\n2. **Venturi:** This is the narrow waist in the carburetor\'s main passage. As air rushes through this constricted area, its speed increases, and its pressure drops. This phenomenon is called the **Venturi effect**.\n3. **Fuel Jet:** Located in the low-pressure area of the Venturi, this is a small opening connected to a fuel supply. The reduced air pressure in the Venturi draws fuel out of the jet and into the airflow, turning it into a fine mist.\n4. **Float Bowl:** This small tank, usually located at the bottom of the carburetor, holds a constant supply of fuel. A **float** (like the one in a toilet tank) and a needle valve maintain the fuel level, ensuring there\'s always enough fuel ready to be drawn into the Venturi.\n5. **Throttle Valve:** This is a movable plate, often butterfly-shaped, located after the Venturi. You control it with the accelerator pedal (or hand throttle on a lawnmower). When you open the throttle, more air and fuel mixture can enter the engine, making it run faster. When you close it, less mixture enters, and the engine slows down.\n6. **Choke Valve:** This is another plate, usually located at the air intake before the Venturi. When the engine is cold, gasoline doesn\'t vaporize easily. Closing the choke restricts airflow, making the air-fuel mixture much richer (more fuel, less air). This helps the cold engine start and run until it warms up. Once warm, you open the choke to prevent the engine from running too rich and wasting fuel.\n\n**A concrete example:**\nImagine an old aerosol spray can, like for paint. When you press the button, you create a low-pressure area, and the paint (fuel) is drawn up and mixed with the propellant (air) into a fine spray. A carburetor does something similar, but it\'s the engine\'s suction that pulls the air, and the shape of the Venturi that creates the low pressure to draw in the fuel.\n\nWhile carburetors are ingenious devices, they have largely been replaced in modern cars by **fuel injection systems**. Fuel injection offers more precise control over the air-fuel mixture, leading to better fuel efficiency, lower emissions, and more consistent engine performance across different conditions. However, you\'ll still find carburetors in many small engines like those in lawnmowers, chainsaws, and some motorcycles, where their simplicity and lower cost are advantageous.\n\nWhat we haven\'t covered here are the many variations of carburetors (e.g., downdraft, sidedraft, updraft), or the complex internal passages and circuits that provide fuel for different engine speeds and loads beyond the basic Venturi effect. If you\'re interested in learning more, exploring how these different circuits (like idle circuits or power valves) work would be a great next step.'
399
- }
400
- ]
401
- }
402
- ]
403
- },
404
- providerMetadata: {
405
- googleVertex: {
406
- promptFeedback: null,
407
- groundingMetadata: null,
408
- urlContextMetadata: null,
409
- safetyRatings: null,
410
- usageMetadata: {
411
- thoughtsTokenCount: 489,
412
- promptTokenCount: 1032,
413
- candidatesTokenCount: 858,
414
- totalTokenCount: 2379,
415
- trafficType: 'ON_DEMAND',
416
- promptTokensDetails: [
417
- {
418
- modality: 'TEXT',
419
- tokenCount: 1032
420
- }
421
- ],
422
- candidatesTokensDetails: [
423
- {
424
- modality: 'TEXT',
425
- tokenCount: 858
426
- }
427
- ]
428
- },
429
- finishMessage: null,
430
- serviceTier: null
431
- },
432
- vertex: {
433
- promptFeedback: null,
434
- groundingMetadata: null,
435
- urlContextMetadata: null,
436
- safetyRatings: null,
437
- usageMetadata: {
438
- thoughtsTokenCount: 489,
439
- promptTokenCount: 1032,
440
- candidatesTokenCount: 858,
441
- totalTokenCount: 2379,
442
- trafficType: 'ON_DEMAND',
443
- promptTokensDetails: [
444
- {
445
- modality: 'TEXT',
446
- tokenCount: 1032
447
- }
448
- ],
449
- candidatesTokensDetails: [
450
- {
451
- modality: 'TEXT',
452
- tokenCount: 858
453
- }
454
- ]
455
- },
456
- finishMessage: null,
457
- serviceTier: null
458
- }
459
- }
460
- },
461
- output: 'A carburetor is a mechanical device that mixes air and fuel in the correct proportions before they enter an internal combustion engine, allowing the engine to run. It matters because it was, for many decades, the primary way gasoline engines received their fuel mixture, and it\'s still found in many smaller engines today.\n\nImagine you\'re drinking through a straw. When you suck on the straw, you create an area of lower pressure inside it, and the higher pressure outside pushes the liquid up the straw into your mouth. A carburetor works on a similar principle, but instead of you sucking, the engine\'s pistons moving down create suction, and instead of liquid coming up a straw, fuel is drawn into a stream of air.\n\nHere\'s a slightly more detailed mental model: think of a carburetor as a specialized pipe with a narrow waist. Air gets pulled through this pipe by the engine. As the air speeds up through the narrow waist, it creates a drop in pressure. This low-pressure area then sucks fuel from a small reservoir, mixing it with the incoming air.\n\nLet\'s break down the main parts and how they work together:\n\n1. **Air Intake:** Air from outside the engine is drawn into the carburetor.\n2. **Venturi:** This is the narrow waist in the carburetor\'s main passage. As air rushes through this constricted area, its speed increases, and its pressure drops. This phenomenon is called the **Venturi effect**.\n3. **Fuel Jet:** Located in the low-pressure area of the Venturi, this is a small opening connected to a fuel supply. The reduced air pressure in the Venturi draws fuel out of the jet and into the airflow, turning it into a fine mist.\n4. **Float Bowl:** This small tank, usually located at the bottom of the carburetor, holds a constant supply of fuel. A **float** (like the one in a toilet tank) and a needle valve maintain the fuel level, ensuring there\'s always enough fuel ready to be drawn into the Venturi.\n5. **Throttle Valve:** This is a movable plate, often butterfly-shaped, located after the Venturi. You control it with the accelerator pedal (or hand throttle on a lawnmower). When you open the throttle, more air and fuel mixture can enter the engine, making it run faster. When you close it, less mixture enters, and the engine slows down.\n6. **Choke Valve:** This is another plate, usually located at the air intake before the Venturi. When the engine is cold, gasoline doesn\'t vaporize easily. Closing the choke restricts airflow, making the air-fuel mixture much richer (more fuel, less air). This helps the cold engine start and run until it warms up. Once warm, you open the choke to prevent the engine from running too rich and wasting fuel.\n\n**A concrete example:**\nImagine an old aerosol spray can, like for paint. When you press the button, you create a low-pressure area, and the paint (fuel) is drawn up and mixed with the propellant (air) into a fine spray. A carburetor does something similar, but it\'s the engine\'s suction that pulls the air, and the shape of the Venturi that creates the low pressure to draw in the fuel.\n\nWhile carburetors are ingenious devices, they have largely been replaced in modern cars by **fuel injection systems**. Fuel injection offers more precise control over the air-fuel mixture, leading to better fuel efficiency, lower emissions, and more consistent engine performance across different conditions. However, you\'ll still find carburetors in many small engines like those in lawnmowers, chainsaws, and some motorcycles, where their simplicity and lower cost are advantageous.\n\nWhat we haven\'t covered here are the many variations of carburetors (e.g., downdraft, sidedraft, updraft), or the complex internal passages and circuits that provide fuel for different engine speeds and loads beyond the basic Venturi effect. If you\'re interested in learning more, exploring how these different circuits (like idle circuits or power valves) work would be a great next step.'
462
- };