@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,77 +0,0 @@
|
|
|
1
|
-
const base64 = 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAfUlEQVR4Xu3VQREAIAwEMWqnD/y7AyGblcDQy+zed8KNB/ADnIANCG+gEaQABShAAQpgMBwFKEABClAgjAAFKEABClCAAhgMRwEKUIACFAgjQAEKUIACFKAABsNRgAIUoAAFwghQgAIUoAAFKIDBcBSgAAUoQIEwAhTIK/ABN/RggaSa6FYAAAAASUVORK5CYII=';
|
|
2
|
-
const bytes = [
|
|
3
|
-
137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 64, 0, 0, 0, 64,
|
|
4
|
-
8, 6, 0, 0, 0, 170, 105, 113, 222, 0, 0, 0, 125, 73, 68, 65, 84, 120, 94, 237, 213, 65, 17,
|
|
5
|
-
0, 32, 12, 4, 49, 106, 167, 15, 252, 187, 3, 33, 155, 149, 192, 208, 203, 236, 222, 119, 194,
|
|
6
|
-
141, 7, 240, 3, 156, 128, 13, 8, 111, 160, 17, 164, 0, 5, 40, 64, 1, 10, 96, 48, 28, 5, 40,
|
|
7
|
-
64, 1, 10, 80, 32, 140, 0, 5, 40, 64, 1, 10, 80, 128, 2, 24, 12, 71, 1, 10, 80, 128, 2, 20,
|
|
8
|
-
8, 35, 64, 1, 10, 80, 128, 2, 20, 160, 0, 6, 195, 81, 128, 2, 20, 160, 0, 5, 194, 8, 80,
|
|
9
|
-
128, 2, 20, 160, 0, 5, 40, 128, 193, 112, 20, 160, 0, 5, 40, 64, 129, 48, 2, 20, 200, 43,
|
|
10
|
-
240, 1, 55, 244, 96, 129, 164, 154, 232, 86, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
images: [
|
|
15
|
-
{
|
|
16
|
-
base64Data: base64,
|
|
17
|
-
mediaType: 'image/png',
|
|
18
|
-
// getters
|
|
19
|
-
base64,
|
|
20
|
-
uint8Array: new Uint8Array( bytes )
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
warnings: [],
|
|
24
|
-
responses: [
|
|
25
|
-
{
|
|
26
|
-
timestamp: '2026-08-25T10:46:40.310Z',
|
|
27
|
-
modelId: 'gpt-image-1',
|
|
28
|
-
headers: {
|
|
29
|
-
'access-control-expose-headers': 'X-Request-ID, CF-Ray',
|
|
30
|
-
'alt-svc': 'h3=":443"; ma=86400',
|
|
31
|
-
'cf-cache-status': 'DYNAMIC',
|
|
32
|
-
'cf-ray': 'cf-id',
|
|
33
|
-
connection: 'keep-alive',
|
|
34
|
-
'content-encoding': 'br',
|
|
35
|
-
'content-type': 'application/json',
|
|
36
|
-
date: 'Tue, 25 Aug 2026 10:47:21 GMT',
|
|
37
|
-
'openai-organization': 'org-id',
|
|
38
|
-
'openai-processing-ms': '41337',
|
|
39
|
-
'openai-project': 'proj-id',
|
|
40
|
-
'openai-version': '2020-10-01',
|
|
41
|
-
server: 'cloudflare',
|
|
42
|
-
'set-cookie': '__cf_bm=token; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com; Expires=Tue, 25 Aug 2026 00:00:00 GMT',
|
|
43
|
-
'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
|
|
44
|
-
'transfer-encoding': 'chunked',
|
|
45
|
-
'x-content-type-options': 'nosniff',
|
|
46
|
-
'x-request-id': 'req_id'
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
providerMetadata: {
|
|
51
|
-
openai: {
|
|
52
|
-
images: [
|
|
53
|
-
{
|
|
54
|
-
created: 1787610084,
|
|
55
|
-
size: '1024x1024',
|
|
56
|
-
quality: 'high',
|
|
57
|
-
background: 'opaque',
|
|
58
|
-
outputFormat: 'png',
|
|
59
|
-
imageTokens: 0,
|
|
60
|
-
textTokens: 151
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
usage: {
|
|
66
|
-
inputTokens: 151,
|
|
67
|
-
outputTokens: 4160,
|
|
68
|
-
totalTokens: 4311
|
|
69
|
-
},
|
|
70
|
-
image: {
|
|
71
|
-
base64Data: base64,
|
|
72
|
-
mediaType: 'image/png',
|
|
73
|
-
// getters
|
|
74
|
-
base64,
|
|
75
|
-
uint8Array: new Uint8Array( bytes )
|
|
76
|
-
}
|
|
77
|
-
};
|