@breign/client 1.0.159 → 1.0.160
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/apis/AiGatewayApi.d.ts +28 -1
- package/dist/apis/AiGatewayApi.js +63 -0
- package/dist/apis/PromptsApi.d.ts +41 -1
- package/dist/apis/PromptsApi.js +92 -0
- package/dist/models/AgentRateLimitSettingsUio.d.ts +80 -0
- package/dist/models/AgentRateLimitSettingsUio.js +80 -0
- package/dist/models/AgentRateLimitSettingsUpdateRequestUio.d.ts +50 -0
- package/dist/models/AgentRateLimitSettingsUpdateRequestUio.js +54 -0
- package/dist/models/AiGatewayModelTokenQuotaUio.d.ts +64 -0
- package/dist/models/AiGatewayModelTokenQuotaUio.js +72 -0
- package/dist/models/AiGatewaySettingsUio.d.ts +57 -0
- package/dist/models/AiGatewaySettingsUio.js +65 -0
- package/dist/models/AiGatewaySettingsUpdateRequestUio.d.ts +39 -0
- package/dist/models/AiGatewaySettingsUpdateRequestUio.js +51 -0
- package/dist/models/PromptRateLimitResponseUio.d.ts +50 -0
- package/dist/models/PromptRateLimitResponseUio.js +62 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/openapi.json +398 -0
- package/package.json +1 -1
package/dist/openapi.json
CHANGED
|
@@ -13544,6 +13544,155 @@
|
|
|
13544
13544
|
"tags" : [ "prompts" ]
|
|
13545
13545
|
}
|
|
13546
13546
|
},
|
|
13547
|
+
"/agents/{agentId}/prompts/rate-limit" : {
|
|
13548
|
+
"get" : {
|
|
13549
|
+
"description" : "Returns the current prompt rate-limit quota for the authenticated subject on the given agent, without consuming a slot.\n",
|
|
13550
|
+
"operationId" : "getPromptRateLimit",
|
|
13551
|
+
"parameters" : [ {
|
|
13552
|
+
"description" : "ID of the agent",
|
|
13553
|
+
"in" : "path",
|
|
13554
|
+
"name" : "agentId",
|
|
13555
|
+
"required" : true,
|
|
13556
|
+
"schema" : {
|
|
13557
|
+
"format" : "uuid",
|
|
13558
|
+
"type" : "string"
|
|
13559
|
+
}
|
|
13560
|
+
} ],
|
|
13561
|
+
"responses" : {
|
|
13562
|
+
"200" : {
|
|
13563
|
+
"content" : {
|
|
13564
|
+
"application/json" : {
|
|
13565
|
+
"schema" : {
|
|
13566
|
+
"$ref" : "#/components/schemas/PromptRateLimitResponse"
|
|
13567
|
+
}
|
|
13568
|
+
}
|
|
13569
|
+
},
|
|
13570
|
+
"description" : "Current prompt rate-limit usage",
|
|
13571
|
+
"headers" : {
|
|
13572
|
+
"X-RateLimit-Limit-Prompts" : {
|
|
13573
|
+
"description" : "Max prompts in the sliding window",
|
|
13574
|
+
"schema" : {
|
|
13575
|
+
"type" : "integer"
|
|
13576
|
+
}
|
|
13577
|
+
},
|
|
13578
|
+
"X-RateLimit-Remaining-Prompts" : {
|
|
13579
|
+
"description" : "Remaining prompts in the sliding window",
|
|
13580
|
+
"schema" : {
|
|
13581
|
+
"type" : "integer"
|
|
13582
|
+
}
|
|
13583
|
+
},
|
|
13584
|
+
"X-RateLimit-Reset-Prompts" : {
|
|
13585
|
+
"description" : "Seconds until the window slides",
|
|
13586
|
+
"schema" : {
|
|
13587
|
+
"type" : "integer"
|
|
13588
|
+
}
|
|
13589
|
+
}
|
|
13590
|
+
}
|
|
13591
|
+
},
|
|
13592
|
+
"401" : {
|
|
13593
|
+
"description" : "Unauthorized"
|
|
13594
|
+
},
|
|
13595
|
+
"403" : {
|
|
13596
|
+
"description" : "Forbidden - User cannot access this agent"
|
|
13597
|
+
},
|
|
13598
|
+
"404" : {
|
|
13599
|
+
"description" : "Agent not found"
|
|
13600
|
+
},
|
|
13601
|
+
"500" : {
|
|
13602
|
+
"description" : "Server error"
|
|
13603
|
+
}
|
|
13604
|
+
},
|
|
13605
|
+
"summary" : "Get prompt rate-limit usage",
|
|
13606
|
+
"tags" : [ "prompts" ]
|
|
13607
|
+
}
|
|
13608
|
+
},
|
|
13609
|
+
"/organizations/{organizationId}/agents/rate-limit/settings" : {
|
|
13610
|
+
"get" : {
|
|
13611
|
+
"description" : "Organization admin settings for agent chat anti-abuse limits.",
|
|
13612
|
+
"operationId" : "getAgentRateLimitSettings",
|
|
13613
|
+
"parameters" : [ {
|
|
13614
|
+
"description" : "ID of the organization",
|
|
13615
|
+
"in" : "path",
|
|
13616
|
+
"name" : "organizationId",
|
|
13617
|
+
"required" : true,
|
|
13618
|
+
"schema" : {
|
|
13619
|
+
"type" : "string"
|
|
13620
|
+
}
|
|
13621
|
+
} ],
|
|
13622
|
+
"responses" : {
|
|
13623
|
+
"200" : {
|
|
13624
|
+
"content" : {
|
|
13625
|
+
"application/json" : {
|
|
13626
|
+
"schema" : {
|
|
13627
|
+
"$ref" : "#/components/schemas/AgentRateLimitSettings"
|
|
13628
|
+
}
|
|
13629
|
+
}
|
|
13630
|
+
},
|
|
13631
|
+
"description" : "Current settings"
|
|
13632
|
+
},
|
|
13633
|
+
"401" : {
|
|
13634
|
+
"description" : "Unauthorized"
|
|
13635
|
+
},
|
|
13636
|
+
"403" : {
|
|
13637
|
+
"description" : "Forbidden"
|
|
13638
|
+
},
|
|
13639
|
+
"500" : {
|
|
13640
|
+
"description" : "Server error"
|
|
13641
|
+
}
|
|
13642
|
+
},
|
|
13643
|
+
"summary" : "Get agent chat rate limit settings",
|
|
13644
|
+
"tags" : [ "prompts" ]
|
|
13645
|
+
},
|
|
13646
|
+
"put" : {
|
|
13647
|
+
"description" : "Organization admin can set per-org chat agent rate limits.",
|
|
13648
|
+
"operationId" : "updateAgentRateLimitSettings",
|
|
13649
|
+
"parameters" : [ {
|
|
13650
|
+
"description" : "ID of the organization",
|
|
13651
|
+
"in" : "path",
|
|
13652
|
+
"name" : "organizationId",
|
|
13653
|
+
"required" : true,
|
|
13654
|
+
"schema" : {
|
|
13655
|
+
"type" : "string"
|
|
13656
|
+
}
|
|
13657
|
+
} ],
|
|
13658
|
+
"requestBody" : {
|
|
13659
|
+
"content" : {
|
|
13660
|
+
"application/json" : {
|
|
13661
|
+
"schema" : {
|
|
13662
|
+
"$ref" : "#/components/schemas/AgentRateLimitSettingsUpdateRequest"
|
|
13663
|
+
}
|
|
13664
|
+
}
|
|
13665
|
+
},
|
|
13666
|
+
"required" : true
|
|
13667
|
+
},
|
|
13668
|
+
"responses" : {
|
|
13669
|
+
"200" : {
|
|
13670
|
+
"content" : {
|
|
13671
|
+
"application/json" : {
|
|
13672
|
+
"schema" : {
|
|
13673
|
+
"$ref" : "#/components/schemas/AgentRateLimitSettings"
|
|
13674
|
+
}
|
|
13675
|
+
}
|
|
13676
|
+
},
|
|
13677
|
+
"description" : "Updated settings"
|
|
13678
|
+
},
|
|
13679
|
+
"400" : {
|
|
13680
|
+
"description" : "Invalid request"
|
|
13681
|
+
},
|
|
13682
|
+
"401" : {
|
|
13683
|
+
"description" : "Unauthorized"
|
|
13684
|
+
},
|
|
13685
|
+
"403" : {
|
|
13686
|
+
"description" : "Forbidden"
|
|
13687
|
+
},
|
|
13688
|
+
"500" : {
|
|
13689
|
+
"description" : "Server error"
|
|
13690
|
+
}
|
|
13691
|
+
},
|
|
13692
|
+
"summary" : "Update agent chat rate limit settings",
|
|
13693
|
+
"tags" : [ "prompts" ]
|
|
13694
|
+
}
|
|
13695
|
+
},
|
|
13547
13696
|
"/agents/{agentId}/prompts" : {
|
|
13548
13697
|
"post" : {
|
|
13549
13698
|
"description" : "Starts a new conversation session for the specified agent",
|
|
@@ -15222,6 +15371,93 @@
|
|
|
15222
15371
|
"tags" : [ "ai-gateway" ]
|
|
15223
15372
|
}
|
|
15224
15373
|
},
|
|
15374
|
+
"/organizations/{organizationId}/ai-gateway/settings" : {
|
|
15375
|
+
"get" : {
|
|
15376
|
+
"description" : "Organization admin settings for gateway RPM and per-model token quotas.",
|
|
15377
|
+
"operationId" : "getAiGatewaySettings",
|
|
15378
|
+
"parameters" : [ {
|
|
15379
|
+
"description" : "ID of the organization",
|
|
15380
|
+
"in" : "path",
|
|
15381
|
+
"name" : "organizationId",
|
|
15382
|
+
"required" : true,
|
|
15383
|
+
"schema" : {
|
|
15384
|
+
"type" : "string"
|
|
15385
|
+
}
|
|
15386
|
+
} ],
|
|
15387
|
+
"responses" : {
|
|
15388
|
+
"200" : {
|
|
15389
|
+
"content" : {
|
|
15390
|
+
"application/json" : {
|
|
15391
|
+
"schema" : {
|
|
15392
|
+
"$ref" : "#/components/schemas/AiGatewaySettings"
|
|
15393
|
+
}
|
|
15394
|
+
}
|
|
15395
|
+
},
|
|
15396
|
+
"description" : "Current settings"
|
|
15397
|
+
},
|
|
15398
|
+
"401" : {
|
|
15399
|
+
"description" : "Unauthorized"
|
|
15400
|
+
},
|
|
15401
|
+
"403" : {
|
|
15402
|
+
"description" : "Forbidden"
|
|
15403
|
+
},
|
|
15404
|
+
"500" : {
|
|
15405
|
+
"description" : "Server error"
|
|
15406
|
+
}
|
|
15407
|
+
},
|
|
15408
|
+
"summary" : "Get AI Gateway limits settings",
|
|
15409
|
+
"tags" : [ "ai-gateway" ]
|
|
15410
|
+
},
|
|
15411
|
+
"put" : {
|
|
15412
|
+
"description" : "Organization admin can set gateway RPM and per-model token quotas.",
|
|
15413
|
+
"operationId" : "updateAiGatewaySettings",
|
|
15414
|
+
"parameters" : [ {
|
|
15415
|
+
"description" : "ID of the organization",
|
|
15416
|
+
"in" : "path",
|
|
15417
|
+
"name" : "organizationId",
|
|
15418
|
+
"required" : true,
|
|
15419
|
+
"schema" : {
|
|
15420
|
+
"type" : "string"
|
|
15421
|
+
}
|
|
15422
|
+
} ],
|
|
15423
|
+
"requestBody" : {
|
|
15424
|
+
"content" : {
|
|
15425
|
+
"application/json" : {
|
|
15426
|
+
"schema" : {
|
|
15427
|
+
"$ref" : "#/components/schemas/AiGatewaySettingsUpdateRequest"
|
|
15428
|
+
}
|
|
15429
|
+
}
|
|
15430
|
+
},
|
|
15431
|
+
"required" : true
|
|
15432
|
+
},
|
|
15433
|
+
"responses" : {
|
|
15434
|
+
"200" : {
|
|
15435
|
+
"content" : {
|
|
15436
|
+
"application/json" : {
|
|
15437
|
+
"schema" : {
|
|
15438
|
+
"$ref" : "#/components/schemas/AiGatewaySettings"
|
|
15439
|
+
}
|
|
15440
|
+
}
|
|
15441
|
+
},
|
|
15442
|
+
"description" : "Updated settings"
|
|
15443
|
+
},
|
|
15444
|
+
"400" : {
|
|
15445
|
+
"description" : "Invalid request"
|
|
15446
|
+
},
|
|
15447
|
+
"401" : {
|
|
15448
|
+
"description" : "Unauthorized"
|
|
15449
|
+
},
|
|
15450
|
+
"403" : {
|
|
15451
|
+
"description" : "Forbidden"
|
|
15452
|
+
},
|
|
15453
|
+
"500" : {
|
|
15454
|
+
"description" : "Server error"
|
|
15455
|
+
}
|
|
15456
|
+
},
|
|
15457
|
+
"summary" : "Update AI Gateway limits settings",
|
|
15458
|
+
"tags" : [ "ai-gateway" ]
|
|
15459
|
+
}
|
|
15460
|
+
},
|
|
15225
15461
|
"/organizations/{organizationId}/ai-gateway/v1/models" : {
|
|
15226
15462
|
"get" : {
|
|
15227
15463
|
"description" : "Équivalent de `GET /v1/models` de l'AI Gateway Vercel, monté sous le préfixe organisation. Liste les modèles des providers configurés pour l'organisation.",
|
|
@@ -23743,6 +23979,96 @@
|
|
|
23743
23979
|
"required" : [ "conversationId", "messageId", "text" ],
|
|
23744
23980
|
"type" : "object"
|
|
23745
23981
|
},
|
|
23982
|
+
"PromptRateLimitResponse" : {
|
|
23983
|
+
"description" : "Current prompt rate-limit usage for the calling subject on an agent",
|
|
23984
|
+
"properties" : {
|
|
23985
|
+
"limit" : {
|
|
23986
|
+
"description" : "Max prompts allowed in the sliding window",
|
|
23987
|
+
"type" : "integer"
|
|
23988
|
+
},
|
|
23989
|
+
"used" : {
|
|
23990
|
+
"description" : "Prompts already consumed in the current window",
|
|
23991
|
+
"type" : "integer"
|
|
23992
|
+
},
|
|
23993
|
+
"remaining" : {
|
|
23994
|
+
"description" : "Prompts left before rate limiting",
|
|
23995
|
+
"type" : "integer"
|
|
23996
|
+
},
|
|
23997
|
+
"resetSeconds" : {
|
|
23998
|
+
"description" : "Seconds until the oldest event in the window expires",
|
|
23999
|
+
"type" : "integer"
|
|
24000
|
+
}
|
|
24001
|
+
},
|
|
24002
|
+
"required" : [ "limit", "remaining", "resetSeconds", "used" ],
|
|
24003
|
+
"type" : "object"
|
|
24004
|
+
},
|
|
24005
|
+
"AgentRateLimitSettings" : {
|
|
24006
|
+
"properties" : {
|
|
24007
|
+
"organizationId" : {
|
|
24008
|
+
"format" : "uuid",
|
|
24009
|
+
"type" : "string"
|
|
24010
|
+
},
|
|
24011
|
+
"enabled" : {
|
|
24012
|
+
"description" : "Enable agent chat rate limiting for this organization",
|
|
24013
|
+
"type" : "boolean"
|
|
24014
|
+
},
|
|
24015
|
+
"maxConcurrentTurnsPerSubject" : {
|
|
24016
|
+
"description" : "Max concurrent agent turns per user (chat agent)",
|
|
24017
|
+
"minimum" : 1,
|
|
24018
|
+
"type" : "integer"
|
|
24019
|
+
},
|
|
24020
|
+
"maxConversationCreatesPerSubjectPerMinute" : {
|
|
24021
|
+
"description" : "Max new conversations per user per minute",
|
|
24022
|
+
"minimum" : 1,
|
|
24023
|
+
"type" : "integer"
|
|
24024
|
+
},
|
|
24025
|
+
"maxPromptsPerSubjectPerAgentPerMinute" : {
|
|
24026
|
+
"description" : "Max prompts (messages) per user per agent per minute",
|
|
24027
|
+
"minimum" : 1,
|
|
24028
|
+
"type" : "integer"
|
|
24029
|
+
},
|
|
24030
|
+
"windowMs" : {
|
|
24031
|
+
"description" : "Platform-fixed sliding window for prompt and conversation counters (milliseconds). Not configurable per organization.",
|
|
24032
|
+
"minimum" : 1000,
|
|
24033
|
+
"type" : "integer"
|
|
24034
|
+
},
|
|
24035
|
+
"concurrencyLeaseMs" : {
|
|
24036
|
+
"description" : "Platform-fixed max duration of a concurrency slot if release is never called (milliseconds). Not configurable per organization.",
|
|
24037
|
+
"minimum" : 1000,
|
|
24038
|
+
"type" : "integer"
|
|
24039
|
+
},
|
|
24040
|
+
"updatedAt" : {
|
|
24041
|
+
"format" : "date-time",
|
|
24042
|
+
"type" : "string"
|
|
24043
|
+
},
|
|
24044
|
+
"updatedBy" : {
|
|
24045
|
+
"nullable" : true,
|
|
24046
|
+
"type" : "string"
|
|
24047
|
+
}
|
|
24048
|
+
},
|
|
24049
|
+
"required" : [ "concurrencyLeaseMs", "enabled", "maxConcurrentTurnsPerSubject", "maxConversationCreatesPerSubjectPerMinute", "maxPromptsPerSubjectPerAgentPerMinute", "organizationId", "updatedAt", "windowMs" ],
|
|
24050
|
+
"type" : "object"
|
|
24051
|
+
},
|
|
24052
|
+
"AgentRateLimitSettingsUpdateRequest" : {
|
|
24053
|
+
"properties" : {
|
|
24054
|
+
"enabled" : {
|
|
24055
|
+
"type" : "boolean"
|
|
24056
|
+
},
|
|
24057
|
+
"maxConcurrentTurnsPerSubject" : {
|
|
24058
|
+
"minimum" : 1,
|
|
24059
|
+
"type" : "integer"
|
|
24060
|
+
},
|
|
24061
|
+
"maxConversationCreatesPerSubjectPerMinute" : {
|
|
24062
|
+
"minimum" : 1,
|
|
24063
|
+
"type" : "integer"
|
|
24064
|
+
},
|
|
24065
|
+
"maxPromptsPerSubjectPerAgentPerMinute" : {
|
|
24066
|
+
"minimum" : 1,
|
|
24067
|
+
"type" : "integer"
|
|
24068
|
+
}
|
|
24069
|
+
},
|
|
24070
|
+
"type" : "object"
|
|
24071
|
+
},
|
|
23746
24072
|
"PromptCreateRequest" : {
|
|
23747
24073
|
"allOf" : [ {
|
|
23748
24074
|
"$ref" : "#/components/schemas/PromptFlowCreateRequest"
|
|
@@ -24528,6 +24854,78 @@
|
|
|
24528
24854
|
"required" : [ "inputTokens", "key", "label", "outputTokens", "requests", "totalTokens" ],
|
|
24529
24855
|
"type" : "object"
|
|
24530
24856
|
},
|
|
24857
|
+
"AiGatewaySettings" : {
|
|
24858
|
+
"properties" : {
|
|
24859
|
+
"organizationId" : {
|
|
24860
|
+
"format" : "uuid",
|
|
24861
|
+
"type" : "string"
|
|
24862
|
+
},
|
|
24863
|
+
"gatewayRpm" : {
|
|
24864
|
+
"description" : "Max requests per minute per subject; null means unlimited",
|
|
24865
|
+
"nullable" : true,
|
|
24866
|
+
"type" : "integer"
|
|
24867
|
+
},
|
|
24868
|
+
"modelTokenQuotas" : {
|
|
24869
|
+
"items" : {
|
|
24870
|
+
"$ref" : "#/components/schemas/AiGatewayModelTokenQuota"
|
|
24871
|
+
},
|
|
24872
|
+
"type" : "array"
|
|
24873
|
+
},
|
|
24874
|
+
"updatedAt" : {
|
|
24875
|
+
"format" : "date-time",
|
|
24876
|
+
"type" : "string"
|
|
24877
|
+
},
|
|
24878
|
+
"updatedBy" : {
|
|
24879
|
+
"nullable" : true,
|
|
24880
|
+
"type" : "string"
|
|
24881
|
+
}
|
|
24882
|
+
},
|
|
24883
|
+
"required" : [ "gatewayRpm", "modelTokenQuotas", "organizationId", "updatedAt" ],
|
|
24884
|
+
"type" : "object"
|
|
24885
|
+
},
|
|
24886
|
+
"AiGatewayModelTokenQuota" : {
|
|
24887
|
+
"properties" : {
|
|
24888
|
+
"userId" : {
|
|
24889
|
+
"description" : "Breign user id this quota applies to",
|
|
24890
|
+
"type" : "string"
|
|
24891
|
+
},
|
|
24892
|
+
"model" : {
|
|
24893
|
+
"description" : "Bare model id or qualified providerId/modelId",
|
|
24894
|
+
"type" : "string"
|
|
24895
|
+
},
|
|
24896
|
+
"providerId" : {
|
|
24897
|
+
"nullable" : true,
|
|
24898
|
+
"type" : "string"
|
|
24899
|
+
},
|
|
24900
|
+
"limit" : {
|
|
24901
|
+
"description" : "Token cap for this user and period (input + output + reasoning)",
|
|
24902
|
+
"minimum" : 1,
|
|
24903
|
+
"type" : "integer"
|
|
24904
|
+
},
|
|
24905
|
+
"period" : {
|
|
24906
|
+
"enum" : [ "day", "month" ],
|
|
24907
|
+
"type" : "string"
|
|
24908
|
+
}
|
|
24909
|
+
},
|
|
24910
|
+
"required" : [ "limit", "model", "period", "userId" ],
|
|
24911
|
+
"type" : "object"
|
|
24912
|
+
},
|
|
24913
|
+
"AiGatewaySettingsUpdateRequest" : {
|
|
24914
|
+
"properties" : {
|
|
24915
|
+
"gatewayRpm" : {
|
|
24916
|
+
"minimum" : 1,
|
|
24917
|
+
"nullable" : true,
|
|
24918
|
+
"type" : "integer"
|
|
24919
|
+
},
|
|
24920
|
+
"modelTokenQuotas" : {
|
|
24921
|
+
"items" : {
|
|
24922
|
+
"$ref" : "#/components/schemas/AiGatewayModelTokenQuota"
|
|
24923
|
+
},
|
|
24924
|
+
"type" : "array"
|
|
24925
|
+
}
|
|
24926
|
+
},
|
|
24927
|
+
"type" : "object"
|
|
24928
|
+
},
|
|
24531
24929
|
"AiGatewayV1ModelList" : {
|
|
24532
24930
|
"properties" : {
|
|
24533
24931
|
"object" : {
|