@breign/client 1.0.182 → 1.0.183

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.
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AiGatewayInternalSettingsSummaryUio, BodyWithMessageUio, DeletePlatformEngineResponseUio, ModelUio, OrganisationPlatformEngineUsageUio, OrganizationUio, PlatformEngineAccessUio, PlatformEngineUsageUio, ProviderCreateRequestUio, ProviderUio, ToolPresetCreateRequestUio, ToolPresetDeleteAllResponseUio, ToolPresetImportRequestUio, ToolPresetImportResponseUio, ToolPresetPageUio, ToolPresetUio, ToolPresetUpdateRequestUio } from '../models/index';
13
+ import type { AiGatewayInternalSettingsSummaryUio, BodyWithMessageUio, DeletePlatformEngineResponseUio, ModelUio, OrganisationPlatformEngineUsageUio, OrganizationUio, PlatformEngineAccessUio, PlatformEngineUsageUio, ProviderCreateRequestUio, ProviderUio, TokenPriceSuggestionRequestUio, TokenPriceSuggestionUio, ToolPresetCreateRequestUio, ToolPresetDeleteAllResponseUio, ToolPresetImportRequestUio, ToolPresetImportResponseUio, ToolPresetPageUio, ToolPresetUio, ToolPresetUpdateRequestUio } from '../models/index';
14
14
  export interface CreateAdminToolPresetRequest {
15
15
  toolPresetCreateRequestUio: ToolPresetCreateRequestUio;
16
16
  }
@@ -48,6 +48,9 @@ export interface SetPlatformEngineAccessRequest {
48
48
  id: string;
49
49
  platformEngineAccessUio: PlatformEngineAccessUio;
50
50
  }
