@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.
- package/package.json +7 -3
- package/src/agent.js +7 -2
- package/src/generate.js +1 -0
- package/src/index.d.ts +14 -6
- package/src/utils/wrap.js +35 -2
- package/src/agent.spec.js +0 -595
- package/src/ai_provider.spec.js +0 -217
- package/src/ai_sdk_options.spec.js +0 -390
- package/src/fixtures/image_response_v7_google_vertex.js +0 -72
- package/src/fixtures/image_response_v7_openai.js +0 -77
- package/src/fixtures/models_api_light.json +0 -675
- package/src/fixtures/models_api_v7_subset.json +0 -259
- package/src/fixtures/stream_response_v7_anthropic.js +0 -389
- package/src/fixtures/stream_response_v7_google_vertex.js +0 -462
- package/src/fixtures/stream_response_v7_openai.js +0 -353
- package/src/fixtures/stream_response_v7_perplexity.js +0 -671
- package/src/fixtures/text_response_v7_anthropic.js +0 -359
- package/src/fixtures/text_response_v7_anthropic_cache.js +0 -719
- package/src/fixtures/text_response_v7_google_vertex.js +0 -435
- package/src/fixtures/text_response_v7_openai.js +0 -347
- package/src/fixtures/text_response_v7_perplexity.js +0 -764
- package/src/generate.spec.js +0 -525
- package/src/prompt/content.spec.js +0 -208
- package/src/prompt/interpolations.spec.js +0 -109
- package/src/prompt/loader.full.spec.js +0 -309
- package/src/prompt/loader.spec.js +0 -258
- package/src/prompt/markup/attributes.spec.js +0 -132
- package/src/prompt/markup/nodes.spec.js +0 -333
- package/src/prompt/markup/tokenizer.spec.js +0 -149
- package/src/prompt/markup/tokens.spec.js +0 -250
- package/src/prompt/validations.spec.js +0 -812
- package/src/utils/cost.full.spec.js +0 -272
- package/src/utils/cost.spec.js +0 -290
- package/src/utils/error_handler.spec.js +0 -230
- package/src/utils/file.spec.js +0 -89
- package/src/utils/image.spec.js +0 -20
- package/src/utils/legacy_cost_attribute.spec.js +0 -278
- package/src/utils/models.spec.js +0 -119
- package/src/utils/models_pricing.spec.js +0 -162
- package/src/utils/skills.spec.js +0 -168
- package/src/utils/sources.spec.js +0 -122
- package/src/utils/stream.spec.js +0 -55
- package/src/utils/tools.spec.js +0 -167
- package/src/utils/usage.full.spec.js +0 -215
- package/src/utils/usage.spec.js +0 -246
- package/src/utils/wrap.spec.js +0 -467
- package/src/validations.spec.js +0 -631
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
initialResponseMessages: [],
|
|
3
|
-
steps: [
|
|
4
|
-
{
|
|
5
|
-
callId: 'call-id',
|
|
6
|
-
stepNumber: 0,
|
|
7
|
-
model: {
|
|
8
|
-
provider: 'openai.responses',
|
|
9
|
-
modelId: 'gpt-4.1-mini'
|
|
10
|
-
},
|
|
11
|
-
runtimeContext: {},
|
|
12
|
-
toolsContext: {},
|
|
13
|
-
content: [
|
|
14
|
-
{
|
|
15
|
-
type: 'text',
|
|
16
|
-
text: 'A *carburetor* is a mechanical device in older gasoline engines that mixes air and fuel in the right proportions for combustion, which powers the engine.\n\nThe simplest way to think about a carburetor is like a faucet that controls how much fuel gets mixed with air before going into the engine. Getting this mix right is crucial because engines need a precise balance: too much fuel makes the engine run rich and waste gas; too little fuel makes it run lean and can cause damage.\n\nHere’s how a basic carburetor works:\n\n1. **Air enters** through an opening and flows through a narrow passage called the *venturi*. This narrow part speeds up the air, causing a drop in pressure.\n2. **Fuel is drawn in** from a small bowl into this low-pressure zone through a jet (a tiny hole). The pressure difference sucks fuel into the airflow.\n3. **Air and fuel mix** into a fine mist and move into the engine’s cylinders, where they ignite to produce power.\n\nFor example, when you press the gas pedal, you open a valve in the carburetor, letting more air in. This increased air flow draws more fuel to keep the mixture balanced, making the engine run faster.\n\nCarburetors can adjust mixtures for different conditions, like cold starts or high speeds, using devices like choke valves or accelerator pumps.\n\nToday, carburetors have mostly been replaced by *fuel injection systems*, which use electronics for more precise fuel control, improving efficiency and emissions. But understanding carburetors is still useful for older cars, motorcycles, and small engines like lawnmowers.\n\nIn summary, a carburetor’s job is to blend air and fuel in just the right way to keep an engine running smoothly, using clever mechanical designs based on air pressure differences. If you want to explore more, looking into how fuel injectors work would be a great next step, as they perform the same role but with modern technology.',
|
|
17
|
-
providerMetadata: {
|
|
18
|
-
openai: {
|
|
19
|
-
itemId: 'msg-id'
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
finishReason: 'stop',
|
|
25
|
-
usage: {
|
|
26
|
-
inputTokens: 1035,
|
|
27
|
-
inputTokenDetails: {
|
|
28
|
-
noCacheTokens: 1035,
|
|
29
|
-
cacheReadTokens: 0,
|
|
30
|
-
cacheWriteTokens: 0
|
|
31
|
-
},
|
|
32
|
-
outputTokens: 396,
|
|
33
|
-
outputTokenDetails: {
|
|
34
|
-
textTokens: 396,
|
|
35
|
-
reasoningTokens: 0
|
|
36
|
-
},
|
|
37
|
-
totalTokens: 1431,
|
|
38
|
-
raw: {
|
|
39
|
-
input_tokens: 1035,
|
|
40
|
-
input_tokens_details: {
|
|
41
|
-
cached_tokens: 0,
|
|
42
|
-
cache_write_tokens: 0
|
|
43
|
-
},
|
|
44
|
-
output_tokens: 396,
|
|
45
|
-
output_tokens_details: {
|
|
46
|
-
reasoning_tokens: 0
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
performance: {
|
|
51
|
-
effectiveOutputTokensPerSecond: 50.105171013339834,
|
|
52
|
-
effectiveTotalTokensPerSecond: 181.0618679800235,
|
|
53
|
-
stepTimeMs: 7903.56092,
|
|
54
|
-
responseTimeMs: 7903.375878999999,
|
|
55
|
-
toolExecutionMs: {}
|
|
56
|
-
},
|
|
57
|
-
warnings: [],
|
|
58
|
-
request: {},
|
|
59
|
-
response: {
|
|
60
|
-
id: 'resp-id',
|
|
61
|
-
timestamp: '2026-08-25T00:00:00.000Z',
|
|
62
|
-
modelId: 'gpt-4.1-mini-2025-04-14',
|
|
63
|
-
headers: {
|
|
64
|
-
'access-control-expose-headers': 'X-Request-ID, CF-Ray, CF-Ray',
|
|
65
|
-
'alt-svc': 'h3=":443"; ma=86400',
|
|
66
|
-
'cf-cache-status': 'DYNAMIC',
|
|
67
|
-
'cf-ray': 'cf-id',
|
|
68
|
-
connection: 'keep-alive',
|
|
69
|
-
'content-encoding': 'br',
|
|
70
|
-
'content-type': 'application/json',
|
|
71
|
-
date: 'Tue, 25 Aug 2026 00:00:00 GMT',
|
|
72
|
-
'openai-organization': 'org-id',
|
|
73
|
-
'openai-processing-ms': '7550',
|
|
74
|
-
'openai-project': 'proj-id',
|
|
75
|
-
'openai-version': '2020-10-01',
|
|
76
|
-
server: 'cloudflare',
|
|
77
|
-
'set-cookie': '__cf_bm=token; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com; Expires=Tue, 25 Aug 2026 00:00:00 GMT',
|
|
78
|
-
'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
|
|
79
|
-
'transfer-encoding': 'chunked',
|
|
80
|
-
'x-content-type-options': 'nosniff',
|
|
81
|
-
'x-ratelimit-limit-requests': '30000',
|
|
82
|
-
'x-ratelimit-limit-tokens': '150000000',
|
|
83
|
-
'x-ratelimit-remaining-requests': '29999',
|
|
84
|
-
'x-ratelimit-remaining-tokens': '149998945',
|
|
85
|
-
'x-ratelimit-reset-requests': '2ms',
|
|
86
|
-
'x-ratelimit-reset-tokens': '0s',
|
|
87
|
-
'x-request-id': 'req-id'
|
|
88
|
-
},
|
|
89
|
-
messages: [
|
|
90
|
-
{
|
|
91
|
-
role: 'assistant',
|
|
92
|
-
content: [
|
|
93
|
-
{
|
|
94
|
-
type: 'text',
|
|
95
|
-
text: 'A *carburetor* is a mechanical device in older gasoline engines that mixes air and fuel in the right proportions for combustion, which powers the engine.\n\nThe simplest way to think about a carburetor is like a faucet that controls how much fuel gets mixed with air before going into the engine. Getting this mix right is crucial because engines need a precise balance: too much fuel makes the engine run rich and waste gas; too little fuel makes it run lean and can cause damage.\n\nHere’s how a basic carburetor works:\n\n1. **Air enters** through an opening and flows through a narrow passage called the *venturi*. This narrow part speeds up the air, causing a drop in pressure.\n2. **Fuel is drawn in** from a small bowl into this low-pressure zone through a jet (a tiny hole). The pressure difference sucks fuel into the airflow.\n3. **Air and fuel mix** into a fine mist and move into the engine’s cylinders, where they ignite to produce power.\n\nFor example, when you press the gas pedal, you open a valve in the carburetor, letting more air in. This increased air flow draws more fuel to keep the mixture balanced, making the engine run faster.\n\nCarburetors can adjust mixtures for different conditions, like cold starts or high speeds, using devices like choke valves or accelerator pumps.\n\nToday, carburetors have mostly been replaced by *fuel injection systems*, which use electronics for more precise fuel control, improving efficiency and emissions. But understanding carburetors is still useful for older cars, motorcycles, and small engines like lawnmowers.\n\nIn summary, a carburetor’s job is to blend air and fuel in just the right way to keep an engine running smoothly, using clever mechanical designs based on air pressure differences. If you want to explore more, looking into how fuel injectors work would be a great next step, as they perform the same role but with modern technology.',
|
|
96
|
-
providerOptions: {
|
|
97
|
-
openai: {
|
|
98
|
-
itemId: 'msg-id'
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
},
|
|
106
|
-
providerMetadata: {
|
|
107
|
-
openai: {
|
|
108
|
-
responseId: 'resp-id',
|
|
109
|
-
serviceTier: 'default'
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
_output: 'A *carburetor* is a mechanical device in older gasoline engines that mixes air and fuel in the right proportions for combustion, which powers the engine.\n\nThe simplest way to think about a carburetor is like a faucet that controls how much fuel gets mixed with air before going into the engine. Getting this mix right is crucial because engines need a precise balance: too much fuel makes the engine run rich and waste gas; too little fuel makes it run lean and can cause damage.\n\nHere’s how a basic carburetor works:\n\n1. **Air enters** through an opening and flows through a narrow passage called the *venturi*. This narrow part speeds up the air, causing a drop in pressure.\n2. **Fuel is drawn in** from a small bowl into this low-pressure zone through a jet (a tiny hole). The pressure difference sucks fuel into the airflow.\n3. **Air and fuel mix** into a fine mist and move into the engine’s cylinders, where they ignite to produce power.\n\nFor example, when you press the gas pedal, you open a valve in the carburetor, letting more air in. This increased air flow draws more fuel to keep the mixture balanced, making the engine run faster.\n\nCarburetors can adjust mixtures for different conditions, like cold starts or high speeds, using devices like choke valves or accelerator pumps.\n\nToday, carburetors have mostly been replaced by *fuel injection systems*, which use electronics for more precise fuel control, improving efficiency and emissions. But understanding carburetors is still useful for older cars, motorcycles, and small engines like lawnmowers.\n\nIn summary, a carburetor’s job is to blend air and fuel in just the right way to keep an engine running smoothly, using clever mechanical designs based on air pressure differences. If you want to explore more, looking into how fuel injectors work would be a great next step, as they perform the same role but with modern technology.',
|
|
115
|
-
totalUsage: {
|
|
116
|
-
inputTokens: 1035,
|
|
117
|
-
inputTokenDetails: {
|
|
118
|
-
noCacheTokens: 1035,
|
|
119
|
-
cacheReadTokens: 0,
|
|
120
|
-
cacheWriteTokens: 0
|
|
121
|
-
},
|
|
122
|
-
outputTokens: 396,
|
|
123
|
-
outputTokenDetails: {
|
|
124
|
-
textTokens: 396,
|
|
125
|
-
reasoningTokens: 0
|
|
126
|
-
},
|
|
127
|
-
totalTokens: 1431
|
|
128
|
-
},
|
|
129
|
-
// these are getters only
|
|
130
|
-
finalStep: {
|
|
131
|
-
callId: 'call-id',
|
|
132
|
-
stepNumber: 0,
|
|
133
|
-
model: {
|
|
134
|
-
provider: 'openai.responses',
|
|
135
|
-
modelId: 'gpt-4.1-mini'
|
|
136
|
-
},
|
|
137
|
-
runtimeContext: {},
|
|
138
|
-
toolsContext: {},
|
|
139
|
-
content: [
|
|
140
|
-
{
|
|
141
|
-
type: 'text',
|
|
142
|
-
text: 'A *carburetor* is a mechanical device in older gasoline engines that mixes air and fuel in the right proportions for combustion, which powers the engine.\n\nThe simplest way to think about a carburetor is like a faucet that controls how much fuel gets mixed with air before going into the engine. Getting this mix right is crucial because engines need a precise balance: too much fuel makes the engine run rich and waste gas; too little fuel makes it run lean and can cause damage.\n\nHere’s how a basic carburetor works:\n\n1. **Air enters** through an opening and flows through a narrow passage called the *venturi*. This narrow part speeds up the air, causing a drop in pressure.\n2. **Fuel is drawn in** from a small bowl into this low-pressure zone through a jet (a tiny hole). The pressure difference sucks fuel into the airflow.\n3. **Air and fuel mix** into a fine mist and move into the engine’s cylinders, where they ignite to produce power.\n\nFor example, when you press the gas pedal, you open a valve in the carburetor, letting more air in. This increased air flow draws more fuel to keep the mixture balanced, making the engine run faster.\n\nCarburetors can adjust mixtures for different conditions, like cold starts or high speeds, using devices like choke valves or accelerator pumps.\n\nToday, carburetors have mostly been replaced by *fuel injection systems*, which use electronics for more precise fuel control, improving efficiency and emissions. But understanding carburetors is still useful for older cars, motorcycles, and small engines like lawnmowers.\n\nIn summary, a carburetor’s job is to blend air and fuel in just the right way to keep an engine running smoothly, using clever mechanical designs based on air pressure differences. If you want to explore more, looking into how fuel injectors work would be a great next step, as they perform the same role but with modern technology.',
|
|
143
|
-
providerMetadata: {
|
|
144
|
-
openai: {
|
|
145
|
-
itemId: 'msg-id'
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
finishReason: 'stop',
|
|
151
|
-
usage: {
|
|
152
|
-
inputTokens: 1035,
|
|
153
|
-
inputTokenDetails: {
|
|
154
|
-
noCacheTokens: 1035,
|
|
155
|
-
cacheReadTokens: 0,
|
|
156
|
-
cacheWriteTokens: 0
|
|
157
|
-
},
|
|
158
|
-
outputTokens: 396,
|
|
159
|
-
outputTokenDetails: {
|
|
160
|
-
textTokens: 396,
|
|
161
|
-
reasoningTokens: 0
|
|
162
|
-
},
|
|
163
|
-
totalTokens: 1431,
|
|
164
|
-
raw: {
|
|
165
|
-
input_tokens: 1035,
|
|
166
|
-
input_tokens_details: {
|
|
167
|
-
cached_tokens: 0,
|
|
168
|
-
cache_write_tokens: 0
|
|
169
|
-
},
|
|
170
|
-
output_tokens: 396,
|
|
171
|
-
output_tokens_details: {
|
|
172
|
-
reasoning_tokens: 0
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
performance: {
|
|
177
|
-
effectiveOutputTokensPerSecond: 50.105171013339834,
|
|
178
|
-
effectiveTotalTokensPerSecond: 181.0618679800235,
|
|
179
|
-
stepTimeMs: 7903.56092,
|
|
180
|
-
responseTimeMs: 7903.375878999999,
|
|
181
|
-
toolExecutionMs: {}
|
|
182
|
-
},
|
|
183
|
-
warnings: [],
|
|
184
|
-
request: {},
|
|
185
|
-
response: {
|
|
186
|
-
id: 'resp-id',
|
|
187
|
-
timestamp: '2026-08-25T00:00:00.000Z',
|
|
188
|
-
modelId: 'gpt-4.1-mini-2025-04-14',
|
|
189
|
-
headers: {
|
|
190
|
-
'access-control-expose-headers': 'X-Request-ID, CF-Ray, CF-Ray',
|
|
191
|
-
'alt-svc': 'h3=":443"; ma=86400',
|
|
192
|
-
'cf-cache-status': 'DYNAMIC',
|
|
193
|
-
'cf-ray': 'cf-id',
|
|
194
|
-
connection: 'keep-alive',
|
|
195
|
-
'content-encoding': 'br',
|
|
196
|
-
'content-type': 'application/json',
|
|
197
|
-
date: 'Tue, 25 Aug 2026 00:00:00 GMT',
|
|
198
|
-
'openai-organization': 'org-id',
|
|
199
|
-
'openai-processing-ms': '7550',
|
|
200
|
-
'openai-project': 'proj-id',
|
|
201
|
-
'openai-version': '2020-10-01',
|
|
202
|
-
server: 'cloudflare',
|
|
203
|
-
'set-cookie': '__cf_bm=token; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com; Expires=Tue, 25 Aug 2026 00:00:00 GMT',
|
|
204
|
-
'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
|
|
205
|
-
'transfer-encoding': 'chunked',
|
|
206
|
-
'x-content-type-options': 'nosniff',
|
|
207
|
-
'x-ratelimit-limit-requests': '30000',
|
|
208
|
-
'x-ratelimit-limit-tokens': '150000000',
|
|
209
|
-
'x-ratelimit-remaining-requests': '29999',
|
|
210
|
-
'x-ratelimit-remaining-tokens': '149998945',
|
|
211
|
-
'x-ratelimit-reset-requests': '2ms',
|
|
212
|
-
'x-ratelimit-reset-tokens': '0s',
|
|
213
|
-
'x-request-id': 'req-id'
|
|
214
|
-
},
|
|
215
|
-
messages: [
|
|
216
|
-
{
|
|
217
|
-
role: 'assistant',
|
|
218
|
-
content: [
|
|
219
|
-
{
|
|
220
|
-
type: 'text',
|
|
221
|
-
text: 'A *carburetor* is a mechanical device in older gasoline engines that mixes air and fuel in the right proportions for combustion, which powers the engine.\n\nThe simplest way to think about a carburetor is like a faucet that controls how much fuel gets mixed with air before going into the engine. Getting this mix right is crucial because engines need a precise balance: too much fuel makes the engine run rich and waste gas; too little fuel makes it run lean and can cause damage.\n\nHere’s how a basic carburetor works:\n\n1. **Air enters** through an opening and flows through a narrow passage called the *venturi*. This narrow part speeds up the air, causing a drop in pressure.\n2. **Fuel is drawn in** from a small bowl into this low-pressure zone through a jet (a tiny hole). The pressure difference sucks fuel into the airflow.\n3. **Air and fuel mix** into a fine mist and move into the engine’s cylinders, where they ignite to produce power.\n\nFor example, when you press the gas pedal, you open a valve in the carburetor, letting more air in. This increased air flow draws more fuel to keep the mixture balanced, making the engine run faster.\n\nCarburetors can adjust mixtures for different conditions, like cold starts or high speeds, using devices like choke valves or accelerator pumps.\n\nToday, carburetors have mostly been replaced by *fuel injection systems*, which use electronics for more precise fuel control, improving efficiency and emissions. But understanding carburetors is still useful for older cars, motorcycles, and small engines like lawnmowers.\n\nIn summary, a carburetor’s job is to blend air and fuel in just the right way to keep an engine running smoothly, using clever mechanical designs based on air pressure differences. If you want to explore more, looking into how fuel injectors work would be a great next step, as they perform the same role but with modern technology.',
|
|
222
|
-
providerOptions: {
|
|
223
|
-
openai: {
|
|
224
|
-
itemId: 'msg-id'
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
]
|
|
229
|
-
}
|
|
230
|
-
]
|
|
231
|
-
},
|
|
232
|
-
providerMetadata: {
|
|
233
|
-
openai: {
|
|
234
|
-
responseId: 'resp-id',
|
|
235
|
-
serviceTier: 'default'
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
content: [
|
|
240
|
-
{
|
|
241
|
-
type: 'text',
|
|
242
|
-
text: 'A *carburetor* is a mechanical device in older gasoline engines that mixes air and fuel in the right proportions for combustion, which powers the engine.\n\nThe simplest way to think about a carburetor is like a faucet that controls how much fuel gets mixed with air before going into the engine. Getting this mix right is crucial because engines need a precise balance: too much fuel makes the engine run rich and waste gas; too little fuel makes it run lean and can cause damage.\n\nHere’s how a basic carburetor works:\n\n1. **Air enters** through an opening and flows through a narrow passage called the *venturi*. This narrow part speeds up the air, causing a drop in pressure.\n2. **Fuel is drawn in** from a small bowl into this low-pressure zone through a jet (a tiny hole). The pressure difference sucks fuel into the airflow.\n3. **Air and fuel mix** into a fine mist and move into the engine’s cylinders, where they ignite to produce power.\n\nFor example, when you press the gas pedal, you open a valve in the carburetor, letting more air in. This increased air flow draws more fuel to keep the mixture balanced, making the engine run faster.\n\nCarburetors can adjust mixtures for different conditions, like cold starts or high speeds, using devices like choke valves or accelerator pumps.\n\nToday, carburetors have mostly been replaced by *fuel injection systems*, which use electronics for more precise fuel control, improving efficiency and emissions. But understanding carburetors is still useful for older cars, motorcycles, and small engines like lawnmowers.\n\nIn summary, a carburetor’s job is to blend air and fuel in just the right way to keep an engine running smoothly, using clever mechanical designs based on air pressure differences. If you want to explore more, looking into how fuel injectors work would be a great next step, as they perform the same role but with modern technology.',
|
|
243
|
-
providerMetadata: {
|
|
244
|
-
openai: {
|
|
245
|
-
itemId: 'msg-id'
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
],
|
|
250
|
-
text: 'A *carburetor* is a mechanical device in older gasoline engines that mixes air and fuel in the right proportions for combustion, which powers the engine.\n\nThe simplest way to think about a carburetor is like a faucet that controls how much fuel gets mixed with air before going into the engine. Getting this mix right is crucial because engines need a precise balance: too much fuel makes the engine run rich and waste gas; too little fuel makes it run lean and can cause damage.\n\nHere’s how a basic carburetor works:\n\n1. **Air enters** through an opening and flows through a narrow passage called the *venturi*. This narrow part speeds up the air, causing a drop in pressure.\n2. **Fuel is drawn in** from a small bowl into this low-pressure zone through a jet (a tiny hole). The pressure difference sucks fuel into the airflow.\n3. **Air and fuel mix** into a fine mist and move into the engine’s cylinders, where they ignite to produce power.\n\nFor example, when you press the gas pedal, you open a valve in the carburetor, letting more air in. This increased air flow draws more fuel to keep the mixture balanced, making the engine run faster.\n\nCarburetors can adjust mixtures for different conditions, like cold starts or high speeds, using devices like choke valves or accelerator pumps.\n\nToday, carburetors have mostly been replaced by *fuel injection systems*, which use electronics for more precise fuel control, improving efficiency and emissions. But understanding carburetors is still useful for older cars, motorcycles, and small engines like lawnmowers.\n\nIn summary, a carburetor’s job is to blend air and fuel in just the right way to keep an engine running smoothly, using clever mechanical designs based on air pressure differences. If you want to explore more, looking into how fuel injectors work would be a great next step, as they perform the same role but with modern technology.',
|
|
251
|
-
files: [],
|
|
252
|
-
reasoning: [],
|
|
253
|
-
toolCalls: [],
|
|
254
|
-
staticToolCalls: [],
|
|
255
|
-
dynamicToolCalls: [],
|
|
256
|
-
toolResults: [],
|
|
257
|
-
staticToolResults: [],
|
|
258
|
-
dynamicToolResults: [],
|
|
259
|
-
sources: [],
|
|
260
|
-
finishReason: 'stop',
|
|
261
|
-
warnings: [],
|
|
262
|
-
providerMetadata: {
|
|
263
|
-
openai: {
|
|
264
|
-
responseId: 'resp-id',
|
|
265
|
-
serviceTier: 'default'
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
response: {
|
|
269
|
-
id: 'resp-id',
|
|
270
|
-
timestamp: '2026-08-25T00:00:00.000Z',
|
|
271
|
-
modelId: 'gpt-4.1-mini-2025-04-14',
|
|
272
|
-
headers: {
|
|
273
|
-
'access-control-expose-headers': 'X-Request-ID, CF-Ray, CF-Ray',
|
|
274
|
-
'alt-svc': 'h3=":443"; ma=86400',
|
|
275
|
-
'cf-cache-status': 'DYNAMIC',
|
|
276
|
-
'cf-ray': 'cf-id',
|
|
277
|
-
connection: 'keep-alive',
|
|
278
|
-
'content-encoding': 'br',
|
|
279
|
-
'content-type': 'application/json',
|
|
280
|
-
date: 'Tue, 25 Aug 2026 00:00:00 GMT',
|
|
281
|
-
'openai-organization': 'org-id',
|
|
282
|
-
'openai-processing-ms': '7550',
|
|
283
|
-
'openai-project': 'proj-id',
|
|
284
|
-
'openai-version': '2020-10-01',
|
|
285
|
-
server: 'cloudflare',
|
|
286
|
-
'set-cookie': '__cf_bm=token; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com; Expires=Tue, 25 Aug 2026 00:00:00 GMT',
|
|
287
|
-
'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
|
|
288
|
-
'transfer-encoding': 'chunked',
|
|
289
|
-
'x-content-type-options': 'nosniff',
|
|
290
|
-
'x-ratelimit-limit-requests': '30000',
|
|
291
|
-
'x-ratelimit-limit-tokens': '150000000',
|
|
292
|
-
'x-ratelimit-remaining-requests': '29999',
|
|
293
|
-
'x-ratelimit-remaining-tokens': '149998945',
|
|
294
|
-
'x-ratelimit-reset-requests': '2ms',
|
|
295
|
-
'x-ratelimit-reset-tokens': '0s',
|
|
296
|
-
'x-request-id': 'req-id'
|
|
297
|
-
},
|
|
298
|
-
messages: [
|
|
299
|
-
{
|
|
300
|
-
role: 'assistant',
|
|
301
|
-
content: [
|
|
302
|
-
{
|
|
303
|
-
type: 'text',
|
|
304
|
-
text: 'A *carburetor* is a mechanical device in older gasoline engines that mixes air and fuel in the right proportions for combustion, which powers the engine.\n\nThe simplest way to think about a carburetor is like a faucet that controls how much fuel gets mixed with air before going into the engine. Getting this mix right is crucial because engines need a precise balance: too much fuel makes the engine run rich and waste gas; too little fuel makes it run lean and can cause damage.\n\nHere’s how a basic carburetor works:\n\n1. **Air enters** through an opening and flows through a narrow passage called the *venturi*. This narrow part speeds up the air, causing a drop in pressure.\n2. **Fuel is drawn in** from a small bowl into this low-pressure zone through a jet (a tiny hole). The pressure difference sucks fuel into the airflow.\n3. **Air and fuel mix** into a fine mist and move into the engine’s cylinders, where they ignite to produce power.\n\nFor example, when you press the gas pedal, you open a valve in the carburetor, letting more air in. This increased air flow draws more fuel to keep the mixture balanced, making the engine run faster.\n\nCarburetors can adjust mixtures for different conditions, like cold starts or high speeds, using devices like choke valves or accelerator pumps.\n\nToday, carburetors have mostly been replaced by *fuel injection systems*, which use electronics for more precise fuel control, improving efficiency and emissions. But understanding carburetors is still useful for older cars, motorcycles, and small engines like lawnmowers.\n\nIn summary, a carburetor’s job is to blend air and fuel in just the right way to keep an engine running smoothly, using clever mechanical designs based on air pressure differences. If you want to explore more, looking into how fuel injectors work would be a great next step, as they perform the same role but with modern technology.',
|
|
305
|
-
providerOptions: {
|
|
306
|
-
openai: {
|
|
307
|
-
itemId: 'msg-id'
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
]
|
|
312
|
-
}
|
|
313
|
-
]
|
|
314
|
-
},
|
|
315
|
-
responseMessages: [
|
|
316
|
-
{
|
|
317
|
-
role: 'assistant',
|
|
318
|
-
content: [
|
|
319
|
-
{
|
|
320
|
-
type: 'text',
|
|
321
|
-
text: 'A *carburetor* is a mechanical device in older gasoline engines that mixes air and fuel in the right proportions for combustion, which powers the engine.\n\nThe simplest way to think about a carburetor is like a faucet that controls how much fuel gets mixed with air before going into the engine. Getting this mix right is crucial because engines need a precise balance: too much fuel makes the engine run rich and waste gas; too little fuel makes it run lean and can cause damage.\n\nHere’s how a basic carburetor works:\n\n1. **Air enters** through an opening and flows through a narrow passage called the *venturi*. This narrow part speeds up the air, causing a drop in pressure.\n2. **Fuel is drawn in** from a small bowl into this low-pressure zone through a jet (a tiny hole). The pressure difference sucks fuel into the airflow.\n3. **Air and fuel mix** into a fine mist and move into the engine’s cylinders, where they ignite to produce power.\n\nFor example, when you press the gas pedal, you open a valve in the carburetor, letting more air in. This increased air flow draws more fuel to keep the mixture balanced, making the engine run faster.\n\nCarburetors can adjust mixtures for different conditions, like cold starts or high speeds, using devices like choke valves or accelerator pumps.\n\nToday, carburetors have mostly been replaced by *fuel injection systems*, which use electronics for more precise fuel control, improving efficiency and emissions. But understanding carburetors is still useful for older cars, motorcycles, and small engines like lawnmowers.\n\nIn summary, a carburetor’s job is to blend air and fuel in just the right way to keep an engine running smoothly, using clever mechanical designs based on air pressure differences. If you want to explore more, looking into how fuel injectors work would be a great next step, as they perform the same role but with modern technology.',
|
|
322
|
-
providerOptions: {
|
|
323
|
-
openai: {
|
|
324
|
-
itemId: 'msg-id'
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
]
|
|
329
|
-
}
|
|
330
|
-
],
|
|
331
|
-
request: {},
|
|
332
|
-
usage: {
|
|
333
|
-
inputTokens: 1035,
|
|
334
|
-
inputTokenDetails: {
|
|
335
|
-
noCacheTokens: 1035,
|
|
336
|
-
cacheReadTokens: 0,
|
|
337
|
-
cacheWriteTokens: 0
|
|
338
|
-
},
|
|
339
|
-
outputTokens: 396,
|
|
340
|
-
outputTokenDetails: {
|
|
341
|
-
textTokens: 396,
|
|
342
|
-
reasoningTokens: 0
|
|
343
|
-
},
|
|
344
|
-
totalTokens: 1431
|
|
345
|
-
},
|
|
346
|
-
output: 'A *carburetor* is a mechanical device in older gasoline engines that mixes air and fuel in the right proportions for combustion, which powers the engine.\n\nThe simplest way to think about a carburetor is like a faucet that controls how much fuel gets mixed with air before going into the engine. Getting this mix right is crucial because engines need a precise balance: too much fuel makes the engine run rich and waste gas; too little fuel makes it run lean and can cause damage.\n\nHere’s how a basic carburetor works:\n\n1. **Air enters** through an opening and flows through a narrow passage called the *venturi*. This narrow part speeds up the air, causing a drop in pressure.\n2. **Fuel is drawn in** from a small bowl into this low-pressure zone through a jet (a tiny hole). The pressure difference sucks fuel into the airflow.\n3. **Air and fuel mix** into a fine mist and move into the engine’s cylinders, where they ignite to produce power.\n\nFor example, when you press the gas pedal, you open a valve in the carburetor, letting more air in. This increased air flow draws more fuel to keep the mixture balanced, making the engine run faster.\n\nCarburetors can adjust mixtures for different conditions, like cold starts or high speeds, using devices like choke valves or accelerator pumps.\n\nToday, carburetors have mostly been replaced by *fuel injection systems*, which use electronics for more precise fuel control, improving efficiency and emissions. But understanding carburetors is still useful for older cars, motorcycles, and small engines like lawnmowers.\n\nIn summary, a carburetor’s job is to blend air and fuel in just the right way to keep an engine running smoothly, using clever mechanical designs based on air pressure differences. If you want to explore more, looking into how fuel injectors work would be a great next step, as they perform the same role but with modern technology.'
|
|
347
|
-
};
|