@discomedia/utils 1.0.71 → 1.0.74
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/dist/index-frontend.cjs +755 -43
- package/dist/index-frontend.cjs.map +1 -1
- package/dist/index-frontend.mjs +755 -44
- package/dist/index-frontend.mjs.map +1 -1
- package/dist/index.cjs +843 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +843 -50
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +4 -4
- package/dist/test.js +4923 -11958
- package/dist/test.js.map +1 -1
- package/dist/types/index-frontend.d.ts +2 -1
- package/dist/types/index-frontend.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/llm-config.d.ts +3 -3
- package/dist/types/llm-config.d.ts.map +1 -1
- package/dist/types/llm-openai.d.ts +9 -2
- package/dist/types/llm-openai.d.ts.map +1 -1
- package/dist/types/types/llm-types.d.ts +50 -3
- package/dist/types/types/llm-types.d.ts.map +1 -1
- package/dist/types-frontend/index-frontend.d.ts +2 -1
- package/dist/types-frontend/index-frontend.d.ts.map +1 -1
- package/dist/types-frontend/index.d.ts +2 -1
- package/dist/types-frontend/index.d.ts.map +1 -1
- package/dist/types-frontend/llm-config.d.ts +3 -3
- package/dist/types-frontend/llm-config.d.ts.map +1 -1
- package/dist/types-frontend/llm-openai.d.ts +9 -2
- package/dist/types-frontend/llm-openai.d.ts.map +1 -1
- package/dist/types-frontend/types/llm-types.d.ts +50 -3
- package/dist/types-frontend/types/llm-types.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var require$$0$3 = require('events');
|
|
4
4
|
var require$$1 = require('https');
|
|
5
|
-
var require$$2 = require('http');
|
|
5
|
+
var require$$2$1 = require('http');
|
|
6
6
|
var require$$3$1 = require('net');
|
|
7
7
|
var require$$4 = require('tls');
|
|
8
8
|
var require$$3 = require('crypto');
|
|
@@ -10,9 +10,10 @@ var require$$0$2 = require('stream');
|
|
|
10
10
|
var require$$7 = require('url');
|
|
11
11
|
var require$$0 = require('zlib');
|
|
12
12
|
var require$$0$1 = require('buffer');
|
|
13
|
+
var require$$2 = require('util');
|
|
13
14
|
var require$$0$4 = require('fs');
|
|
14
15
|
var require$$1$1 = require('path');
|
|
15
|
-
var require$$2$
|
|
16
|
+
var require$$2$2 = require('os');
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Logs a message to the console.
|
|
@@ -1148,6 +1149,7 @@ const OPENAI_MODELS = [
|
|
|
1148
1149
|
'gpt-5',
|
|
1149
1150
|
'gpt-5-mini',
|
|
1150
1151
|
'gpt-5.4-mini',
|
|
1152
|
+
'gpt-5.4-nano',
|
|
1151
1153
|
'gpt-5-nano',
|
|
1152
1154
|
'gpt-5.1',
|
|
1153
1155
|
'gpt-5.4',
|
|
@@ -1190,6 +1192,7 @@ const OPENROUTER_MODELS = [
|
|
|
1190
1192
|
'openai/gpt-5',
|
|
1191
1193
|
'openai/gpt-5-mini',
|
|
1192
1194
|
'openai/gpt-5.4-mini',
|
|
1195
|
+
'openai/gpt-5.4-nano',
|
|
1193
1196
|
'openai/gpt-5-nano',
|
|
1194
1197
|
'openai/gpt-5.1',
|
|
1195
1198
|
'openai/gpt-5.4',
|
|
@@ -1700,7 +1703,7 @@ const safeJSON = (text) => {
|
|
|
1700
1703
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
1701
1704
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
1702
1705
|
|
|
1703
|
-
const VERSION = '6.
|
|
1706
|
+
const VERSION = '6.39.0'; // x-release-please-version
|
|
1704
1707
|
|
|
1705
1708
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
1706
1709
|
const isRunningInBrowser = () => {
|
|
@@ -3149,19 +3152,22 @@ class WorkloadIdentityAuth {
|
|
|
3149
3152
|
}
|
|
3150
3153
|
async refreshToken() {
|
|
3151
3154
|
const subjectToken = await this.config.provider.getToken();
|
|
3155
|
+
const body = {
|
|
3156
|
+
grant_type: TOKEN_EXCHANGE_GRANT_TYPE,
|
|
3157
|
+
subject_token: subjectToken,
|
|
3158
|
+
subject_token_type: SUBJECT_TOKEN_TYPES[this.config.provider.tokenType],
|
|
3159
|
+
identity_provider_id: this.config.identityProviderId,
|
|
3160
|
+
service_account_id: this.config.serviceAccountId,
|
|
3161
|
+
};
|
|
3162
|
+
if (this.config.clientId) {
|
|
3163
|
+
body['client_id'] = this.config.clientId;
|
|
3164
|
+
}
|
|
3152
3165
|
const response = await this.fetch(this.tokenExchangeUrl, {
|
|
3153
3166
|
method: 'POST',
|
|
3154
3167
|
headers: {
|
|
3155
3168
|
'Content-Type': 'application/json',
|
|
3156
3169
|
},
|
|
3157
|
-
body: JSON.stringify(
|
|
3158
|
-
grant_type: TOKEN_EXCHANGE_GRANT_TYPE,
|
|
3159
|
-
client_id: this.config.clientId,
|
|
3160
|
-
subject_token: subjectToken,
|
|
3161
|
-
subject_token_type: SUBJECT_TOKEN_TYPES[this.config.provider.tokenType],
|
|
3162
|
-
identity_provider_id: this.config.identityProviderId,
|
|
3163
|
-
service_account_id: this.config.serviceAccountId,
|
|
3164
|
-
}),
|
|
3170
|
+
body: JSON.stringify(body),
|
|
3165
3171
|
});
|
|
3166
3172
|
if (!response.ok) {
|
|
3167
3173
|
const errorText = await response.text();
|
|
@@ -5233,6 +5239,43 @@ let Certificates$1 = class Certificates extends APIResource {
|
|
|
5233
5239
|
}
|
|
5234
5240
|
};
|
|
5235
5241
|
|
|
5242
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
5243
|
+
let DataRetention$1 = class DataRetention extends APIResource {
|
|
5244
|
+
/**
|
|
5245
|
+
* Retrieves organization data retention controls.
|
|
5246
|
+
*
|
|
5247
|
+
* @example
|
|
5248
|
+
* ```ts
|
|
5249
|
+
* const organizationDataRetention =
|
|
5250
|
+
* await client.admin.organization.dataRetention.retrieve();
|
|
5251
|
+
* ```
|
|
5252
|
+
*/
|
|
5253
|
+
retrieve(options) {
|
|
5254
|
+
return this._client.get('/organization/data_retention', {
|
|
5255
|
+
...options,
|
|
5256
|
+
__security: { adminAPIKeyAuth: true },
|
|
5257
|
+
});
|
|
5258
|
+
}
|
|
5259
|
+
/**
|
|
5260
|
+
* Updates organization data retention controls.
|
|
5261
|
+
*
|
|
5262
|
+
* @example
|
|
5263
|
+
* ```ts
|
|
5264
|
+
* const organizationDataRetention =
|
|
5265
|
+
* await client.admin.organization.dataRetention.update({
|
|
5266
|
+
* retention_type: 'zero_data_retention',
|
|
5267
|
+
* });
|
|
5268
|
+
* ```
|
|
5269
|
+
*/
|
|
5270
|
+
update(body, options) {
|
|
5271
|
+
return this._client.post('/organization/data_retention', {
|
|
5272
|
+
body,
|
|
5273
|
+
...options,
|
|
5274
|
+
__security: { adminAPIKeyAuth: true },
|
|
5275
|
+
});
|
|
5276
|
+
}
|
|
5277
|
+
};
|
|
5278
|
+
|
|
5236
5279
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
5237
5280
|
class Invites extends APIResource {
|
|
5238
5281
|
/**
|
|
@@ -5329,6 +5372,22 @@ let Roles$5 = class Roles extends APIResource {
|
|
|
5329
5372
|
__security: { adminAPIKeyAuth: true },
|
|
5330
5373
|
});
|
|
5331
5374
|
}
|
|
5375
|
+
/**
|
|
5376
|
+
* Retrieves an organization role.
|
|
5377
|
+
*
|
|
5378
|
+
* @example
|
|
5379
|
+
* ```ts
|
|
5380
|
+
* const role = await client.admin.organization.roles.retrieve(
|
|
5381
|
+
* 'role_id',
|
|
5382
|
+
* );
|
|
5383
|
+
* ```
|
|
5384
|
+
*/
|
|
5385
|
+
retrieve(roleID, options) {
|
|
5386
|
+
return this._client.get(path `/organization/roles/${roleID}`, {
|
|
5387
|
+
...options,
|
|
5388
|
+
__security: { adminAPIKeyAuth: true },
|
|
5389
|
+
});
|
|
5390
|
+
}
|
|
5332
5391
|
/**
|
|
5333
5392
|
* Updates an existing organization role.
|
|
5334
5393
|
*
|
|
@@ -5382,6 +5441,92 @@ let Roles$5 = class Roles extends APIResource {
|
|
|
5382
5441
|
}
|
|
5383
5442
|
};
|
|
5384
5443
|
|
|
5444
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
5445
|
+
let SpendAlerts$1 = class SpendAlerts extends APIResource {
|
|
5446
|
+
/**
|
|
5447
|
+
* Creates an organization spend alert.
|
|
5448
|
+
*
|
|
5449
|
+
* @example
|
|
5450
|
+
* ```ts
|
|
5451
|
+
* const organizationSpendAlert =
|
|
5452
|
+
* await client.admin.organization.spendAlerts.create({
|
|
5453
|
+
* currency: 'USD',
|
|
5454
|
+
* interval: 'month',
|
|
5455
|
+
* notification_channel: {
|
|
5456
|
+
* recipients: ['string'],
|
|
5457
|
+
* type: 'email',
|
|
5458
|
+
* },
|
|
5459
|
+
* threshold_amount: 0,
|
|
5460
|
+
* });
|
|
5461
|
+
* ```
|
|
5462
|
+
*/
|
|
5463
|
+
create(body, options) {
|
|
5464
|
+
return this._client.post('/organization/spend_alerts', {
|
|
5465
|
+
body,
|
|
5466
|
+
...options,
|
|
5467
|
+
__security: { adminAPIKeyAuth: true },
|
|
5468
|
+
});
|
|
5469
|
+
}
|
|
5470
|
+
/**
|
|
5471
|
+
* Updates an organization spend alert.
|
|
5472
|
+
*
|
|
5473
|
+
* @example
|
|
5474
|
+
* ```ts
|
|
5475
|
+
* const organizationSpendAlert =
|
|
5476
|
+
* await client.admin.organization.spendAlerts.update(
|
|
5477
|
+
* 'alert_id',
|
|
5478
|
+
* {
|
|
5479
|
+
* currency: 'USD',
|
|
5480
|
+
* interval: 'month',
|
|
5481
|
+
* notification_channel: {
|
|
5482
|
+
* recipients: ['string'],
|
|
5483
|
+
* type: 'email',
|
|
5484
|
+
* },
|
|
5485
|
+
* threshold_amount: 0,
|
|
5486
|
+
* },
|
|
5487
|
+
* );
|
|
5488
|
+
* ```
|
|
5489
|
+
*/
|
|
5490
|
+
update(alertID, body, options) {
|
|
5491
|
+
return this._client.post(path `/organization/spend_alerts/${alertID}`, {
|
|
5492
|
+
body,
|
|
5493
|
+
...options,
|
|
5494
|
+
__security: { adminAPIKeyAuth: true },
|
|
5495
|
+
});
|
|
5496
|
+
}
|
|
5497
|
+
/**
|
|
5498
|
+
* Lists organization spend alerts.
|
|
5499
|
+
*
|
|
5500
|
+
* @example
|
|
5501
|
+
* ```ts
|
|
5502
|
+
* // Automatically fetches more pages as needed.
|
|
5503
|
+
* for await (const organizationSpendAlert of client.admin.organization.spendAlerts.list()) {
|
|
5504
|
+
* // ...
|
|
5505
|
+
* }
|
|
5506
|
+
* ```
|
|
5507
|
+
*/
|
|
5508
|
+
list(query = {}, options) {
|
|
5509
|
+
return this._client.getAPIList('/organization/spend_alerts', (ConversationCursorPage), { query, ...options, __security: { adminAPIKeyAuth: true } });
|
|
5510
|
+
}
|
|
5511
|
+
/**
|
|
5512
|
+
* Deletes an organization spend alert.
|
|
5513
|
+
*
|
|
5514
|
+
* @example
|
|
5515
|
+
* ```ts
|
|
5516
|
+
* const organizationSpendAlertDeleted =
|
|
5517
|
+
* await client.admin.organization.spendAlerts.delete(
|
|
5518
|
+
* 'alert_id',
|
|
5519
|
+
* );
|
|
5520
|
+
* ```
|
|
5521
|
+
*/
|
|
5522
|
+
delete(alertID, options) {
|
|
5523
|
+
return this._client.delete(path `/organization/spend_alerts/${alertID}`, {
|
|
5524
|
+
...options,
|
|
5525
|
+
__security: { adminAPIKeyAuth: true },
|
|
5526
|
+
});
|
|
5527
|
+
}
|
|
5528
|
+
};
|
|
5529
|
+
|
|
5385
5530
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
5386
5531
|
class Usage extends APIResource {
|
|
5387
5532
|
/**
|
|
@@ -5492,6 +5637,24 @@ class Usage extends APIResource {
|
|
|
5492
5637
|
__security: { adminAPIKeyAuth: true },
|
|
5493
5638
|
});
|
|
5494
5639
|
}
|
|
5640
|
+
/**
|
|
5641
|
+
* Get file search calls usage details for the organization.
|
|
5642
|
+
*
|
|
5643
|
+
* @example
|
|
5644
|
+
* ```ts
|
|
5645
|
+
* const response =
|
|
5646
|
+
* await client.admin.organization.usage.fileSearchCalls({
|
|
5647
|
+
* start_time: 0,
|
|
5648
|
+
* });
|
|
5649
|
+
* ```
|
|
5650
|
+
*/
|
|
5651
|
+
fileSearchCalls(query, options) {
|
|
5652
|
+
return this._client.get('/organization/usage/file_search_calls', {
|
|
5653
|
+
query,
|
|
5654
|
+
...options,
|
|
5655
|
+
__security: { adminAPIKeyAuth: true },
|
|
5656
|
+
});
|
|
5657
|
+
}
|
|
5495
5658
|
/**
|
|
5496
5659
|
* Get images usage details for the organization.
|
|
5497
5660
|
*
|
|
@@ -5546,6 +5709,24 @@ class Usage extends APIResource {
|
|
|
5546
5709
|
__security: { adminAPIKeyAuth: true },
|
|
5547
5710
|
});
|
|
5548
5711
|
}
|
|
5712
|
+
/**
|
|
5713
|
+
* Get web search calls usage details for the organization.
|
|
5714
|
+
*
|
|
5715
|
+
* @example
|
|
5716
|
+
* ```ts
|
|
5717
|
+
* const response =
|
|
5718
|
+
* await client.admin.organization.usage.webSearchCalls({
|
|
5719
|
+
* start_time: 0,
|
|
5720
|
+
* });
|
|
5721
|
+
* ```
|
|
5722
|
+
*/
|
|
5723
|
+
webSearchCalls(query, options) {
|
|
5724
|
+
return this._client.get('/organization/usage/web_search_calls', {
|
|
5725
|
+
query,
|
|
5726
|
+
...options,
|
|
5727
|
+
__security: { adminAPIKeyAuth: true },
|
|
5728
|
+
});
|
|
5729
|
+
}
|
|
5549
5730
|
}
|
|
5550
5731
|
|
|
5551
5732
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
@@ -5569,6 +5750,25 @@ let Roles$4 = class Roles extends APIResource {
|
|
|
5569
5750
|
__security: { adminAPIKeyAuth: true },
|
|
5570
5751
|
});
|
|
5571
5752
|
}
|
|
5753
|
+
/**
|
|
5754
|
+
* Retrieves an organization role assigned to a group.
|
|
5755
|
+
*
|
|
5756
|
+
* @example
|
|
5757
|
+
* ```ts
|
|
5758
|
+
* const role =
|
|
5759
|
+
* await client.admin.organization.groups.roles.retrieve(
|
|
5760
|
+
* 'role_id',
|
|
5761
|
+
* { group_id: 'group_id' },
|
|
5762
|
+
* );
|
|
5763
|
+
* ```
|
|
5764
|
+
*/
|
|
5765
|
+
retrieve(roleID, params, options) {
|
|
5766
|
+
const { group_id } = params;
|
|
5767
|
+
return this._client.get(path `/organization/groups/${group_id}/roles/${roleID}`, {
|
|
5768
|
+
...options,
|
|
5769
|
+
__security: { adminAPIKeyAuth: true },
|
|
5770
|
+
});
|
|
5771
|
+
}
|
|
5572
5772
|
/**
|
|
5573
5773
|
* Lists the organization roles assigned to a group within the organization.
|
|
5574
5774
|
*
|
|
@@ -5627,6 +5827,25 @@ let Users$2 = class Users extends APIResource {
|
|
|
5627
5827
|
__security: { adminAPIKeyAuth: true },
|
|
5628
5828
|
});
|
|
5629
5829
|
}
|
|
5830
|
+
/**
|
|
5831
|
+
* Retrieves a user in a group.
|
|
5832
|
+
*
|
|
5833
|
+
* @example
|
|
5834
|
+
* ```ts
|
|
5835
|
+
* const user =
|
|
5836
|
+
* await client.admin.organization.groups.users.retrieve(
|
|
5837
|
+
* 'user_id',
|
|
5838
|
+
* { group_id: 'group_id' },
|
|
5839
|
+
* );
|
|
5840
|
+
* ```
|
|
5841
|
+
*/
|
|
5842
|
+
retrieve(userID, params, options) {
|
|
5843
|
+
const { group_id } = params;
|
|
5844
|
+
return this._client.get(path `/organization/groups/${group_id}/users/${userID}`, {
|
|
5845
|
+
...options,
|
|
5846
|
+
__security: { adminAPIKeyAuth: true },
|
|
5847
|
+
});
|
|
5848
|
+
}
|
|
5630
5849
|
/**
|
|
5631
5850
|
* Lists the users assigned to a group.
|
|
5632
5851
|
*
|
|
@@ -5688,6 +5907,23 @@ let Groups$1 = class Groups extends APIResource {
|
|
|
5688
5907
|
__security: { adminAPIKeyAuth: true },
|
|
5689
5908
|
});
|
|
5690
5909
|
}
|
|
5910
|
+
/**
|
|
5911
|
+
* Retrieves a group.
|
|
5912
|
+
*
|
|
5913
|
+
* @example
|
|
5914
|
+
* ```ts
|
|
5915
|
+
* const group =
|
|
5916
|
+
* await client.admin.organization.groups.retrieve(
|
|
5917
|
+
* 'group_id',
|
|
5918
|
+
* );
|
|
5919
|
+
* ```
|
|
5920
|
+
*/
|
|
5921
|
+
retrieve(groupID, options) {
|
|
5922
|
+
return this._client.get(path `/organization/groups/${groupID}`, {
|
|
5923
|
+
...options,
|
|
5924
|
+
__security: { adminAPIKeyAuth: true },
|
|
5925
|
+
});
|
|
5926
|
+
}
|
|
5691
5927
|
/**
|
|
5692
5928
|
* Updates a group's information.
|
|
5693
5929
|
*
|
|
@@ -5862,6 +6098,142 @@ class Certificates extends APIResource {
|
|
|
5862
6098
|
}
|
|
5863
6099
|
}
|
|
5864
6100
|
|
|
6101
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
6102
|
+
class DataRetention extends APIResource {
|
|
6103
|
+
/**
|
|
6104
|
+
* Retrieves project data retention controls.
|
|
6105
|
+
*
|
|
6106
|
+
* @example
|
|
6107
|
+
* ```ts
|
|
6108
|
+
* const projectDataRetention =
|
|
6109
|
+
* await client.admin.organization.projects.dataRetention.retrieve(
|
|
6110
|
+
* 'project_id',
|
|
6111
|
+
* );
|
|
6112
|
+
* ```
|
|
6113
|
+
*/
|
|
6114
|
+
retrieve(projectID, options) {
|
|
6115
|
+
return this._client.get(path `/organization/projects/${projectID}/data_retention`, {
|
|
6116
|
+
...options,
|
|
6117
|
+
__security: { adminAPIKeyAuth: true },
|
|
6118
|
+
});
|
|
6119
|
+
}
|
|
6120
|
+
/**
|
|
6121
|
+
* Updates project data retention controls.
|
|
6122
|
+
*
|
|
6123
|
+
* @example
|
|
6124
|
+
* ```ts
|
|
6125
|
+
* const projectDataRetention =
|
|
6126
|
+
* await client.admin.organization.projects.dataRetention.update(
|
|
6127
|
+
* 'project_id',
|
|
6128
|
+
* { retention_type: 'organization_default' },
|
|
6129
|
+
* );
|
|
6130
|
+
* ```
|
|
6131
|
+
*/
|
|
6132
|
+
update(projectID, body, options) {
|
|
6133
|
+
return this._client.post(path `/organization/projects/${projectID}/data_retention`, {
|
|
6134
|
+
body,
|
|
6135
|
+
...options,
|
|
6136
|
+
__security: { adminAPIKeyAuth: true },
|
|
6137
|
+
});
|
|
6138
|
+
}
|
|
6139
|
+
}
|
|
6140
|
+
|
|
6141
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
6142
|
+
class HostedToolPermissions extends APIResource {
|
|
6143
|
+
/**
|
|
6144
|
+
* Returns hosted tool permissions for a project.
|
|
6145
|
+
*
|
|
6146
|
+
* @example
|
|
6147
|
+
* ```ts
|
|
6148
|
+
* const projectHostedToolPermissions =
|
|
6149
|
+
* await client.admin.organization.projects.hostedToolPermissions.retrieve(
|
|
6150
|
+
* 'project_id',
|
|
6151
|
+
* );
|
|
6152
|
+
* ```
|
|
6153
|
+
*/
|
|
6154
|
+
retrieve(projectID, options) {
|
|
6155
|
+
return this._client.get(path `/organization/projects/${projectID}/hosted_tool_permissions`, {
|
|
6156
|
+
...options,
|
|
6157
|
+
__security: { adminAPIKeyAuth: true },
|
|
6158
|
+
});
|
|
6159
|
+
}
|
|
6160
|
+
/**
|
|
6161
|
+
* Updates hosted tool permissions for a project.
|
|
6162
|
+
*
|
|
6163
|
+
* @example
|
|
6164
|
+
* ```ts
|
|
6165
|
+
* const projectHostedToolPermissions =
|
|
6166
|
+
* await client.admin.organization.projects.hostedToolPermissions.update(
|
|
6167
|
+
* 'project_id',
|
|
6168
|
+
* );
|
|
6169
|
+
* ```
|
|
6170
|
+
*/
|
|
6171
|
+
update(projectID, body, options) {
|
|
6172
|
+
return this._client.post(path `/organization/projects/${projectID}/hosted_tool_permissions`, {
|
|
6173
|
+
body,
|
|
6174
|
+
...options,
|
|
6175
|
+
__security: { adminAPIKeyAuth: true },
|
|
6176
|
+
});
|
|
6177
|
+
}
|
|
6178
|
+
}
|
|
6179
|
+
|
|
6180
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
6181
|
+
class ModelPermissions extends APIResource {
|
|
6182
|
+
/**
|
|
6183
|
+
* Returns model permissions for a project.
|
|
6184
|
+
*
|
|
6185
|
+
* @example
|
|
6186
|
+
* ```ts
|
|
6187
|
+
* const projectModelPermissions =
|
|
6188
|
+
* await client.admin.organization.projects.modelPermissions.retrieve(
|
|
6189
|
+
* 'project_id',
|
|
6190
|
+
* );
|
|
6191
|
+
* ```
|
|
6192
|
+
*/
|
|
6193
|
+
retrieve(projectID, options) {
|
|
6194
|
+
return this._client.get(path `/organization/projects/${projectID}/model_permissions`, {
|
|
6195
|
+
...options,
|
|
6196
|
+
__security: { adminAPIKeyAuth: true },
|
|
6197
|
+
});
|
|
6198
|
+
}
|
|
6199
|
+
/**
|
|
6200
|
+
* Updates model permissions for a project.
|
|
6201
|
+
*
|
|
6202
|
+
* @example
|
|
6203
|
+
* ```ts
|
|
6204
|
+
* const projectModelPermissions =
|
|
6205
|
+
* await client.admin.organization.projects.modelPermissions.update(
|
|
6206
|
+
* 'project_id',
|
|
6207
|
+
* { mode: 'allow_list', model_ids: ['string'] },
|
|
6208
|
+
* );
|
|
6209
|
+
* ```
|
|
6210
|
+
*/
|
|
6211
|
+
update(projectID, body, options) {
|
|
6212
|
+
return this._client.post(path `/organization/projects/${projectID}/model_permissions`, {
|
|
6213
|
+
body,
|
|
6214
|
+
...options,
|
|
6215
|
+
__security: { adminAPIKeyAuth: true },
|
|
6216
|
+
});
|
|
6217
|
+
}
|
|
6218
|
+
/**
|
|
6219
|
+
* Deletes model permissions for a project.
|
|
6220
|
+
*
|
|
6221
|
+
* @example
|
|
6222
|
+
* ```ts
|
|
6223
|
+
* const projectModelPermissionsDeleted =
|
|
6224
|
+
* await client.admin.organization.projects.modelPermissions.delete(
|
|
6225
|
+
* 'project_id',
|
|
6226
|
+
* );
|
|
6227
|
+
* ```
|
|
6228
|
+
*/
|
|
6229
|
+
delete(projectID, options) {
|
|
6230
|
+
return this._client.delete(path `/organization/projects/${projectID}/model_permissions`, {
|
|
6231
|
+
...options,
|
|
6232
|
+
__security: { adminAPIKeyAuth: true },
|
|
6233
|
+
});
|
|
6234
|
+
}
|
|
6235
|
+
}
|
|
6236
|
+
|
|
5865
6237
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
5866
6238
|
class RateLimits extends APIResource {
|
|
5867
6239
|
/**
|
|
@@ -5923,6 +6295,25 @@ let Roles$3 = class Roles extends APIResource {
|
|
|
5923
6295
|
__security: { adminAPIKeyAuth: true },
|
|
5924
6296
|
});
|
|
5925
6297
|
}
|
|
6298
|
+
/**
|
|
6299
|
+
* Retrieves a project role.
|
|
6300
|
+
*
|
|
6301
|
+
* @example
|
|
6302
|
+
* ```ts
|
|
6303
|
+
* const role =
|
|
6304
|
+
* await client.admin.organization.projects.roles.retrieve(
|
|
6305
|
+
* 'role_id',
|
|
6306
|
+
* { project_id: 'project_id' },
|
|
6307
|
+
* );
|
|
6308
|
+
* ```
|
|
6309
|
+
*/
|
|
6310
|
+
retrieve(roleID, params, options) {
|
|
6311
|
+
const { project_id } = params;
|
|
6312
|
+
return this._client.get(path `/projects/${project_id}/roles/${roleID}`, {
|
|
6313
|
+
...options,
|
|
6314
|
+
__security: { adminAPIKeyAuth: true },
|
|
6315
|
+
});
|
|
6316
|
+
}
|
|
5926
6317
|
/**
|
|
5927
6318
|
* Updates an existing project role.
|
|
5928
6319
|
*
|
|
@@ -6025,6 +6416,22 @@ class ServiceAccounts extends APIResource {
|
|
|
6025
6416
|
__security: { adminAPIKeyAuth: true },
|
|
6026
6417
|
});
|
|
6027
6418
|
}
|
|
6419
|
+
/**
|
|
6420
|
+
* Updates a service account in the project.
|
|
6421
|
+
*
|
|
6422
|
+
* @example
|
|
6423
|
+
* ```ts
|
|
6424
|
+
* const projectServiceAccount =
|
|
6425
|
+
* await client.admin.organization.projects.serviceAccounts.update(
|
|
6426
|
+
* 'service_account_id',
|
|
6427
|
+
* { project_id: 'project_id' },
|
|
6428
|
+
* );
|
|
6429
|
+
* ```
|
|
6430
|
+
*/
|
|
6431
|
+
update(serviceAccountID, params, options) {
|
|
6432
|
+
const { project_id, ...body } = params;
|
|
6433
|
+
return this._client.post(path `/organization/projects/${project_id}/service_accounts/${serviceAccountID}`, { body, ...options, __security: { adminAPIKeyAuth: true } });
|
|
6434
|
+
}
|
|
6028
6435
|
/**
|
|
6029
6436
|
* Returns a list of service accounts in the project.
|
|
6030
6437
|
*
|
|
@@ -6062,6 +6469,101 @@ class ServiceAccounts extends APIResource {
|
|
|
6062
6469
|
}
|
|
6063
6470
|
}
|
|
6064
6471
|
|
|
6472
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
6473
|
+
class SpendAlerts extends APIResource {
|
|
6474
|
+
/**
|
|
6475
|
+
* Creates a project spend alert.
|
|
6476
|
+
*
|
|
6477
|
+
* @example
|
|
6478
|
+
* ```ts
|
|
6479
|
+
* const projectSpendAlert =
|
|
6480
|
+
* await client.admin.organization.projects.spendAlerts.create(
|
|
6481
|
+
* 'project_id',
|
|
6482
|
+
* {
|
|
6483
|
+
* currency: 'USD',
|
|
6484
|
+
* interval: 'month',
|
|
6485
|
+
* notification_channel: {
|
|
6486
|
+
* recipients: ['string'],
|
|
6487
|
+
* type: 'email',
|
|
6488
|
+
* },
|
|
6489
|
+
* threshold_amount: 0,
|
|
6490
|
+
* },
|
|
6491
|
+
* );
|
|
6492
|
+
* ```
|
|
6493
|
+
*/
|
|
6494
|
+
create(projectID, body, options) {
|
|
6495
|
+
return this._client.post(path `/organization/projects/${projectID}/spend_alerts`, {
|
|
6496
|
+
body,
|
|
6497
|
+
...options,
|
|
6498
|
+
__security: { adminAPIKeyAuth: true },
|
|
6499
|
+
});
|
|
6500
|
+
}
|
|
6501
|
+
/**
|
|
6502
|
+
* Updates a project spend alert.
|
|
6503
|
+
*
|
|
6504
|
+
* @example
|
|
6505
|
+
* ```ts
|
|
6506
|
+
* const projectSpendAlert =
|
|
6507
|
+
* await client.admin.organization.projects.spendAlerts.update(
|
|
6508
|
+
* 'alert_id',
|
|
6509
|
+
* {
|
|
6510
|
+
* project_id: 'project_id',
|
|
6511
|
+
* currency: 'USD',
|
|
6512
|
+
* interval: 'month',
|
|
6513
|
+
* notification_channel: {
|
|
6514
|
+
* recipients: ['string'],
|
|
6515
|
+
* type: 'email',
|
|
6516
|
+
* },
|
|
6517
|
+
* threshold_amount: 0,
|
|
6518
|
+
* },
|
|
6519
|
+
* );
|
|
6520
|
+
* ```
|
|
6521
|
+
*/
|
|
6522
|
+
update(alertID, params, options) {
|
|
6523
|
+
const { project_id, ...body } = params;
|
|
6524
|
+
return this._client.post(path `/organization/projects/${project_id}/spend_alerts/${alertID}`, {
|
|
6525
|
+
body,
|
|
6526
|
+
...options,
|
|
6527
|
+
__security: { adminAPIKeyAuth: true },
|
|
6528
|
+
});
|
|
6529
|
+
}
|
|
6530
|
+
/**
|
|
6531
|
+
* Lists project spend alerts.
|
|
6532
|
+
*
|
|
6533
|
+
* @example
|
|
6534
|
+
* ```ts
|
|
6535
|
+
* // Automatically fetches more pages as needed.
|
|
6536
|
+
* for await (const projectSpendAlert of client.admin.organization.projects.spendAlerts.list(
|
|
6537
|
+
* 'project_id',
|
|
6538
|
+
* )) {
|
|
6539
|
+
* // ...
|
|
6540
|
+
* }
|
|
6541
|
+
* ```
|
|
6542
|
+
*/
|
|
6543
|
+
list(projectID, query = {}, options) {
|
|
6544
|
+
return this._client.getAPIList(path `/organization/projects/${projectID}/spend_alerts`, (ConversationCursorPage), { query, ...options, __security: { adminAPIKeyAuth: true } });
|
|
6545
|
+
}
|
|
6546
|
+
/**
|
|
6547
|
+
* Deletes a project spend alert.
|
|
6548
|
+
*
|
|
6549
|
+
* @example
|
|
6550
|
+
* ```ts
|
|
6551
|
+
* const projectSpendAlertDeleted =
|
|
6552
|
+
* await client.admin.organization.projects.spendAlerts.delete(
|
|
6553
|
+
* 'alert_id',
|
|
6554
|
+
* { project_id: 'project_id' },
|
|
6555
|
+
* );
|
|
6556
|
+
* ```
|
|
6557
|
+
*/
|
|
6558
|
+
delete(alertID, params, options) {
|
|
6559
|
+
const { project_id } = params;
|
|
6560
|
+
return this._client.delete(path `/organization/projects/${project_id}/spend_alerts/${alertID}`, {
|
|
6561
|
+
...options,
|
|
6562
|
+
__security: { adminAPIKeyAuth: true },
|
|
6563
|
+
});
|
|
6564
|
+
}
|
|
6565
|
+
}
|
|
6566
|
+
|
|
6065
6567
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
6066
6568
|
let Roles$2 = class Roles extends APIResource {
|
|
6067
6569
|
/**
|
|
@@ -6084,6 +6586,25 @@ let Roles$2 = class Roles extends APIResource {
|
|
|
6084
6586
|
__security: { adminAPIKeyAuth: true },
|
|
6085
6587
|
});
|
|
6086
6588
|
}
|
|
6589
|
+
/**
|
|
6590
|
+
* Retrieves a project role assigned to a group.
|
|
6591
|
+
*
|
|
6592
|
+
* @example
|
|
6593
|
+
* ```ts
|
|
6594
|
+
* const role =
|
|
6595
|
+
* await client.admin.organization.projects.groups.roles.retrieve(
|
|
6596
|
+
* 'role_id',
|
|
6597
|
+
* { project_id: 'project_id', group_id: 'group_id' },
|
|
6598
|
+
* );
|
|
6599
|
+
* ```
|
|
6600
|
+
*/
|
|
6601
|
+
retrieve(roleID, params, options) {
|
|
6602
|
+
const { project_id, group_id } = params;
|
|
6603
|
+
return this._client.get(path `/projects/${project_id}/groups/${group_id}/roles/${roleID}`, {
|
|
6604
|
+
...options,
|
|
6605
|
+
__security: { adminAPIKeyAuth: true },
|
|
6606
|
+
});
|
|
6607
|
+
}
|
|
6087
6608
|
/**
|
|
6088
6609
|
* Lists the project roles assigned to a group within a project.
|
|
6089
6610
|
*
|
|
@@ -6148,6 +6669,26 @@ class Groups extends APIResource {
|
|
|
6148
6669
|
__security: { adminAPIKeyAuth: true },
|
|
6149
6670
|
});
|
|
6150
6671
|
}
|
|
6672
|
+
/**
|
|
6673
|
+
* Retrieves a project's group.
|
|
6674
|
+
*
|
|
6675
|
+
* @example
|
|
6676
|
+
* ```ts
|
|
6677
|
+
* const projectGroup =
|
|
6678
|
+
* await client.admin.organization.projects.groups.retrieve(
|
|
6679
|
+
* 'group_id',
|
|
6680
|
+
* { project_id: 'project_id' },
|
|
6681
|
+
* );
|
|
6682
|
+
* ```
|
|
6683
|
+
*/
|
|
6684
|
+
retrieve(groupID, params, options) {
|
|
6685
|
+
const { project_id, ...query } = params;
|
|
6686
|
+
return this._client.get(path `/organization/projects/${project_id}/groups/${groupID}`, {
|
|
6687
|
+
query,
|
|
6688
|
+
...options,
|
|
6689
|
+
__security: { adminAPIKeyAuth: true },
|
|
6690
|
+
});
|
|
6691
|
+
}
|
|
6151
6692
|
/**
|
|
6152
6693
|
* Lists the groups that have access to a project.
|
|
6153
6694
|
*
|
|
@@ -6208,6 +6749,25 @@ let Roles$1 = class Roles extends APIResource {
|
|
|
6208
6749
|
__security: { adminAPIKeyAuth: true },
|
|
6209
6750
|
});
|
|
6210
6751
|
}
|
|
6752
|
+
/**
|
|
6753
|
+
* Retrieves a project role assigned to a user.
|
|
6754
|
+
*
|
|
6755
|
+
* @example
|
|
6756
|
+
* ```ts
|
|
6757
|
+
* const role =
|
|
6758
|
+
* await client.admin.organization.projects.users.roles.retrieve(
|
|
6759
|
+
* 'role_id',
|
|
6760
|
+
* { project_id: 'project_id', user_id: 'user_id' },
|
|
6761
|
+
* );
|
|
6762
|
+
* ```
|
|
6763
|
+
*/
|
|
6764
|
+
retrieve(roleID, params, options) {
|
|
6765
|
+
const { project_id, user_id } = params;
|
|
6766
|
+
return this._client.get(path `/projects/${project_id}/users/${user_id}/roles/${roleID}`, {
|
|
6767
|
+
...options,
|
|
6768
|
+
__security: { adminAPIKeyAuth: true },
|
|
6769
|
+
});
|
|
6770
|
+
}
|
|
6211
6771
|
/**
|
|
6212
6772
|
* Lists the project roles assigned to a user within a project.
|
|
6213
6773
|
*
|
|
@@ -6361,8 +6921,12 @@ class Projects extends APIResource {
|
|
|
6361
6921
|
this.serviceAccounts = new ServiceAccounts(this._client);
|
|
6362
6922
|
this.apiKeys = new APIKeys(this._client);
|
|
6363
6923
|
this.rateLimits = new RateLimits(this._client);
|
|
6924
|
+
this.modelPermissions = new ModelPermissions(this._client);
|
|
6925
|
+
this.hostedToolPermissions = new HostedToolPermissions(this._client);
|
|
6364
6926
|
this.groups = new Groups(this._client);
|
|
6365
6927
|
this.roles = new Roles$3(this._client);
|
|
6928
|
+
this.dataRetention = new DataRetention(this._client);
|
|
6929
|
+
this.spendAlerts = new SpendAlerts(this._client);
|
|
6366
6930
|
this.certificates = new Certificates(this._client);
|
|
6367
6931
|
}
|
|
6368
6932
|
/**
|
|
@@ -6460,8 +7024,12 @@ Projects.Users = Users$1;
|
|
|
6460
7024
|
Projects.ServiceAccounts = ServiceAccounts;
|
|
6461
7025
|
Projects.APIKeys = APIKeys;
|
|
6462
7026
|
Projects.RateLimits = RateLimits;
|
|
7027
|
+
Projects.ModelPermissions = ModelPermissions;
|
|
7028
|
+
Projects.HostedToolPermissions = HostedToolPermissions;
|
|
6463
7029
|
Projects.Groups = Groups;
|
|
6464
7030
|
Projects.Roles = Roles$3;
|
|
7031
|
+
Projects.DataRetention = DataRetention;
|
|
7032
|
+
Projects.SpendAlerts = SpendAlerts;
|
|
6465
7033
|
Projects.Certificates = Certificates;
|
|
6466
7034
|
|
|
6467
7035
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
@@ -6485,6 +7053,25 @@ class Roles extends APIResource {
|
|
|
6485
7053
|
__security: { adminAPIKeyAuth: true },
|
|
6486
7054
|
});
|
|
6487
7055
|
}
|
|
7056
|
+
/**
|
|
7057
|
+
* Retrieves an organization role assigned to a user.
|
|
7058
|
+
*
|
|
7059
|
+
* @example
|
|
7060
|
+
* ```ts
|
|
7061
|
+
* const role =
|
|
7062
|
+
* await client.admin.organization.users.roles.retrieve(
|
|
7063
|
+
* 'role_id',
|
|
7064
|
+
* { user_id: 'user_id' },
|
|
7065
|
+
* );
|
|
7066
|
+
* ```
|
|
7067
|
+
*/
|
|
7068
|
+
retrieve(roleID, params, options) {
|
|
7069
|
+
const { user_id } = params;
|
|
7070
|
+
return this._client.get(path `/organization/users/${user_id}/roles/${roleID}`, {
|
|
7071
|
+
...options,
|
|
7072
|
+
__security: { adminAPIKeyAuth: true },
|
|
7073
|
+
});
|
|
7074
|
+
}
|
|
6488
7075
|
/**
|
|
6489
7076
|
* Lists the organization roles assigned to a user within the organization.
|
|
6490
7077
|
*
|
|
@@ -6607,6 +7194,8 @@ class Organization extends APIResource {
|
|
|
6607
7194
|
this.users = new Users(this._client);
|
|
6608
7195
|
this.groups = new Groups$1(this._client);
|
|
6609
7196
|
this.roles = new Roles$5(this._client);
|
|
7197
|
+
this.dataRetention = new DataRetention$1(this._client);
|
|
7198
|
+
this.spendAlerts = new SpendAlerts$1(this._client);
|
|
6610
7199
|
this.certificates = new Certificates$1(this._client);
|
|
6611
7200
|
this.projects = new Projects(this._client);
|
|
6612
7201
|
}
|
|
@@ -6618,6 +7207,8 @@ Organization.Invites = Invites;
|
|
|
6618
7207
|
Organization.Users = Users;
|
|
6619
7208
|
Organization.Groups = Groups$1;
|
|
6620
7209
|
Organization.Roles = Roles$5;
|
|
7210
|
+
Organization.DataRetention = DataRetention$1;
|
|
7211
|
+
Organization.SpendAlerts = SpendAlerts$1;
|
|
6621
7212
|
Organization.Certificates = Certificates$1;
|
|
6622
7213
|
Organization.Projects = Projects;
|
|
6623
7214
|
|
|
@@ -13608,11 +14199,11 @@ function zodTextFormat(zodObject, name, props) {
|
|
|
13608
14199
|
}, (content) => zodObject.parse(JSON.parse(content)));
|
|
13609
14200
|
}
|
|
13610
14201
|
|
|
13611
|
-
const DEFAULT_MODEL = 'gpt-5-mini';
|
|
14202
|
+
const DEFAULT_MODEL = 'gpt-5.4-mini';
|
|
13612
14203
|
const GPT_5_HIGH_CONTEXT_THRESHOLD_TOKENS = 272_000;
|
|
13613
14204
|
const GPT_5_HIGH_CONTEXT_INPUT_MULTIPLIER = 2;
|
|
13614
14205
|
const GPT_5_HIGH_CONTEXT_OUTPUT_MULTIPLIER = 1.5;
|
|
13615
|
-
/** Token costs in USD per 1M tokens. Last updated May 2026. */
|
|
14206
|
+
/** Token costs in USD per 1M tokens. Last updated May 2026 from the OpenAI API pricing page. */
|
|
13616
14207
|
const openAiModelCosts = {
|
|
13617
14208
|
'gpt-5': {
|
|
13618
14209
|
inputCost: 1.25 / 1_000_000,
|
|
@@ -13625,9 +14216,14 @@ const openAiModelCosts = {
|
|
|
13625
14216
|
outputCost: 2 / 1_000_000,
|
|
13626
14217
|
},
|
|
13627
14218
|
'gpt-5.4-mini': {
|
|
13628
|
-
inputCost: 0.
|
|
13629
|
-
cacheHitCost: 0.
|
|
13630
|
-
outputCost:
|
|
14219
|
+
inputCost: 0.75 / 1_000_000,
|
|
14220
|
+
cacheHitCost: 0.075 / 1_000_000,
|
|
14221
|
+
outputCost: 4.5 / 1_000_000,
|
|
14222
|
+
},
|
|
14223
|
+
'gpt-5.4-nano': {
|
|
14224
|
+
inputCost: 0.2 / 1_000_000,
|
|
14225
|
+
cacheHitCost: 0.02 / 1_000_000,
|
|
14226
|
+
outputCost: 1.25 / 1_000_000,
|
|
13631
14227
|
},
|
|
13632
14228
|
'gpt-5-nano': {
|
|
13633
14229
|
inputCost: 0.05 / 1_000_000,
|
|
@@ -14246,6 +14842,7 @@ async function parseResponse(content, responseFormat) {
|
|
|
14246
14842
|
}
|
|
14247
14843
|
|
|
14248
14844
|
// llm-openai.ts
|
|
14845
|
+
const DEFAULT_IMAGE_MIME_TYPE = 'image/webp';
|
|
14249
14846
|
/**
|
|
14250
14847
|
* Checks if the given direct OpenAI model supports the temperature parameter.
|
|
14251
14848
|
* @param model The model to check.
|
|
@@ -14280,6 +14877,135 @@ function buildJsonSchemaFormat(schema, schemaName, schemaDescription, schemaStri
|
|
|
14280
14877
|
...(schemaStrict !== undefined ? { strict: schemaStrict } : {}),
|
|
14281
14878
|
};
|
|
14282
14879
|
}
|
|
14880
|
+
function resolveOpenAIApiKey(apiKey) {
|
|
14881
|
+
const resolvedApiKey = apiKey || process.env.OPENAI_API_KEY;
|
|
14882
|
+
if (!resolvedApiKey) {
|
|
14883
|
+
throw new Error('OpenAI API key is not provided and OPENAI_API_KEY environment variable is not set');
|
|
14884
|
+
}
|
|
14885
|
+
return resolvedApiKey;
|
|
14886
|
+
}
|
|
14887
|
+
function createOpenAIClient(apiKey) {
|
|
14888
|
+
return new OpenAI({
|
|
14889
|
+
apiKey,
|
|
14890
|
+
});
|
|
14891
|
+
}
|
|
14892
|
+
function normalizeImageDataUrl(imageData, mimeType = DEFAULT_IMAGE_MIME_TYPE) {
|
|
14893
|
+
return imageData.startsWith('data:') ? imageData : `data:${mimeType};base64,${imageData}`;
|
|
14894
|
+
}
|
|
14895
|
+
function getFilenameFromPath(filePath) {
|
|
14896
|
+
const normalizedPath = filePath.replace(/\\/g, '/');
|
|
14897
|
+
const pathSegments = normalizedPath.split('/');
|
|
14898
|
+
const filename = pathSegments[pathSegments.length - 1];
|
|
14899
|
+
if (!filename) {
|
|
14900
|
+
throw new Error(`Could not determine a filename from file path: ${filePath}`);
|
|
14901
|
+
}
|
|
14902
|
+
return filename;
|
|
14903
|
+
}
|
|
14904
|
+
function inferImageMimeType(filePath) {
|
|
14905
|
+
const normalizedPath = filePath.toLowerCase();
|
|
14906
|
+
if (normalizedPath.endsWith('.png')) {
|
|
14907
|
+
return 'image/png';
|
|
14908
|
+
}
|
|
14909
|
+
if (normalizedPath.endsWith('.jpg') || normalizedPath.endsWith('.jpeg')) {
|
|
14910
|
+
return 'image/jpeg';
|
|
14911
|
+
}
|
|
14912
|
+
if (normalizedPath.endsWith('.webp')) {
|
|
14913
|
+
return 'image/webp';
|
|
14914
|
+
}
|
|
14915
|
+
if (normalizedPath.endsWith('.gif')) {
|
|
14916
|
+
return 'image/gif';
|
|
14917
|
+
}
|
|
14918
|
+
return undefined;
|
|
14919
|
+
}
|
|
14920
|
+
async function readLocalFileBytes(filePath) {
|
|
14921
|
+
try {
|
|
14922
|
+
const dynamicImport = new Function('specifier', 'return import(specifier);');
|
|
14923
|
+
const { readFile } = await dynamicImport('node:fs/promises');
|
|
14924
|
+
return await readFile(filePath);
|
|
14925
|
+
}
|
|
14926
|
+
catch {
|
|
14927
|
+
throw new Error('Local image file uploads require a Node.js runtime with access to node:fs/promises');
|
|
14928
|
+
}
|
|
14929
|
+
}
|
|
14930
|
+
async function uploadVisionFileFromPath(openai, filePath, filename, mimeType) {
|
|
14931
|
+
const fileBytes = await readLocalFileBytes(filePath);
|
|
14932
|
+
const resolvedFilename = filename || getFilenameFromPath(filePath);
|
|
14933
|
+
const resolvedMimeType = mimeType || inferImageMimeType(filePath);
|
|
14934
|
+
const uploadableFile = await OpenAI.toFile(fileBytes, resolvedFilename, resolvedMimeType ? { type: resolvedMimeType } : undefined);
|
|
14935
|
+
const uploadedFile = await openai.files.create({
|
|
14936
|
+
file: uploadableFile,
|
|
14937
|
+
purpose: 'vision',
|
|
14938
|
+
});
|
|
14939
|
+
return uploadedFile.id;
|
|
14940
|
+
}
|
|
14941
|
+
function collectImageInputs(image, images, imageBase64) {
|
|
14942
|
+
const collectedImages = [];
|
|
14943
|
+
if (image) {
|
|
14944
|
+
collectedImages.push(image);
|
|
14945
|
+
}
|
|
14946
|
+
if (images && images.length > 0) {
|
|
14947
|
+
collectedImages.push(...images);
|
|
14948
|
+
}
|
|
14949
|
+
if (imageBase64) {
|
|
14950
|
+
collectedImages.push({ base64: imageBase64 });
|
|
14951
|
+
}
|
|
14952
|
+
return collectedImages;
|
|
14953
|
+
}
|
|
14954
|
+
function hasLocalFileImage(images) {
|
|
14955
|
+
return images.some((image) => 'filePath' in image);
|
|
14956
|
+
}
|
|
14957
|
+
async function buildImageContentPart(image, defaultDetail, openai) {
|
|
14958
|
+
const detail = image.detail ?? defaultDetail;
|
|
14959
|
+
if ('url' in image) {
|
|
14960
|
+
return {
|
|
14961
|
+
type: 'input_image',
|
|
14962
|
+
detail,
|
|
14963
|
+
image_url: image.url,
|
|
14964
|
+
};
|
|
14965
|
+
}
|
|
14966
|
+
if ('dataUrl' in image) {
|
|
14967
|
+
return {
|
|
14968
|
+
type: 'input_image',
|
|
14969
|
+
detail,
|
|
14970
|
+
image_url: image.dataUrl,
|
|
14971
|
+
};
|
|
14972
|
+
}
|
|
14973
|
+
if ('base64' in image) {
|
|
14974
|
+
return {
|
|
14975
|
+
type: 'input_image',
|
|
14976
|
+
detail,
|
|
14977
|
+
image_url: normalizeImageDataUrl(image.base64, image.mimeType),
|
|
14978
|
+
};
|
|
14979
|
+
}
|
|
14980
|
+
if ('fileId' in image) {
|
|
14981
|
+
return {
|
|
14982
|
+
type: 'input_image',
|
|
14983
|
+
detail,
|
|
14984
|
+
file_id: image.fileId,
|
|
14985
|
+
};
|
|
14986
|
+
}
|
|
14987
|
+
if (!openai) {
|
|
14988
|
+
throw new Error('A local image file path was provided, but no OpenAI client is available to upload it');
|
|
14989
|
+
}
|
|
14990
|
+
const fileId = await uploadVisionFileFromPath(openai, image.filePath, image.filename, image.mimeType);
|
|
14991
|
+
return {
|
|
14992
|
+
type: 'input_image',
|
|
14993
|
+
detail,
|
|
14994
|
+
file_id: fileId,
|
|
14995
|
+
};
|
|
14996
|
+
}
|
|
14997
|
+
async function buildPromptContent(input, imageInputs, imageDetail, openai) {
|
|
14998
|
+
if (imageInputs.length === 0) {
|
|
14999
|
+
return input;
|
|
15000
|
+
}
|
|
15001
|
+
const imageContent = await Promise.all(imageInputs.map((image) => buildImageContentPart(image, imageDetail, openai)));
|
|
15002
|
+
return [{ type: 'input_text', text: input }, ...imageContent];
|
|
15003
|
+
}
|
|
15004
|
+
async function uploadVisionFile(filePath, options = {}) {
|
|
15005
|
+
const resolvedApiKey = resolveOpenAIApiKey(options.apiKey);
|
|
15006
|
+
const openai = createOpenAIClient(resolvedApiKey);
|
|
15007
|
+
return await uploadVisionFileFromPath(openai, filePath, options.filename, options.mimeType);
|
|
15008
|
+
}
|
|
14283
15009
|
/**
|
|
14284
15010
|
* Makes a call to OpenAI's Responses API for more advanced use cases with built-in tools.
|
|
14285
15011
|
*
|
|
@@ -14311,13 +15037,8 @@ const makeResponsesAPICall = async (input, options = {}) => {
|
|
|
14311
15037
|
if (!isOpenAIModel(normalizedModel)) {
|
|
14312
15038
|
throw new Error(`Unsupported OpenAI model: ${normalizedModel}. Please use a supported GPT-5 model.`);
|
|
14313
15039
|
}
|
|
14314
|
-
const apiKey = options.apiKey
|
|
14315
|
-
|
|
14316
|
-
throw new Error('OpenAI API key is not provided and OPENAI_API_KEY environment variable is not set');
|
|
14317
|
-
}
|
|
14318
|
-
const openai = new OpenAI({
|
|
14319
|
-
apiKey: apiKey,
|
|
14320
|
-
});
|
|
15040
|
+
const apiKey = resolveOpenAIApiKey(options.apiKey);
|
|
15041
|
+
const openai = createOpenAIClient(apiKey);
|
|
14321
15042
|
// Remove apiKey from options before creating request body
|
|
14322
15043
|
const { apiKey: _, model: __, ...cleanOptions } = options;
|
|
14323
15044
|
const requestBody = {
|
|
@@ -14428,12 +15149,16 @@ const makeResponsesAPICall = async (input, options = {}) => {
|
|
|
14428
15149
|
* });
|
|
14429
15150
|
*/
|
|
14430
15151
|
async function makeLLMCall(input, options = {}) {
|
|
14431
|
-
const { apiKey, model = DEFAULT_MODEL, responseFormat = 'text', schema, schemaName = 'response', schemaDescription, schemaStrict, tools, useCodeInterpreter = false, useWebSearch = false, imageBase64, imageDetail = 'high', context, } = options;
|
|
15152
|
+
const { apiKey, model = DEFAULT_MODEL, responseFormat = 'text', schema, schemaName = 'response', schemaDescription, schemaStrict, tools, useCodeInterpreter = false, useWebSearch = false, image, images, imageBase64, imageDetail = 'high', context, } = options;
|
|
14432
15153
|
// Validate model
|
|
14433
15154
|
const normalizedModel = normalizeModelName(model);
|
|
14434
15155
|
if (!isOpenAIModel(normalizedModel)) {
|
|
14435
15156
|
throw new Error(`Unsupported OpenAI model: ${normalizedModel}. Please use a supported GPT-5 model.`);
|
|
14436
15157
|
}
|
|
15158
|
+
const resolvedApiKey = resolveOpenAIApiKey(apiKey);
|
|
15159
|
+
const imageInputs = collectImageInputs(image, images, imageBase64);
|
|
15160
|
+
const openai = hasLocalFileImage(imageInputs) ? createOpenAIClient(resolvedApiKey) : undefined;
|
|
15161
|
+
const promptContent = await buildPromptContent(input, imageInputs, imageDetail, openai);
|
|
14437
15162
|
// Process input for conversation context and image analysis
|
|
14438
15163
|
let processedInput;
|
|
14439
15164
|
if (context && context.length > 0) {
|
|
@@ -14448,18 +15173,11 @@ async function makeLLMCall(input, options = {}) {
|
|
|
14448
15173
|
});
|
|
14449
15174
|
}
|
|
14450
15175
|
// Add current input message
|
|
14451
|
-
if (
|
|
14452
|
-
// Current message includes
|
|
15176
|
+
if (imageInputs.length > 0) {
|
|
15177
|
+
// Current message includes text and one or more images
|
|
14453
15178
|
conversationMessages.push({
|
|
14454
15179
|
role: 'user',
|
|
14455
|
-
content:
|
|
14456
|
-
{ type: 'input_text', text: input },
|
|
14457
|
-
{
|
|
14458
|
-
type: 'input_image',
|
|
14459
|
-
detail: imageDetail,
|
|
14460
|
-
image_url: imageBase64.startsWith('data:') ? imageBase64 : `data:image/webp;base64,${imageBase64}`,
|
|
14461
|
-
},
|
|
14462
|
-
],
|
|
15180
|
+
content: promptContent,
|
|
14463
15181
|
type: 'message',
|
|
14464
15182
|
});
|
|
14465
15183
|
}
|
|
@@ -14473,19 +15191,12 @@ async function makeLLMCall(input, options = {}) {
|
|
|
14473
15191
|
}
|
|
14474
15192
|
processedInput = conversationMessages;
|
|
14475
15193
|
}
|
|
14476
|
-
else if (
|
|
14477
|
-
// No context, but has image
|
|
15194
|
+
else if (imageInputs.length > 0) {
|
|
15195
|
+
// No context, but has image(s)
|
|
14478
15196
|
processedInput = [
|
|
14479
15197
|
{
|
|
14480
15198
|
role: 'user',
|
|
14481
|
-
content:
|
|
14482
|
-
{ type: 'input_text', text: input },
|
|
14483
|
-
{
|
|
14484
|
-
type: 'input_image',
|
|
14485
|
-
detail: imageDetail,
|
|
14486
|
-
image_url: imageBase64.startsWith('data:') ? imageBase64 : `data:image/webp;base64,${imageBase64}`,
|
|
14487
|
-
},
|
|
14488
|
-
],
|
|
15199
|
+
content: promptContent,
|
|
14489
15200
|
type: 'message',
|
|
14490
15201
|
},
|
|
14491
15202
|
];
|
|
@@ -14496,7 +15207,7 @@ async function makeLLMCall(input, options = {}) {
|
|
|
14496
15207
|
}
|
|
14497
15208
|
// Build the options object for makeResponsesAPICall
|
|
14498
15209
|
let responsesOptions = {
|
|
14499
|
-
apiKey,
|
|
15210
|
+
apiKey: resolvedApiKey,
|
|
14500
15211
|
model: normalizedModel,
|
|
14501
15212
|
parallel_tool_calls: false,
|
|
14502
15213
|
tools,
|
|
@@ -16139,6 +16850,10 @@ function requireReceiver () {
|
|
|
16139
16850
|
* extensions
|
|
16140
16851
|
* @param {Boolean} [options.isServer=false] Specifies whether to operate in
|
|
16141
16852
|
* client or server mode
|
|
16853
|
+
* @param {Number} [options.maxBufferedChunks=0] The maximum number of
|
|
16854
|
+
* buffered data chunks
|
|
16855
|
+
* @param {Number} [options.maxFragments=0] The maximum number of message
|
|
16856
|
+
* fragments
|
|
16142
16857
|
* @param {Number} [options.maxPayload=0] The maximum allowed message length
|
|
16143
16858
|
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
|
16144
16859
|
* not to skip UTF-8 validation for text and close messages
|
|
@@ -16153,6 +16868,8 @@ function requireReceiver () {
|
|
|
16153
16868
|
this._binaryType = options.binaryType || BINARY_TYPES[0];
|
|
16154
16869
|
this._extensions = options.extensions || {};
|
|
16155
16870
|
this._isServer = !!options.isServer;
|
|
16871
|
+
this._maxBufferedChunks = options.maxBufferedChunks | 0;
|
|
16872
|
+
this._maxFragments = options.maxFragments | 0;
|
|
16156
16873
|
this._maxPayload = options.maxPayload | 0;
|
|
16157
16874
|
this._skipUTF8Validation = !!options.skipUTF8Validation;
|
|
16158
16875
|
this[kWebSocket] = undefined;
|
|
@@ -16188,6 +16905,22 @@ function requireReceiver () {
|
|
|
16188
16905
|
_write(chunk, encoding, cb) {
|
|
16189
16906
|
if (this._opcode === 0x08 && this._state == GET_INFO) return cb();
|
|
16190
16907
|
|
|
16908
|
+
if (
|
|
16909
|
+
this._maxBufferedChunks > 0 &&
|
|
16910
|
+
this._buffers.length >= this._maxBufferedChunks
|
|
16911
|
+
) {
|
|
16912
|
+
cb(
|
|
16913
|
+
this.createError(
|
|
16914
|
+
RangeError,
|
|
16915
|
+
'Too many buffered chunks',
|
|
16916
|
+
false,
|
|
16917
|
+
1008,
|
|
16918
|
+
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
|
|
16919
|
+
)
|
|
16920
|
+
);
|
|
16921
|
+
return;
|
|
16922
|
+
}
|
|
16923
|
+
|
|
16191
16924
|
this._bufferedBytes += chunk.length;
|
|
16192
16925
|
this._buffers.push(chunk);
|
|
16193
16926
|
this.startLoop(cb);
|
|
@@ -16584,6 +17317,22 @@ function requireReceiver () {
|
|
|
16584
17317
|
}
|
|
16585
17318
|
|
|
16586
17319
|
if (data.length) {
|
|
17320
|
+
if (
|
|
17321
|
+
this._maxFragments > 0 &&
|
|
17322
|
+
this._fragments.length >= this._maxFragments
|
|
17323
|
+
) {
|
|
17324
|
+
const error = this.createError(
|
|
17325
|
+
RangeError,
|
|
17326
|
+
'Too many message fragments',
|
|
17327
|
+
false,
|
|
17328
|
+
1008,
|
|
17329
|
+
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
|
|
17330
|
+
);
|
|
17331
|
+
|
|
17332
|
+
cb(error);
|
|
17333
|
+
return;
|
|
17334
|
+
}
|
|
17335
|
+
|
|
16587
17336
|
//
|
|
16588
17337
|
// This message is not compressed so its length is the sum of the payload
|
|
16589
17338
|
// length of all fragments.
|
|
@@ -16623,6 +17372,22 @@ function requireReceiver () {
|
|
|
16623
17372
|
return;
|
|
16624
17373
|
}
|
|
16625
17374
|
|
|
17375
|
+
if (
|
|
17376
|
+
this._maxFragments > 0 &&
|
|
17377
|
+
this._fragments.length >= this._maxFragments
|
|
17378
|
+
) {
|
|
17379
|
+
const error = this.createError(
|
|
17380
|
+
RangeError,
|
|
17381
|
+
'Too many message fragments',
|
|
17382
|
+
false,
|
|
17383
|
+
1008,
|
|
17384
|
+
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
|
|
17385
|
+
);
|
|
17386
|
+
|
|
17387
|
+
cb(error);
|
|
17388
|
+
return;
|
|
17389
|
+
}
|
|
17390
|
+
|
|
16626
17391
|
this._fragments.push(buf);
|
|
16627
17392
|
}
|
|
16628
17393
|
|
|
@@ -16817,6 +17582,9 @@ function requireSender () {
|
|
|
16817
17582
|
|
|
16818
17583
|
const { Duplex } = require$$0$2;
|
|
16819
17584
|
const { randomFillSync } = require$$3;
|
|
17585
|
+
const {
|
|
17586
|
+
types: { isUint8Array }
|
|
17587
|
+
} = require$$2;
|
|
16820
17588
|
|
|
16821
17589
|
const PerMessageDeflate = requirePermessageDeflate();
|
|
16822
17590
|
const { EMPTY_BUFFER, kWebSocket, NOOP } = requireConstants();
|
|
@@ -17013,8 +17781,10 @@ function requireSender () {
|
|
|
17013
17781
|
|
|
17014
17782
|
if (typeof data === 'string') {
|
|
17015
17783
|
buf.write(data, 2);
|
|
17016
|
-
} else {
|
|
17784
|
+
} else if (isUint8Array(data)) {
|
|
17017
17785
|
buf.set(data, 2);
|
|
17786
|
+
} else {
|
|
17787
|
+
throw new TypeError('Second argument must be a string or a Uint8Array');
|
|
17018
17788
|
}
|
|
17019
17789
|
}
|
|
17020
17790
|
|
|
@@ -17938,7 +18708,7 @@ function requireWebsocket () {
|
|
|
17938
18708
|
|
|
17939
18709
|
const EventEmitter = require$$0$3;
|
|
17940
18710
|
const https = require$$1;
|
|
17941
|
-
const http = require$$2;
|
|
18711
|
+
const http = require$$2$1;
|
|
17942
18712
|
const net = require$$3$1;
|
|
17943
18713
|
const tls = require$$4;
|
|
17944
18714
|
const { randomBytes, createHash } = require$$3;
|
|
@@ -18135,6 +18905,10 @@ function requireWebsocket () {
|
|
|
18135
18905
|
* multiple times in the same tick
|
|
18136
18906
|
* @param {Function} [options.generateMask] The function used to generate the
|
|
18137
18907
|
* masking key
|
|
18908
|
+
* @param {Number} [options.maxBufferedChunks=0] The maximum number of
|
|
18909
|
+
* buffered data chunks
|
|
18910
|
+
* @param {Number} [options.maxFragments=0] The maximum number of message
|
|
18911
|
+
* fragments
|
|
18138
18912
|
* @param {Number} [options.maxPayload=0] The maximum allowed message size
|
|
18139
18913
|
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
|
18140
18914
|
* not to skip UTF-8 validation for text and close messages
|
|
@@ -18146,6 +18920,8 @@ function requireWebsocket () {
|
|
|
18146
18920
|
binaryType: this.binaryType,
|
|
18147
18921
|
extensions: this._extensions,
|
|
18148
18922
|
isServer: this._isServer,
|
|
18923
|
+
maxBufferedChunks: options.maxBufferedChunks,
|
|
18924
|
+
maxFragments: options.maxFragments,
|
|
18149
18925
|
maxPayload: options.maxPayload,
|
|
18150
18926
|
skipUTF8Validation: options.skipUTF8Validation
|
|
18151
18927
|
});
|
|
@@ -18574,6 +19350,10 @@ function requireWebsocket () {
|
|
|
18574
19350
|
* masking key
|
|
18575
19351
|
* @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
|
|
18576
19352
|
* handshake request
|
|
19353
|
+
* @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
|
|
19354
|
+
* buffered data chunks
|
|
19355
|
+
* @param {Number} [options.maxFragments=131072] The maximum number of message
|
|
19356
|
+
* fragments
|
|
18577
19357
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
18578
19358
|
* size
|
|
18579
19359
|
* @param {Number} [options.maxRedirects=10] The maximum number of redirects
|
|
@@ -18594,6 +19374,8 @@ function requireWebsocket () {
|
|
|
18594
19374
|
autoPong: true,
|
|
18595
19375
|
closeTimeout: CLOSE_TIMEOUT,
|
|
18596
19376
|
protocolVersion: protocolVersions[1],
|
|
19377
|
+
maxBufferedChunks: 1024 * 1024,
|
|
19378
|
+
maxFragments: 128 * 1024,
|
|
18597
19379
|
maxPayload: 100 * 1024 * 1024,
|
|
18598
19380
|
skipUTF8Validation: false,
|
|
18599
19381
|
perMessageDeflate: true,
|
|
@@ -18951,6 +19733,8 @@ function requireWebsocket () {
|
|
|
18951
19733
|
websocket.setSocket(socket, head, {
|
|
18952
19734
|
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
18953
19735
|
generateMask: opts.generateMask,
|
|
19736
|
+
maxBufferedChunks: opts.maxBufferedChunks,
|
|
19737
|
+
maxFragments: opts.maxFragments,
|
|
18954
19738
|
maxPayload: opts.maxPayload,
|
|
18955
19739
|
skipUTF8Validation: opts.skipUTF8Validation
|
|
18956
19740
|
});
|
|
@@ -19593,7 +20377,7 @@ function requireWebsocketServer () {
|
|
|
19593
20377
|
hasRequiredWebsocketServer = 1;
|
|
19594
20378
|
|
|
19595
20379
|
const EventEmitter = require$$0$3;
|
|
19596
|
-
const http = require$$2;
|
|
20380
|
+
const http = require$$2$1;
|
|
19597
20381
|
const { Duplex } = require$$0$2;
|
|
19598
20382
|
const { createHash } = require$$3;
|
|
19599
20383
|
|
|
@@ -19633,6 +20417,10 @@ function requireWebsocketServer () {
|
|
|
19633
20417
|
* called
|
|
19634
20418
|
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
|
19635
20419
|
* @param {String} [options.host] The hostname where to bind the server
|
|
20420
|
+
* @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
|
|
20421
|
+
* buffered data chunks
|
|
20422
|
+
* @param {Number} [options.maxFragments=131072] The maximum number of message
|
|
20423
|
+
* fragments
|
|
19636
20424
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
19637
20425
|
* size
|
|
19638
20426
|
* @param {Boolean} [options.noServer=false] Enable no server mode
|
|
@@ -19655,6 +20443,8 @@ function requireWebsocketServer () {
|
|
|
19655
20443
|
options = {
|
|
19656
20444
|
allowSynchronousEvents: true,
|
|
19657
20445
|
autoPong: true,
|
|
20446
|
+
maxBufferedChunks: 1024 * 1024,
|
|
20447
|
+
maxFragments: 128 * 1024,
|
|
19658
20448
|
maxPayload: 100 * 1024 * 1024,
|
|
19659
20449
|
skipUTF8Validation: false,
|
|
19660
20450
|
perMessageDeflate: false,
|
|
@@ -20014,6 +20804,8 @@ function requireWebsocketServer () {
|
|
|
20014
20804
|
|
|
20015
20805
|
ws.setSocket(socket, head, {
|
|
20016
20806
|
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
20807
|
+
maxBufferedChunks: this.options.maxBufferedChunks,
|
|
20808
|
+
maxFragments: this.options.maxFragments,
|
|
20017
20809
|
maxPayload: this.options.maxPayload,
|
|
20018
20810
|
skipUTF8Validation: this.options.skipUTF8Validation
|
|
20019
20811
|
});
|
|
@@ -20158,7 +20950,7 @@ function requireMain () {
|
|
|
20158
20950
|
hasRequiredMain = 1;
|
|
20159
20951
|
const fs = require$$0$4;
|
|
20160
20952
|
const path = require$$1$1;
|
|
20161
|
-
const os = require$$2$
|
|
20953
|
+
const os = require$$2$2;
|
|
20162
20954
|
const crypto = require$$3;
|
|
20163
20955
|
|
|
20164
20956
|
// Array of tips to display randomly
|
|
@@ -23638,6 +24430,7 @@ const disco = {
|
|
|
23638
24430
|
},
|
|
23639
24431
|
llm: {
|
|
23640
24432
|
call: makeLLMCall,
|
|
24433
|
+
uploadVisionFile: uploadVisionFile,
|
|
23641
24434
|
seek: makeDeepseekCall,
|
|
23642
24435
|
images: makeImagesCall,
|
|
23643
24436
|
open: makeOpenRouterCall,
|
|
@@ -23678,4 +24471,5 @@ exports.isOpenAIImageModel = isOpenAIImageModel;
|
|
|
23678
24471
|
exports.isOpenAIModel = isOpenAIModel;
|
|
23679
24472
|
exports.isOpenRouterModel = isOpenRouterModel;
|
|
23680
24473
|
exports.supportsTemperature = supportsTemperature;
|
|
24474
|
+
exports.uploadVisionFile = uploadVisionFile;
|
|
23681
24475
|
//# sourceMappingURL=index.cjs.map
|