51
+ export interface SuggestPlatformTokenPricesRequest {
52
+ tokenPriceSuggestionRequestUio: TokenPriceSuggestionRequestUio;
53
+ }
51
54
  export interface UpdateAdminToolPresetRequest {
52
55
  toolPresetId: string;
53
56
  toolPresetUpdateRequestUio: ToolPresetUpdateRequestUio;
@@ -214,6 +217,16 @@ export declare class AdminApi extends runtime.BaseAPI {
214
217
  * Set platform engine access
215
218
  */
216
219
  setPlatformEngineAccess(id: string, platformEngineAccessUio: PlatformEngineAccessUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlatformEngineAccessUio>;
220
+ /**
221
+ * Superadmin. Prix au million de tokens proposés pour des modèles : tarifs Breign déjà enregistrés, sinon catalogue public (models.dev), dans leur devise d\'origine.
222
+ * Suggest token prices for platform engine models
223
+ */
224
+ suggestPlatformTokenPricesRaw(requestParameters: SuggestPlatformTokenPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TokenPriceSuggestionUio>>>;
225
+ /**
226
+ * Superadmin. Prix au million de tokens proposés pour des modèles : tarifs Breign déjà enregistrés, sinon catalogue public (models.dev), dans leur devise d\'origine.
227
+ * Suggest token prices for platform engine models
228
+ */
229
+ suggestPlatformTokenPrices(tokenPriceSuggestionRequestUio: TokenPriceSuggestionRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TokenPriceSuggestionUio>>;
217
230
  /**
218
231
  * Partial update — only the provided properties are modified
219
232
  * Update a tool preset
@@ -515,6 +515,37 @@ class AdminApi extends runtime.BaseAPI {
515
515
  const response = await this.setPlatformEngineAccessRaw({ id: id, platformEngineAccessUio: platformEngineAccessUio }, initOverrides);
516
516
  return await response.value();
517
517
  }
518
+ /**
519
+ * Superadmin. Prix au million de tokens proposés pour des modèles : tarifs Breign déjà enregistrés, sinon catalogue public (models.dev), dans leur devise d\'origine.
520
+ * Suggest token prices for platform engine models
521
+ */
522
+ async suggestPlatformTokenPricesRaw(requestParameters, initOverrides) {
523
+ if (requestParameters['tokenPriceSuggestionRequestUio'] == null) {
524
+ throw new runtime.RequiredError('tokenPriceSuggestionRequestUio', 'Required parameter "tokenPriceSuggestionRequestUio" was null or undefined when calling suggestPlatformTokenPrices().');
525
+ }
526
+ const queryParameters = {};
527
+ const headerParameters = {};
528
+ headerParameters['Content-Type'] = 'application/json';
529
+ if (this.configuration && this.configuration.apiKey) {
530
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
531
+ }
532
+ const response = await this.request({
533
+ path: `/admin/platform-engines/token-price-suggestions`,
534
+ method: 'POST',
535
+ headers: headerParameters,
536
+ query: queryParameters,
537
+ body: (0, index_1.TokenPriceSuggestionRequestUioToJSON)(requestParameters['tokenPriceSuggestionRequestUio']),
538
+ }, initOverrides);
539
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.TokenPriceSuggestionUioFromJSON));
540
+ }
541
+ /**
542
+ * Superadmin. Prix au million de tokens proposés pour des modèles : tarifs Breign déjà enregistrés, sinon catalogue public (models.dev), dans leur devise d\'origine.
543
+ * Suggest token prices for platform engine models
544
+ */
545
+ async suggestPlatformTokenPrices(tokenPriceSuggestionRequestUio, initOverrides) {
546
+ const response = await this.suggestPlatformTokenPricesRaw({ tokenPriceSuggestionRequestUio: tokenPriceSuggestionRequestUio }, initOverrides);
547
+ return await response.value();
548
+ }
518
549
  /**
519
550
  * Partial update — only the provided properties are modified
520
551
  * Update a tool preset
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { BodyWithMessageUio, DefaultEngineRequestUio, DeleteProvider200ResponseUio, EmbeddingProviderUio, ModelUio, ModelUserAccessUio, OrganizationModelAccessUio, ProviderCreateRequestUio, ProviderUio, ProviderValiationRequestUio, SetModelUserAccessUio } from '../models/index';
13
+ import type { BodyWithMessageUio, DefaultEngineRequestUio, DeleteProvider200ResponseUio, EmbeddingProviderUio, ModelUio, ModelUserAccessUio, OrganizationModelAccessUio, ProviderCreateRequestUio, ProviderUio, ProviderValiationRequestUio, SetModelUserAccessUio, TokenPriceSuggestionRequestUio, TokenPriceSuggestionUio } from '../models/index';
14
14
  export interface CreateProviderRequest {
15
15
  organizationId: string;
16
16
  providerCreateRequestUio: ProviderCreateRequestUio;
@@ -37,6 +37,10 @@ export interface SetModelUserAccessRequest {
37
37
  providerId: string;
38
38
  setModelUserAccessUio: SetModelUserAccessUio;
39
39
  }
40
+ export interface SuggestOrganizationTokenPricesRequest {
41
+ organizationId: string;
42
+ tokenPriceSuggestionRequestUio: TokenPriceSuggestionRequestUio;
43
+ }
40
44
  export interface UpdateDefaultEngineRequest {
41
45
  defaultEngineRequestUio: DefaultEngineRequestUio;
42
46
  }
@@ -124,6 +128,16 @@ export declare class EngineApi extends runtime.BaseAPI {
124
128
  * Restrict a model to some members
125
129
  */
126
130
  setModelUserAccess(organizationId: string, providerId: string, setModelUserAccessUio: SetModelUserAccessUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelUserAccessUio>;
131
+ /**
132
+ * Admin d\'organisation. Prix au million de tokens proposés pour des modèles, en euros : tarifs Breign, sinon catalogue public (models.dev) converti au taux BCE du jour. C\'est en euros que se comptent les budgets des utilisateurs. Un prix dont la devise ne se convertit pas est omis.
133
+ * Suggest token prices for organization engine models
134
+ */
135
+ suggestOrganizationTokenPricesRaw(requestParameters: SuggestOrganizationTokenPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TokenPriceSuggestionUio>>>;
136
+ /**
137
+ * Admin d\'organisation. Prix au million de tokens proposés pour des modèles, en euros : tarifs Breign, sinon catalogue public (models.dev) converti au taux BCE du jour. C\'est en euros que se comptent les budgets des utilisateurs. Un prix dont la devise ne se convertit pas est omis.
138
+ * Suggest token prices for organization engine models
139
+ */
140
+ suggestOrganizationTokenPrices(organizationId: string, tokenPriceSuggestionRequestUio: TokenPriceSuggestionRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TokenPriceSuggestionUio>>;
127
141
  /**
128
142
  * Update the default engine for an organization
129
143
  * Update the default engine for an organization
@@ -278,6 +278,40 @@ class EngineApi extends runtime.BaseAPI {
278
278
  const response = await this.setModelUserAccessRaw({ organizationId: organizationId, providerId: providerId, setModelUserAccessUio: setModelUserAccessUio }, initOverrides);
279
279
  return await response.value();
280
280
  }
281
+ /**
282
+ * Admin d\'organisation. Prix au million de tokens proposés pour des modèles, en euros : tarifs Breign, sinon catalogue public (models.dev) converti au taux BCE du jour. C\'est en euros que se comptent les budgets des utilisateurs. Un prix dont la devise ne se convertit pas est omis.
283
+ * Suggest token prices for organization engine models
284
+ */
285
+ async suggestOrganizationTokenPricesRaw(requestParameters, initOverrides) {
286
+ if (requestParameters['organizationId'] == null) {
287
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling suggestOrganizationTokenPrices().');
288
+ }
289
+ if (requestParameters['tokenPriceSuggestionRequestUio'] == null) {
290
+ throw new runtime.RequiredError('tokenPriceSuggestionRequestUio', 'Required parameter "tokenPriceSuggestionRequestUio" was null or undefined when calling suggestOrganizationTokenPrices().');
291
+ }
292
+ const queryParameters = {};
293
+ const headerParameters = {};
294
+ headerParameters['Content-Type'] = 'application/json';
295
+ if (this.configuration && this.configuration.apiKey) {
296
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
297
+ }
298
+ const response = await this.request({
299
+ path: `/organizations/{organizationId}/engines/token-price-suggestions`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
300
+ method: 'POST',
301
+ headers: headerParameters,
302
+ query: queryParameters,
303
+ body: (0, index_1.TokenPriceSuggestionRequestUioToJSON)(requestParameters['tokenPriceSuggestionRequestUio']),
304
+ }, initOverrides);
305
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.TokenPriceSuggestionUioFromJSON));
306
+ }
307
+ /**
308
+ * Admin d\'organisation. Prix au million de tokens proposés pour des modèles, en euros : tarifs Breign, sinon catalogue public (models.dev) converti au taux BCE du jour. C\'est en euros que se comptent les budgets des utilisateurs. Un prix dont la devise ne se convertit pas est omis.
309
+ * Suggest token prices for organization engine models
310
+ */
311
+ async suggestOrganizationTokenPrices(organizationId, tokenPriceSuggestionRequestUio, initOverrides) {
312
+ const response = await this.suggestOrganizationTokenPricesRaw({ organizationId: organizationId, tokenPriceSuggestionRequestUio: tokenPriceSuggestionRequestUio }, initOverrides);
313
+ return await response.value();
314
+ }
281
315
  /**
282
316
  * Update the default engine for an organization
283
317
  * Update the default engine for an organization
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { AiGatewayUserBudgetUio } from './AiGatewayUserBudgetUio';
12
13
  import type { AiGatewayModelTokenQuotaUio } from './AiGatewayModelTokenQuotaUio';
13
14
  /**
14
15
  *
@@ -34,6 +35,12 @@ export interface AiGatewayInternalSettingsSummaryUio {
34
35
  * @memberof AiGatewayInternalSettingsSummaryUio
35
36
  */
36
37
  modelTokenQuotas: Array<AiGatewayModelTokenQuotaUio>;
38
+ /**
39
+ * Budgets en euros par utilisateur (moteurs à clé propre seulement ; vide côté plateforme).
40
+ * @type {Array<AiGatewayUserBudgetUio>}
41
+ * @memberof AiGatewayInternalSettingsSummaryUio
42
+ */
43
+ userBudgets?: Array<AiGatewayUserBudgetUio>;
37
44
  /**
38
45
  *
39
46
  * @type {Date}
@@ -18,6 +18,7 @@ exports.AiGatewayInternalSettingsSummaryUioFromJSON = AiGatewayInternalSettingsS
18
18
  exports.AiGatewayInternalSettingsSummaryUioFromJSONTyped = AiGatewayInternalSettingsSummaryUioFromJSONTyped;
19
19
  exports.AiGatewayInternalSettingsSummaryUioToJSON = AiGatewayInternalSettingsSummaryUioToJSON;
20
20
  exports.AiGatewayInternalSettingsSummaryUioToJSONTyped = AiGatewayInternalSettingsSummaryUioToJSONTyped;
21
+ const AiGatewayUserBudgetUio_1 = require("./AiGatewayUserBudgetUio");
21
22
  const AiGatewayModelTokenQuotaUio_1 = require("./AiGatewayModelTokenQuotaUio");
22
23
  /**
23
24
  * Check if a given object implements the AiGatewayInternalSettingsSummaryUio interface.
@@ -46,6 +47,7 @@ function AiGatewayInternalSettingsSummaryUioFromJSONTyped(json, ignoreDiscrimina
46
47
  'organizationId': json['organizationId'],
47
48
  'gatewayRpm': json['gatewayRpm'],
48
49
  'modelTokenQuotas': (json['modelTokenQuotas'].map(AiGatewayModelTokenQuotaUio_1.AiGatewayModelTokenQuotaUioFromJSON)),
50
+ 'userBudgets': json['userBudgets'] == null ? undefined : (json['userBudgets'].map(AiGatewayUserBudgetUio_1.AiGatewayUserBudgetUioFromJSON)),
49
51
  'updatedAt': (new Date(json['updatedAt'])),
50
52
  'updatedBy': json['updatedBy'] == null ? undefined : json['updatedBy'],
51
53
  'maxQuotaRatio': json['maxQuotaRatio'],
@@ -62,6 +64,7 @@ function AiGatewayInternalSettingsSummaryUioToJSONTyped(value, ignoreDiscriminat
62
64
  'organizationId': value['organizationId'],
63
65
  'gatewayRpm': value['gatewayRpm'],
64
66
  'modelTokenQuotas': (value['modelTokenQuotas'].map(AiGatewayModelTokenQuotaUio_1.AiGatewayModelTokenQuotaUioToJSON)),
67
+ 'userBudgets': value['userBudgets'] == null ? undefined : (value['userBudgets'].map(AiGatewayUserBudgetUio_1.AiGatewayUserBudgetUioToJSON)),
65
68
  'updatedAt': ((value['updatedAt']).toISOString()),
66
69
  'updatedBy': value['updatedBy'],
67
70
  'maxQuotaRatio': value['maxQuotaRatio'],
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface AiGatewayModelTokenQuotaUio {
18
18
  /**
19
- * Breign user id this quota applies to
19
+ * Breign user id this quota applies to, or `*` for every user (each one separately). A quota on a specific user overrides the `*` one for that user.
20
20
  * @type {string}
21
21
  * @memberof AiGatewayModelTokenQuotaUio
22
22
  */
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { AiGatewayUserBudgetUio } from './AiGatewayUserBudgetUio';
12
13
  import type { AiGatewayModelTokenQuotaUio } from './AiGatewayModelTokenQuotaUio';
13
14
  /**
14
15
  *
@@ -34,6 +35,12 @@ export interface AiGatewaySettingsUio {
34
35
  * @memberof AiGatewaySettingsUio
35
36
  */
36
37
  modelTokenQuotas: Array<AiGatewayModelTokenQuotaUio>;
38
+ /**
39
+ * Budgets en euros par utilisateur (moteurs à clé propre seulement ; vide côté plateforme).
40
+ * @type {Array<AiGatewayUserBudgetUio>}
41
+ * @memberof AiGatewaySettingsUio
42
+ */
43
+ userBudgets?: Array<AiGatewayUserBudgetUio>;
37
44
  /**
38
45
  *
39
46
  * @type {Date}
@@ -18,6 +18,7 @@ exports.AiGatewaySettingsUioFromJSON = AiGatewaySettingsUioFromJSON;
18
18
  exports.AiGatewaySettingsUioFromJSONTyped = AiGatewaySettingsUioFromJSONTyped;
19
19
  exports.AiGatewaySettingsUioToJSON = AiGatewaySettingsUioToJSON;
20
20
  exports.AiGatewaySettingsUioToJSONTyped = AiGatewaySettingsUioToJSONTyped;
21
+ const AiGatewayUserBudgetUio_1 = require("./AiGatewayUserBudgetUio");
21
22
  const AiGatewayModelTokenQuotaUio_1 = require("./AiGatewayModelTokenQuotaUio");
22
23
  /**
23
24
  * Check if a given object implements the AiGatewaySettingsUio interface.
@@ -44,6 +45,7 @@ function AiGatewaySettingsUioFromJSONTyped(json, ignoreDiscriminator) {
44
45
  'organizationId': json['organizationId'],
45
46
  'gatewayRpm': json['gatewayRpm'],
46
47
  'modelTokenQuotas': (json['modelTokenQuotas'].map(AiGatewayModelTokenQuotaUio_1.AiGatewayModelTokenQuotaUioFromJSON)),
48
+ 'userBudgets': json['userBudgets'] == null ? undefined : (json['userBudgets'].map(AiGatewayUserBudgetUio_1.AiGatewayUserBudgetUioFromJSON)),
47
49
  'updatedAt': (new Date(json['updatedAt'])),
48
50
  'updatedBy': json['updatedBy'] == null ? undefined : json['updatedBy'],
49
51
  };
@@ -59,6 +61,7 @@ function AiGatewaySettingsUioToJSONTyped(value, ignoreDiscriminator = false) {
59
61
  'organizationId': value['organizationId'],
60
62
  'gatewayRpm': value['gatewayRpm'],
61
63
  'modelTokenQuotas': (value['modelTokenQuotas'].map(AiGatewayModelTokenQuotaUio_1.AiGatewayModelTokenQuotaUioToJSON)),
64
+ 'userBudgets': value['userBudgets'] == null ? undefined : (value['userBudgets'].map(AiGatewayUserBudgetUio_1.AiGatewayUserBudgetUioToJSON)),
62
65
  'updatedAt': ((value['updatedAt']).toISOString()),
63
66
  'updatedBy': value['updatedBy'],
64
67
  };
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { AiGatewayUserBudgetUio } from './AiGatewayUserBudgetUio';
12
13
  import type { AiGatewayModelTokenQuotaUio } from './AiGatewayModelTokenQuotaUio';
13
14
  /**
14
15
  *
@@ -28,6 +29,12 @@ export interface AiGatewaySettingsUpdateRequestUio {
28
29
  * @memberof AiGatewaySettingsUpdateRequestUio
29
30
  */
30
31
  modelTokenQuotas?: Array<AiGatewayModelTokenQuotaUio>;
32
+ /**
33
+ * Remplace tous les budgets. Refusé sur les réglages plateforme.
34
+ * @type {Array<AiGatewayUserBudgetUio>}
35
+ * @memberof AiGatewaySettingsUpdateRequestUio
36
+ */
37
+ userBudgets?: Array<AiGatewayUserBudgetUio>;
31
38
  }
32
39
  /**
33
40
  * Check if a given object implements the AiGatewaySettingsUpdateRequestUio interface.
@@ -18,6 +18,7 @@ exports.AiGatewaySettingsUpdateRequestUioFromJSON = AiGatewaySettingsUpdateReque
18
18
  exports.AiGatewaySettingsUpdateRequestUioFromJSONTyped = AiGatewaySettingsUpdateRequestUioFromJSONTyped;
19
19
  exports.AiGatewaySettingsUpdateRequestUioToJSON = AiGatewaySettingsUpdateRequestUioToJSON;
20
20
  exports.AiGatewaySettingsUpdateRequestUioToJSONTyped = AiGatewaySettingsUpdateRequestUioToJSONTyped;
21
+ const AiGatewayUserBudgetUio_1 = require("./AiGatewayUserBudgetUio");
21
22
  const AiGatewayModelTokenQuotaUio_1 = require("./AiGatewayModelTokenQuotaUio");
22
23
  /**
23
24
  * Check if a given object implements the AiGatewaySettingsUpdateRequestUio interface.
@@ -35,6 +36,7 @@ function AiGatewaySettingsUpdateRequestUioFromJSONTyped(json, ignoreDiscriminato
35
36
  return {
36
37
  'gatewayRpm': json['gatewayRpm'] == null ? undefined : json['gatewayRpm'],
37
38
  'modelTokenQuotas': json['modelTokenQuotas'] == null ? undefined : (json['modelTokenQuotas'].map(AiGatewayModelTokenQuotaUio_1.AiGatewayModelTokenQuotaUioFromJSON)),
39
+ 'userBudgets': json['userBudgets'] == null ? undefined : (json['userBudgets'].map(AiGatewayUserBudgetUio_1.AiGatewayUserBudgetUioFromJSON)),
38
40
  };
39
41
  }
40
42
  function AiGatewaySettingsUpdateRequestUioToJSON(json) {
@@ -47,5 +49,6 @@ function AiGatewaySettingsUpdateRequestUioToJSONTyped(value, ignoreDiscriminator
47
49
  return {
48
50
  'gatewayRpm': value['gatewayRpm'],
49
51
  'modelTokenQuotas': value['modelTokenQuotas'] == null ? undefined : (value['modelTokenQuotas'].map(AiGatewayModelTokenQuotaUio_1.AiGatewayModelTokenQuotaUioToJSON)),
52
+ 'userBudgets': value['userBudgets'] == null ? undefined : (value['userBudgets'].map(AiGatewayUserBudgetUio_1.AiGatewayUserBudgetUioToJSON)),
50
53
  };
51
54
  }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AiGatewayUserBudgetUio
16
+ */
17
+ export interface AiGatewayUserBudgetUio {
18
+ /**
19
+ * Breign user id this budget applies to, or `*` for every user (each one separately). A budget on a specific user overrides the `*` one for that user.
20
+ * @type {string}
21
+ * @memberof AiGatewayUserBudgetUio
22
+ */
23
+ userId: string;
24
+ /**
25
+ * Budget en euros pour la période, tous modèles à clé propre de l'organisation confondus. Une consommation sans prix en euros n'y compte pas.
26
+ * @type {number}
27
+ * @memberof AiGatewayUserBudgetUio
28
+ */
29
+ amount: number;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof AiGatewayUserBudgetUio
34
+ */
35
+ period: AiGatewayUserBudgetUioPeriodEnum;
36
+ /**
37
+ * Euros déjà consommés sur la période en cours (réponse seulement). Absent pour `*` : chaque utilisateur a sa propre consommation.
38
+ * @type {number}
39
+ * @memberof AiGatewayUserBudgetUio
40
+ */
41
+ readonly used?: number;
42
+ }
43
+ /**
44
+ * @export
45
+ */
46
+ export declare const AiGatewayUserBudgetUioPeriodEnum: {
47
+ readonly Day: "day";
48
+ readonly Month: "month";
49
+ };
50
+ export type AiGatewayUserBudgetUioPeriodEnum = typeof AiGatewayUserBudgetUioPeriodEnum[keyof typeof AiGatewayUserBudgetUioPeriodEnum];
51
+ /**
52
+ * Check if a given object implements the AiGatewayUserBudgetUio interface.
53
+ */
54
+ export declare function instanceOfAiGatewayUserBudgetUio(value: object): value is AiGatewayUserBudgetUio;
55
+ export declare function AiGatewayUserBudgetUioFromJSON(json: any): AiGatewayUserBudgetUio;
56
+ export declare function AiGatewayUserBudgetUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AiGatewayUserBudgetUio;
57
+ export declare function AiGatewayUserBudgetUioToJSON(json: any): AiGatewayUserBudgetUio;
58
+ export declare function AiGatewayUserBudgetUioToJSONTyped(value?: Omit<AiGatewayUserBudgetUio, 'used'> | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.AiGatewayUserBudgetUioPeriodEnum = void 0;
17
+ exports.instanceOfAiGatewayUserBudgetUio = instanceOfAiGatewayUserBudgetUio;
18
+ exports.AiGatewayUserBudgetUioFromJSON = AiGatewayUserBudgetUioFromJSON;
19
+ exports.AiGatewayUserBudgetUioFromJSONTyped = AiGatewayUserBudgetUioFromJSONTyped;
20
+ exports.AiGatewayUserBudgetUioToJSON = AiGatewayUserBudgetUioToJSON;
21
+ exports.AiGatewayUserBudgetUioToJSONTyped = AiGatewayUserBudgetUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.AiGatewayUserBudgetUioPeriodEnum = {
26
+ Day: 'day',
27
+ Month: 'month'
28
+ };
29
+ /**
30
+ * Check if a given object implements the AiGatewayUserBudgetUio interface.
31
+ */
32
+ function instanceOfAiGatewayUserBudgetUio(value) {
33
+ if (!('userId' in value) || value['userId'] === undefined)
34
+ return false;
35
+ if (!('amount' in value) || value['amount'] === undefined)
36
+ return false;
37
+ if (!('period' in value) || value['period'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ function AiGatewayUserBudgetUioFromJSON(json) {
42
+ return AiGatewayUserBudgetUioFromJSONTyped(json, false);
43
+ }
44
+ function AiGatewayUserBudgetUioFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'userId': json['userId'],
50
+ 'amount': json['amount'],
51
+ 'period': json['period'],
52
+ 'used': json['used'] == null ? undefined : json['used'],
53
+ };
54
+ }
55
+ function AiGatewayUserBudgetUioToJSON(json) {
56
+ return AiGatewayUserBudgetUioToJSONTyped(json, false);
57
+ }
58
+ function AiGatewayUserBudgetUioToJSONTyped(value, ignoreDiscriminator = false) {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'userId': value['userId'],
64
+ 'amount': value['amount'],
65
+ 'period': value['period'],
66
+ };
67
+ }
@@ -76,7 +76,7 @@ export interface ModelDefinitionUio {
76
76
  */
77
77
  maxTokens?: number;
78
78
  /**
79
- * Prix d'un million de tokens en entrée. Défini par le superadmin sur un moteur plateforme.
79
+ * Prix d'un million de tokens en entrée. Défini par le superadmin sur un moteur plateforme, ou par l'admin d'organisation sur ses moteurs à clé propre (compté dans les budgets en euros).
80
80
  * @type {number}
81
81
  * @memberof ModelDefinitionUio
82
82
  */
@@ -0,0 +1,39 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { ProviderTypeUio } from './ProviderTypeUio';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface TokenPriceSuggestionRequestUio
17
+ */
18
+ export interface TokenPriceSuggestionRequestUio {
19
+ /**
20
+ *
21
+ * @type {ProviderTypeUio}
22
+ * @memberof TokenPriceSuggestionRequestUio
23
+ */
24
+ providerType: ProviderTypeUio;
25
+ /**
26
+ * Identifiants des modèles chez le fournisseur (`modelId`).
27
+ * @type {Array<string>}
28
+ * @memberof TokenPriceSuggestionRequestUio
29
+ */
30
+ modelIds: Array<string>;
31
+ }
32
+ /**
33
+ * Check if a given object implements the TokenPriceSuggestionRequestUio interface.
34
+ */
35
+ export declare function instanceOfTokenPriceSuggestionRequestUio(value: object): value is TokenPriceSuggestionRequestUio;
36
+ export declare function TokenPriceSuggestionRequestUioFromJSON(json: any): TokenPriceSuggestionRequestUio;
37
+ export declare function TokenPriceSuggestionRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenPriceSuggestionRequestUio;
38
+ export declare function TokenPriceSuggestionRequestUioToJSON(json: any): TokenPriceSuggestionRequestUio;
39
+ export declare function TokenPriceSuggestionRequestUioToJSONTyped(value?: TokenPriceSuggestionRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfTokenPriceSuggestionRequestUio = instanceOfTokenPriceSuggestionRequestUio;
17
+ exports.TokenPriceSuggestionRequestUioFromJSON = TokenPriceSuggestionRequestUioFromJSON;
18
+ exports.TokenPriceSuggestionRequestUioFromJSONTyped = TokenPriceSuggestionRequestUioFromJSONTyped;
19
+ exports.TokenPriceSuggestionRequestUioToJSON = TokenPriceSuggestionRequestUioToJSON;
20
+ exports.TokenPriceSuggestionRequestUioToJSONTyped = TokenPriceSuggestionRequestUioToJSONTyped;
21
+ const ProviderTypeUio_1 = require("./ProviderTypeUio");
22
+ /**
23
+ * Check if a given object implements the TokenPriceSuggestionRequestUio interface.
24
+ */
25
+ function instanceOfTokenPriceSuggestionRequestUio(value) {
26
+ if (!('providerType' in value) || value['providerType'] === undefined)
27
+ return false;
28
+ if (!('modelIds' in value) || value['modelIds'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function TokenPriceSuggestionRequestUioFromJSON(json) {
33
+ return TokenPriceSuggestionRequestUioFromJSONTyped(json, false);
34
+ }
35
+ function TokenPriceSuggestionRequestUioFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'providerType': (0, ProviderTypeUio_1.ProviderTypeUioFromJSON)(json['providerType']),
41
+ 'modelIds': json['modelIds'],
42
+ };
43
+ }
44
+ function TokenPriceSuggestionRequestUioToJSON(json) {
45
+ return TokenPriceSuggestionRequestUioToJSONTyped(json, false);
46
+ }
47
+ function TokenPriceSuggestionRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'providerType': (0, ProviderTypeUio_1.ProviderTypeUioToJSON)(value['providerType']),
53
+ 'modelIds': value['modelIds'],
54
+ };
55
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface TokenPriceSuggestionUio
16
+ */
17
+ export interface TokenPriceSuggestionUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof TokenPriceSuggestionUio
22
+ */
23
+ modelId: string;
24
+ /**
25
+ * Prix d'un million de tokens en entrée.
26
+ * @type {number}
27
+ * @memberof TokenPriceSuggestionUio
28
+ */
29
+ inputTokenPrice?: number;
30
+ /**
31
+ * Prix d'un million de tokens en sortie.
32
+ * @type {number}
33
+ * @memberof TokenPriceSuggestionUio
34
+ */
35
+ outputTokenPrice?: number;
36
+ /**
37
+ * Devise des prix (ISO 4217).
38
+ * @type {string}
39
+ * @memberof TokenPriceSuggestionUio
40
+ */
41
+ currency: string;
42
+ /**
43
+ * configuration = tarifs déjà enregistrés par Breign ; catalog = catalogue public (models.dev).
44
+ * @type {string}
45
+ * @memberof TokenPriceSuggestionUio
46
+ */
47
+ source: TokenPriceSuggestionUioSourceEnum;
48
+ /**
49
+ * Devise d'origine quand les prix ont été convertis en euros au taux du jour (BCE). Absent sans conversion.
50
+ * @type {string}
51
+ * @memberof TokenPriceSuggestionUio
52
+ */
53
+ convertedFrom?: string;
54
+ }
55
+ /**
56
+ * @export
57
+ */
58
+ export declare const TokenPriceSuggestionUioSourceEnum: {
59
+ readonly Configuration: "configuration";
60
+ readonly Catalog: "catalog";
61
+ };
62
+ export type TokenPriceSuggestionUioSourceEnum = typeof TokenPriceSuggestionUioSourceEnum[keyof typeof TokenPriceSuggestionUioSourceEnum];
63
+ /**
64
+ * Check if a given object implements the TokenPriceSuggestionUio interface.
65
+ */
66
+ export declare function instanceOfTokenPriceSuggestionUio(value: object): value is TokenPriceSuggestionUio;
67
+ export declare function TokenPriceSuggestionUioFromJSON(json: any): TokenPriceSuggestionUio;
68
+ export declare function TokenPriceSuggestionUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenPriceSuggestionUio;
69
+ export declare function TokenPriceSuggestionUioToJSON(json: any): TokenPriceSuggestionUio;
70
+ export declare function TokenPriceSuggestionUioToJSONTyped(value?: TokenPriceSuggestionUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.TokenPriceSuggestionUioSourceEnum = void 0;
17
+ exports.instanceOfTokenPriceSuggestionUio = instanceOfTokenPriceSuggestionUio;
18
+ exports.TokenPriceSuggestionUioFromJSON = TokenPriceSuggestionUioFromJSON;
19
+ exports.TokenPriceSuggestionUioFromJSONTyped = TokenPriceSuggestionUioFromJSONTyped;
20
+ exports.TokenPriceSuggestionUioToJSON = TokenPriceSuggestionUioToJSON;
21
+ exports.TokenPriceSuggestionUioToJSONTyped = TokenPriceSuggestionUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.TokenPriceSuggestionUioSourceEnum = {
26
+ Configuration: 'configuration',
27
+ Catalog: 'catalog'
28
+ };
29
+ /**
30
+ * Check if a given object implements the TokenPriceSuggestionUio interface.
31
+ */
32
+ function instanceOfTokenPriceSuggestionUio(value) {
33
+ if (!('modelId' in value) || value['modelId'] === undefined)
34
+ return false;
35
+ if (!('currency' in value) || value['currency'] === undefined)
36
+ return false;
37
+ if (!('source' in value) || value['source'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ function TokenPriceSuggestionUioFromJSON(json) {
42
+ return TokenPriceSuggestionUioFromJSONTyped(json, false);
43
+ }
44
+ function TokenPriceSuggestionUioFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'modelId': json['modelId'],
50
+ 'inputTokenPrice': json['inputTokenPrice'] == null ? undefined : json['inputTokenPrice'],
51
+ 'outputTokenPrice': json['outputTokenPrice'] == null ? undefined : json['outputTokenPrice'],
52
+ 'currency': json['currency'],
53
+ 'source': json['source'],
54
+ 'convertedFrom': json['convertedFrom'] == null ? undefined : json['convertedFrom'],
55
+ };
56
+ }
57
+ function TokenPriceSuggestionUioToJSON(json) {
58
+ return TokenPriceSuggestionUioToJSONTyped(json, false);
59
+ }
60
+ function TokenPriceSuggestionUioToJSONTyped(value, ignoreDiscriminator = false) {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+ 'modelId': value['modelId'],
66
+ 'inputTokenPrice': value['inputTokenPrice'],
67
+ 'outputTokenPrice': value['outputTokenPrice'],
68
+ 'currency': value['currency'],
69
+ 'source': value['source'],
70
+ 'convertedFrom': value['convertedFrom'],
71
+ };
72
+ }
@@ -106,6 +106,7 @@ export * from './AiGatewayUsageCostUio';
106
106
  export * from './AiGatewayUsagePointUio';
107
107
  export * from './AiGatewayUsageTotalUio';
108
108
  export * from './AiGatewayUsageUio';
109
+ export * from './AiGatewayUserBudgetUio';
109
110
  export * from './AiGatewayV1CreditsUio';
110
111
  export * from './AiGatewayV1EndpointPricingUio';
111
112
  export * from './AiGatewayV1EndpointUio';
@@ -607,6 +608,8 @@ export * from './TicketStartModeUio';
607
608
  export * from './TicketStatusUio';
608
609
  export * from './TicketUio';
609
610
  export * from './TicketUsageUio';
611
+ export * from './TokenPriceSuggestionRequestUio';
612
+ export * from './TokenPriceSuggestionUio';
610
613
  export * from './TokenUsageUio';
611
614
  export * from './ToolActionUio';
612
615
  export * from './ToolAllowedToolsRequestUio';
@@ -124,6 +124,7 @@ __exportStar(require("./AiGatewayUsageCostUio"), exports);
124
124
  __exportStar(require("./AiGatewayUsagePointUio"), exports);
125
125
  __exportStar(require("./AiGatewayUsageTotalUio"), exports);
126
126
  __exportStar(require("./AiGatewayUsageUio"), exports);
127
+ __exportStar(require("./AiGatewayUserBudgetUio"), exports);
127
128
  __exportStar(require("./AiGatewayV1CreditsUio"), exports);
128
129
  __exportStar(require("./AiGatewayV1EndpointPricingUio"), exports);
129
130
  __exportStar(require("./AiGatewayV1EndpointUio"), exports);
@@ -625,6 +626,8 @@ __exportStar(require("./TicketStartModeUio"), exports);
625
626
  __exportStar(require("./TicketStatusUio"), exports);
626
627
  __exportStar(require("./TicketUio"), exports);
627
628
  __exportStar(require("./TicketUsageUio"), exports);
629
+ __exportStar(require("./TokenPriceSuggestionRequestUio"), exports);
630
+ __exportStar(require("./TokenPriceSuggestionUio"), exports);
628
631
  __exportStar(require("./TokenUsageUio"), exports);
629
632
  __exportStar(require("./ToolActionUio"), exports);
630
633
  __exportStar(require("./ToolAllowedToolsRequestUio"), exports);
package/dist/openapi.json CHANGED
@@ -7566,6 +7566,61 @@
7566
7566
  "tags" : [ "Engines" ]
7567
7567
  }
7568
7568
  },
7569
+ "/organizations/{organizationId}/engines/token-price-suggestions" : {
7570
+ "post" : {
7571
+ "description" : "Admin d'organisation. Prix au million de tokens proposés pour des modèles, en euros : tarifs Breign, sinon catalogue public (models.dev) converti au taux BCE du jour. C'est en euros que se comptent les budgets des utilisateurs. Un prix dont la devise ne se convertit pas est omis.",
7572
+ "operationId" : "suggestOrganizationTokenPrices",
7573
+ "parameters" : [ {
7574
+ "description" : "ID of the organization",
7575
+ "in" : "path",
7576
+ "name" : "organizationId",
7577
+ "required" : true,
7578
+ "schema" : {
7579
+ "type" : "string"
7580
+ }
7581
+ } ],
7582
+ "requestBody" : {
7583
+ "content" : {
7584
+ "application/json" : {
7585
+ "schema" : {
7586
+ "$ref" : "#/components/schemas/TokenPriceSuggestionRequest"
7587
+ }
7588
+ }
7589
+ },
7590
+ "required" : true
7591
+ },
7592
+ "responses" : {
7593
+ "200" : {
7594
+ "content" : {
7595
+ "application/json" : {
7596
+ "schema" : {
7597
+ "items" : {
7598
+ "$ref" : "#/components/schemas/TokenPriceSuggestion"
7599
+ },
7600
+ "type" : "array"
7601
+ }
7602
+ }
7603
+ },
7604
+ "description" : "Suggested prices in euros; models without a known price are omitted"
7605
+ },
7606
+ "400" : {
7607
+ "content" : {
7608
+ "application/json" : {
7609
+ "schema" : {
7610
+ "$ref" : "#/components/schemas/BodyWithMessage"
7611
+ }
7612
+ }
7613
+ },
7614
+ "description" : "Invalid request"
7615
+ },
7616
+ "403" : {
7617
+ "description" : "Forbidden — the caller is not an admin of the organization"
7618
+ }
7619
+ },
7620
+ "summary" : "Suggest token prices for organization engine models",
7621
+ "tags" : [ "engine" ]
7622
+ }
7623
+ },
7569
7624
  "/organizations/{organizationId}/engines/providers/with-embedding" : {
7570
7625
  "get" : {
7571
7626
  "description" : "Returns engine providers that support embedding for a given organization. Chaque provider est réduit aux seuls modèles marqués `hasEmbedding`.",
@@ -7885,6 +7940,52 @@
7885
7940
  "tags" : [ "admin" ]
7886
7941
  }
7887
7942
  },
7943
+ "/admin/platform-engines/token-price-suggestions" : {
7944
+ "post" : {
7945
+ "description" : "Superadmin. Prix au million de tokens proposés pour des modèles : tarifs Breign déjà enregistrés, sinon catalogue public (models.dev), dans leur devise d'origine.",
7946
+ "operationId" : "suggestPlatformTokenPrices",
7947
+ "requestBody" : {
7948
+ "content" : {
7949
+ "application/json" : {
7950
+ "schema" : {
7951
+ "$ref" : "#/components/schemas/TokenPriceSuggestionRequest"
7952
+ }
7953
+ }
7954
+ },
7955
+ "required" : true
7956
+ },
7957
+ "responses" : {
7958
+ "200" : {
7959
+ "content" : {
7960
+ "application/json" : {
7961
+ "schema" : {
7962
+ "items" : {
7963
+ "$ref" : "#/components/schemas/TokenPriceSuggestion"
7964
+ },
7965
+ "type" : "array"
7966
+ }
7967
+ }
7968
+ },
7969
+ "description" : "Suggested prices; models without a known price are omitted"
7970
+ },
7971
+ "400" : {
7972
+ "content" : {
7973
+ "application/json" : {
7974
+ "schema" : {
7975
+ "$ref" : "#/components/schemas/BodyWithMessage"
7976
+ }
7977
+ }
7978
+ },
7979
+ "description" : "Invalid request"
7980
+ },
7981
+ "403" : {
7982
+ "description" : "Forbidden — superadmin only"
7983
+ }
7984
+ },
7985
+ "summary" : "Suggest token prices for platform engine models",
7986
+ "tags" : [ "admin" ]
7987
+ }
7988
+ },
7888
7989
  "/admin/platform-engines/{id}" : {
7889
7990
  "delete" : {
7890
7991
  "operationId" : "deletePlatformEngine",
@@ -26882,7 +26983,7 @@
26882
26983
  "type" : "integer"
26883
26984
  },
26884
26985
  "inputTokenPrice" : {
26885
- "description" : "Prix d'un million de tokens en entrée. Défini par le superadmin sur un moteur plateforme.",
26986
+ "description" : "Prix d'un million de tokens en entrée. Défini par le superadmin sur un moteur plateforme, ou par l'admin d'organisation sur ses moteurs à clé propre (compté dans les budgets en euros).",
26886
26987
  "minimum" : 0,
26887
26988
  "type" : "number"
26888
26989
  },
@@ -26929,6 +27030,54 @@
26929
27030
  "required" : [ "id", "models", "name", "providerType" ],
26930
27031
  "type" : "object"
26931
27032
  },
27033
+ "TokenPriceSuggestionRequest" : {
27034
+ "properties" : {
27035
+ "providerType" : {
27036
+ "$ref" : "#/components/schemas/ProviderType"
27037
+ },
27038
+ "modelIds" : {
27039
+ "description" : "Identifiants des modèles chez le fournisseur (`modelId`).",
27040
+ "items" : {
27041
+ "type" : "string"
27042
+ },
27043
+ "maxItems" : 50,
27044
+ "minItems" : 1,
27045
+ "type" : "array"
27046
+ }
27047
+ },
27048
+ "required" : [ "modelIds", "providerType" ],
27049
+ "type" : "object"
27050
+ },
27051
+ "TokenPriceSuggestion" : {
27052
+ "properties" : {
27053
+ "modelId" : {
27054
+ "type" : "string"
27055
+ },
27056
+ "inputTokenPrice" : {
27057
+ "description" : "Prix d'un million de tokens en entrée.",
27058
+ "type" : "number"
27059
+ },
27060
+ "outputTokenPrice" : {
27061
+ "description" : "Prix d'un million de tokens en sortie.",
27062
+ "type" : "number"
27063
+ },
27064
+ "currency" : {
27065
+ "description" : "Devise des prix (ISO 4217).",
27066
+ "type" : "string"
27067
+ },
27068
+ "source" : {
27069
+ "description" : "configuration = tarifs déjà enregistrés par Breign ; catalog = catalogue public (models.dev).",
27070
+ "enum" : [ "configuration", "catalog" ],
27071
+ "type" : "string"
27072
+ },
27073
+ "convertedFrom" : {
27074
+ "description" : "Devise d'origine quand les prix ont été convertis en euros au taux du jour (BCE). Absent sans conversion.",
27075
+ "type" : "string"
27076
+ }
27077
+ },
27078
+ "required" : [ "currency", "modelId", "source" ],
27079
+ "type" : "object"
27080
+ },
26932
27081
  "EmbeddingProvider" : {
26933
27082
  "properties" : {
26934
27083
  "id" : {
@@ -30790,6 +30939,13 @@
30790
30939
  },
30791
30940
  "type" : "array"
30792
30941
  },
30942
+ "userBudgets" : {
30943
+ "description" : "Budgets en euros par utilisateur (moteurs à clé propre seulement ; vide côté plateforme).",
30944
+ "items" : {
30945
+ "$ref" : "#/components/schemas/AiGatewayUserBudget"
30946
+ },
30947
+ "type" : "array"
30948
+ },
30793
30949
  "updatedAt" : {
30794
30950
  "format" : "date-time",
30795
30951
  "type" : "string"
@@ -30805,7 +30961,7 @@
30805
30961
  "AiGatewayModelTokenQuota" : {
30806
30962
  "properties" : {
30807
30963
  "userId" : {
30808
- "description" : "Breign user id this quota applies to",
30964
+ "description" : "Breign user id this quota applies to, or `*` for every user (each one separately). A quota on a specific user overrides the `*` one for that user.",
30809
30965
  "type" : "string"
30810
30966
  },
30811
30967
  "model" : {
@@ -30829,6 +30985,31 @@
30829
30985
  "required" : [ "limit", "model", "period", "userId" ],
30830
30986
  "type" : "object"
30831
30987
  },
30988
+ "AiGatewayUserBudget" : {
30989
+ "properties" : {
30990
+ "userId" : {
30991
+ "description" : "Breign user id this budget applies to, or `*` for every user (each one separately). A budget on a specific user overrides the `*` one for that user.",
30992
+ "type" : "string"
30993
+ },
30994
+ "amount" : {
30995
+ "description" : "Budget en euros pour la période, tous modèles à clé propre de l'organisation confondus. Une consommation sans prix en euros n'y compte pas.",
30996
+ "exclusiveMinimum" : true,
30997
+ "minimum" : 0,
30998
+ "type" : "number"
30999
+ },
31000
+ "period" : {
31001
+ "enum" : [ "day", "month" ],
31002
+ "type" : "string"
31003
+ },
31004
+ "used" : {
31005
+ "description" : "Euros déjà consommés sur la période en cours (réponse seulement). Absent pour `*` : chaque utilisateur a sa propre consommation.",
31006
+ "readOnly" : true,
31007
+ "type" : "number"
31008
+ }
31009
+ },
31010
+ "required" : [ "amount", "period", "userId" ],
31011
+ "type" : "object"
31012
+ },
30832
31013
  "AiGatewaySettingsUpdateRequest" : {
30833
31014
  "properties" : {
30834
31015
  "gatewayRpm" : {
@@ -30841,6 +31022,13 @@
30841
31022
  "$ref" : "#/components/schemas/AiGatewayModelTokenQuota"
30842
31023
  },
30843
31024
  "type" : "array"
31025
+ },
31026
+ "userBudgets" : {
31027
+ "description" : "Remplace tous les budgets. Refusé sur les réglages plateforme.",
31028
+ "items" : {
31029
+ "$ref" : "#/components/schemas/AiGatewayUserBudget"
31030
+ },
31031
+ "type" : "array"
30844
31032
  }
30845
31033
  },
30846
31034
  "type" : "object"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.182",
3
+ "version": "1.0.183",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",