@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,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
- };