@byte_fluffy/nexra-sdk 0.1.0-alpha.37 → 0.1.0-alpha.39

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.
@@ -2,7 +2,7 @@ import {
2
2
  normalizePublicErrorInput,
3
3
  pickPublicErrorFields,
4
4
  sortRatioDisplayOrder
5
- } from "./chunk-AAGTZN2G.js";
5
+ } from "./chunk-EFSKJCKB.js";
6
6
 
7
7
  // src/catalog/generated/audio.generated.json
8
8
  var audio_generated_default = [
@@ -23240,7 +23240,42 @@ var language_generated_default = [
23240
23240
  description: "Gemini contents \u5217\u8868\u3002",
23241
23241
  items: {
23242
23242
  type: "object",
23243
- additionalProperties: true
23243
+ additionalProperties: true,
23244
+ properties: {
23245
+ parts: {
23246
+ type: "array",
23247
+ items: {
23248
+ type: "object",
23249
+ additionalProperties: true,
23250
+ properties: {
23251
+ fileData: {
23252
+ type: "object",
23253
+ description: "Video files supplied by HTTP URL must not exceed 15 MB (15,000,000 bytes). Compress larger videos or supply a supported Google Cloud Storage URI.",
23254
+ additionalProperties: true,
23255
+ properties: {
23256
+ mimeType: {
23257
+ type: "string"
23258
+ },
23259
+ fileUri: {
23260
+ type: "string",
23261
+ format: "uri"
23262
+ }
23263
+ },
23264
+ "x-resource": {
23265
+ uriProperty: "fileUri",
23266
+ mimeTypeProperty: "mimeType",
23267
+ mimeTypePrefix: "video/",
23268
+ uriSchemes: [
23269
+ "http",
23270
+ "https"
23271
+ ],
23272
+ maxBytes: 15e6
23273
+ }
23274
+ }
23275
+ }
23276
+ }
23277
+ }
23278
+ }
23244
23279
  },
23245
23280
  "x-ui": {
23246
23281
  order: 1
@@ -24449,22 +24484,624 @@ var language_generated_default = [
24449
24484
  thinkingLevel: {
24450
24485
  type: "string",
24451
24486
  enum: [
24452
- "minimal",
24487
+ "minimal",
24488
+ "low",
24489
+ "medium",
24490
+ "high"
24491
+ ],
24492
+ title: "Thinking level",
24493
+ description: "Amount of reasoning the model should perform before returning its response."
24494
+ },
24495
+ includeThoughts: {
24496
+ type: "boolean",
24497
+ description: "Whether to include thought parts in the response. This does not enable or disable reasoning; Gemini thinking is controlled by thinking_level.",
24498
+ title: "Include thoughts"
24499
+ }
24500
+ },
24501
+ additionalProperties: true
24502
+ }
24503
+ },
24504
+ additionalProperties: true,
24505
+ "x-ui": {
24506
+ order: 4
24507
+ }
24508
+ },
24509
+ tools: {
24510
+ type: "array",
24511
+ items: {
24512
+ type: "object",
24513
+ additionalProperties: true
24514
+ },
24515
+ "x-ui": {
24516
+ order: 2
24517
+ }
24518
+ },
24519
+ toolConfig: {
24520
+ type: "object",
24521
+ additionalProperties: true,
24522
+ "x-ui": {
24523
+ order: 3
24524
+ }
24525
+ }
24526
+ },
24527
+ required: [
24528
+ "contents"
24529
+ ],
24530
+ additionalProperties: true
24531
+ },
24532
+ outputSchema: {
24533
+ type: "object",
24534
+ description: "\u534F\u8BAE\u539F\u751F\u54CD\u5E94\uFF1B\u6D41\u5F0F\u8BF7\u6C42\u8FD4\u56DE\u8BE5\u534F\u8BAE\u5B9A\u4E49\u7684\u4E8B\u4EF6\u6D41\u3002",
24535
+ additionalProperties: true
24536
+ }
24537
+ },
24538
+ {
24539
+ endpointKey: "responses",
24540
+ operation: "language.generate",
24541
+ protocol: "openai-responses",
24542
+ method: "POST",
24543
+ path: "/v1/responses",
24544
+ capabilities: [
24545
+ "reasoning",
24546
+ "sse",
24547
+ "text",
24548
+ "tool_call"
24549
+ ],
24550
+ inputSchema: {
24551
+ type: "object",
24552
+ properties: {
24553
+ model: {
24554
+ type: "string",
24555
+ description: "Nexra \u516C\u5171\u6A21\u578B ID\uFF0C\u5FC5\u987B\u4E0E\u5916\u5C42 modelId \u76F8\u540C\u3002",
24556
+ "x-ui": {
24557
+ order: 0
24558
+ },
24559
+ title: "\u6A21\u578B ID",
24560
+ const: "google/gemini-3.6-flash",
24561
+ examples: [
24562
+ "google/gemini-3.6-flash"
24563
+ ]
24564
+ },
24565
+ input: {
24566
+ description: "Responses \u6587\u672C\u3001\u6D88\u606F\u6216\u8F93\u5165\u9879\u3002",
24567
+ "x-ui": {
24568
+ order: 2
24569
+ }
24570
+ },
24571
+ instructions: {
24572
+ type: "string",
24573
+ description: "\u7CFB\u7EDF\u6216\u5F00\u53D1\u8005\u6307\u4EE4\u3002",
24574
+ "x-ui": {
24575
+ order: 1
24576
+ }
24577
+ },
24578
+ stream: {
24579
+ type: "boolean",
24580
+ description: "\u662F\u5426\u8FD4\u56DE Responses \u7C7B\u578B\u5316 SSE\u3002",
24581
+ "x-ui": {
24582
+ order: 7
24583
+ },
24584
+ default: false
24585
+ },
24586
+ max_output_tokens: {
24587
+ type: "integer",
24588
+ minimum: 1,
24589
+ maximum: 65536,
24590
+ title: "Maximum output tokens",
24591
+ description: "\u672C\u6B21\u751F\u6210\u5141\u8BB8\u7684\u6700\u5927\u8F93\u51FA token \u6570\u3002",
24592
+ "x-ui": {
24593
+ order: 6
24594
+ }
24595
+ },
24596
+ previous_response_id: {
24597
+ type: "string"
24598
+ },
24599
+ metadata: {
24600
+ type: "object",
24601
+ additionalProperties: true
24602
+ },
24603
+ tools: {
24604
+ type: "array",
24605
+ items: {
24606
+ type: "object",
24607
+ additionalProperties: true
24608
+ },
24609
+ "x-ui": {
24610
+ order: 3
24611
+ }
24612
+ },
24613
+ tool_choice: {
24614
+ "x-ui": {
24615
+ order: 4
24616
+ }
24617
+ },
24618
+ reasoning: {
24619
+ type: "object",
24620
+ properties: {},
24621
+ additionalProperties: true,
24622
+ "x-ui": {
24623
+ order: 5
24624
+ }
24625
+ }
24626
+ },
24627
+ required: [
24628
+ "model",
24629
+ "input"
24630
+ ],
24631
+ additionalProperties: true
24632
+ },
24633
+ outputSchema: {
24634
+ type: "object",
24635
+ description: "\u534F\u8BAE\u539F\u751F\u54CD\u5E94\uFF1B\u6D41\u5F0F\u8BF7\u6C42\u8FD4\u56DE\u8BE5\u534F\u8BAE\u5B9A\u4E49\u7684\u4E8B\u4EF6\u6D41\u3002",
24636
+ additionalProperties: true
24637
+ }
24638
+ }
24639
+ ]
24640
+ },
24641
+ {
24642
+ id: "google/gemini-3-8-flash",
24643
+ contractVersion: 1,
24644
+ developer: "google",
24645
+ displayName: "Gemini 3.8 Flash",
24646
+ summary: "Generate multimodal text responses with Gemini 3.8 Flash using native Gemini contents, tools, and low, medium, or high thinking.",
24647
+ kind: "language",
24648
+ family: "Gemini Flash",
24649
+ versionLabel: "3.8",
24650
+ aliases: [
24651
+ "gemini-3.8-flash",
24652
+ "google/gemini-3.8-flash"
24653
+ ],
24654
+ capabilities: {
24655
+ inputModalities: [
24656
+ "text",
24657
+ "image",
24658
+ "video",
24659
+ "audio"
24660
+ ],
24661
+ outputModalities: [
24662
+ "text"
24663
+ ],
24664
+ inputModes: [
24665
+ "text-to-text",
24666
+ "multimodal-to-text"
24667
+ ],
24668
+ features: [
24669
+ "reasoning",
24670
+ "function-calling"
24671
+ ],
24672
+ contextWindowTokens: 1048576,
24673
+ maxOutputTokens: 65536
24674
+ },
24675
+ operations: [
24676
+ {
24677
+ operation: "language.generate",
24678
+ inputModalities: [
24679
+ "text",
24680
+ "image",
24681
+ "video",
24682
+ "audio"
24683
+ ],
24684
+ outputModalities: [
24685
+ "text"
24686
+ ],
24687
+ inputSchema: {
24688
+ type: "object",
24689
+ properties: {
24690
+ audios: {
24691
+ type: "array",
24692
+ items: {
24693
+ oneOf: [
24694
+ {
24695
+ type: "string",
24696
+ format: "uri"
24697
+ },
24698
+ {
24699
+ type: "object",
24700
+ properties: {
24701
+ url: {
24702
+ type: "string",
24703
+ format: "uri"
24704
+ },
24705
+ role: {
24706
+ type: "string",
24707
+ enum: [
24708
+ "default"
24709
+ ]
24710
+ }
24711
+ },
24712
+ required: [
24713
+ "url"
24714
+ ],
24715
+ additionalProperties: false
24716
+ },
24717
+ {
24718
+ type: "object",
24719
+ properties: {
24720
+ assetId: {
24721
+ type: "string",
24722
+ minLength: 1
24723
+ },
24724
+ role: {
24725
+ type: "string",
24726
+ enum: [
24727
+ "default"
24728
+ ]
24729
+ }
24730
+ },
24731
+ required: [
24732
+ "assetId"
24733
+ ],
24734
+ additionalProperties: false
24735
+ }
24736
+ ]
24737
+ },
24738
+ description: "Audio inputs; assign a role when the model exposes role-specific behavior.",
24739
+ minItems: 1,
24740
+ maxItems: 1,
24741
+ "x-ui": {
24742
+ order: 4,
24743
+ control: "media",
24744
+ roles: [
24745
+ "default"
24746
+ ],
24747
+ accept: [
24748
+ "url"
24749
+ ]
24750
+ }
24751
+ },
24752
+ contents: {
24753
+ type: "array",
24754
+ description: "\u9AD8\u7EA7\u7528\u6CD5\uFF1A\u5B8C\u6574 Gemini contents \u5386\u53F2\u3002\u56DE\u4F20 functionResponse \u65F6\u4F7F\u7528\uFF1B\u4F20\u5165\u540E\u4F1A\u8986\u76D6 input \u7684 texts/images/videos/audios \u81EA\u52A8\u7EC4\u88C5\u3002",
24755
+ minItems: 1,
24756
+ items: {
24757
+ type: "object",
24758
+ additionalProperties: true,
24759
+ description: "A provider-native Gemini Content object containing a role and parts."
24760
+ },
24761
+ "x-ui": {
24762
+ order: 1,
24763
+ control: "json"
24764
+ }
24765
+ },
24766
+ function_calling_config: {
24767
+ type: "object",
24768
+ description: "\u7B80\u5199\u5F62\u5F0F\uFF1B\u4F1A\u88AB\u5305\u88C5\u4E3A tool_config.function_calling_config\u3002",
24769
+ "x-ui": {
24770
+ order: 5,
24771
+ control: "json"
24772
+ }
24773
+ },
24774
+ images: {
24775
+ type: "array",
24776
+ items: {
24777
+ oneOf: [
24778
+ {
24779
+ type: "string",
24780
+ format: "uri"
24781
+ },
24782
+ {
24783
+ type: "object",
24784
+ properties: {
24785
+ url: {
24786
+ type: "string",
24787
+ format: "uri"
24788
+ },
24789
+ role: {
24790
+ type: "string",
24791
+ enum: [
24792
+ "default"
24793
+ ]
24794
+ }
24795
+ },
24796
+ required: [
24797
+ "url"
24798
+ ],
24799
+ additionalProperties: false
24800
+ },
24801
+ {
24802
+ type: "object",
24803
+ properties: {
24804
+ assetId: {
24805
+ type: "string",
24806
+ minLength: 1
24807
+ },
24808
+ role: {
24809
+ type: "string",
24810
+ enum: [
24811
+ "default"
24812
+ ]
24813
+ }
24814
+ },
24815
+ required: [
24816
+ "assetId"
24817
+ ],
24818
+ additionalProperties: false
24819
+ }
24820
+ ]
24821
+ },
24822
+ description: "Image inputs; assign a role when the model exposes role-specific behavior.",
24823
+ minItems: 1,
24824
+ maxItems: 3e3,
24825
+ "x-ui": {
24826
+ order: 2,
24827
+ control: "media",
24828
+ roles: [
24829
+ "default"
24830
+ ],
24831
+ accept: [
24832
+ "url"
24833
+ ]
24834
+ }
24835
+ },
24836
+ is_stream: {
24837
+ type: "boolean",
24838
+ description: "Whether to stream response events as they are generated.",
24839
+ "x-ui": {
24840
+ order: 6,
24841
+ control: "switch"
24842
+ }
24843
+ },
24844
+ is_thinking: {
24845
+ type: "boolean",
24846
+ description: "Whether to include thought parts in the response. This does not enable or disable reasoning; Gemini thinking is controlled by thinking_level.",
24847
+ title: "Include thoughts",
24848
+ "x-ui": {
24849
+ order: 7,
24850
+ control: "switch"
24851
+ }
24852
+ },
24853
+ texts: {
24854
+ type: "string",
24855
+ description: "User message or instruction to send to the language model.",
24856
+ minLength: 1,
24857
+ title: "Message",
24858
+ "x-ui": {
24859
+ order: 0,
24860
+ control: "textarea"
24861
+ }
24862
+ },
24863
+ thinking_level: {
24864
+ type: "string",
24865
+ enum: [
24866
+ "low",
24867
+ "medium",
24868
+ "high"
24869
+ ],
24870
+ title: "Thinking level",
24871
+ description: "Amount of reasoning the model should perform before returning its response.",
24872
+ "x-ui": {
24873
+ order: 9,
24874
+ control: "segmented"
24875
+ },
24876
+ default: "medium"
24877
+ },
24878
+ tool_config: {
24879
+ type: "object",
24880
+ description: "Gemini ToolConfig\uFF0C\u53EF\u8BBE\u7F6E functionCallingConfig/function_calling_config \u7684 mode\u3001allowedFunctionNames \u7B49\u3002",
24881
+ "x-ui": {
24882
+ order: 10,
24883
+ control: "json"
24884
+ }
24885
+ },
24886
+ tools: {
24887
+ type: "array",
24888
+ description: "Gemini Tool \u6570\u7EC4\uFF0C\u652F\u6301\u5B98\u65B9 REST camelCase\uFF08functionDeclarations\uFF09\u6216 SDK snake_case\uFF08function_declarations\uFF09\u3002",
24889
+ "x-ui": {
24890
+ order: 11,
24891
+ control: "json"
24892
+ }
24893
+ },
24894
+ videos: {
24895
+ type: "array",
24896
+ items: {
24897
+ oneOf: [
24898
+ {
24899
+ type: "string",
24900
+ format: "uri"
24901
+ },
24902
+ {
24903
+ type: "object",
24904
+ properties: {
24905
+ url: {
24906
+ type: "string",
24907
+ format: "uri"
24908
+ },
24909
+ role: {
24910
+ type: "string",
24911
+ enum: [
24912
+ "default"
24913
+ ]
24914
+ }
24915
+ },
24916
+ required: [
24917
+ "url"
24918
+ ],
24919
+ additionalProperties: false
24920
+ },
24921
+ {
24922
+ type: "object",
24923
+ properties: {
24924
+ assetId: {
24925
+ type: "string",
24926
+ minLength: 1
24927
+ },
24928
+ role: {
24929
+ type: "string",
24930
+ enum: [
24931
+ "default"
24932
+ ]
24933
+ }
24934
+ },
24935
+ required: [
24936
+ "assetId"
24937
+ ],
24938
+ additionalProperties: false
24939
+ }
24940
+ ]
24941
+ },
24942
+ description: "Video inputs; assign a role when the model exposes role-specific behavior.",
24943
+ minItems: 1,
24944
+ maxItems: 10,
24945
+ "x-ui": {
24946
+ order: 3,
24947
+ control: "media",
24948
+ roles: [
24949
+ "default"
24950
+ ],
24951
+ accept: [
24952
+ "url"
24953
+ ]
24954
+ }
24955
+ },
24956
+ max_output_tokens: {
24957
+ type: "integer",
24958
+ minimum: 1,
24959
+ maximum: 65536,
24960
+ title: "Maximum output tokens",
24961
+ description: "Maximum number of response and reasoning tokens to generate.",
24962
+ "x-ui": {
24963
+ order: 8,
24964
+ control: "number"
24965
+ }
24966
+ }
24967
+ },
24968
+ additionalProperties: false,
24969
+ anyOf: [
24970
+ {
24971
+ required: [
24972
+ "texts"
24973
+ ]
24974
+ },
24975
+ {
24976
+ required: [
24977
+ "contents"
24978
+ ]
24979
+ }
24980
+ ]
24981
+ },
24982
+ outputSchema: {
24983
+ type: "object",
24984
+ properties: {
24985
+ text: {
24986
+ type: "string",
24987
+ description: "\u6B63\u6587\uFF1B\u6D41\u5F0F NDJSON \u884C\u5185 `response` \u7247\u6BB5\u540C\u7ED3\u6784"
24988
+ },
24989
+ reasoning: {
24990
+ type: "string",
24991
+ description: "\u6DF1\u5EA6\u601D\u8003\uFF08thought\uFF09\u65F6\u51FA\u73B0"
24992
+ },
24993
+ function_calls: {
24994
+ type: "array",
24995
+ items: {
24996
+ type: "object"
24997
+ },
24998
+ description: "Gemini function calling \u8FD4\u56DE\u7684\u51FD\u6570\u8C03\u7528\u6570\u7EC4\uFF1B\u6BCF\u9879\u5305\u542B name\u3001args\uFF0C\u53EF\u80FD\u5305\u542B id"
24999
+ }
25000
+ },
25001
+ additionalProperties: false
25002
+ },
25003
+ metering: {
25004
+ schemaVersion: 1,
25005
+ kind: "token",
25006
+ metrics: [
25007
+ {
25008
+ metric: "requests",
25009
+ requirement: "required"
25010
+ },
25011
+ {
25012
+ metric: "input_tokens",
25013
+ requirement: "required"
25014
+ },
25015
+ {
25016
+ metric: "cached_input_tokens",
25017
+ requirement: "informational"
25018
+ },
25019
+ {
25020
+ metric: "output_tokens",
25021
+ requirement: "required"
25022
+ }
25023
+ ]
25024
+ }
25025
+ }
25026
+ ],
25027
+ endpoints: [
25028
+ {
25029
+ endpointKey: "generate-content",
25030
+ operation: "language.generate",
25031
+ protocol: "gemini-generate-content",
25032
+ method: "POST",
25033
+ path: "/v1beta/models/{model}:generateContent",
25034
+ capabilities: [
25035
+ "reasoning",
25036
+ "sse",
25037
+ "text",
25038
+ "tool_call"
25039
+ ],
25040
+ inputSchema: {
25041
+ type: "object",
25042
+ properties: {
25043
+ contents: {
25044
+ type: "array",
25045
+ minItems: 1,
25046
+ description: "Gemini contents \u5217\u8868\u3002",
25047
+ items: {
25048
+ type: "object",
25049
+ additionalProperties: true
25050
+ },
25051
+ "x-ui": {
25052
+ order: 1
25053
+ }
25054
+ },
25055
+ systemInstruction: {
25056
+ type: "object",
25057
+ additionalProperties: true,
25058
+ "x-ui": {
25059
+ order: 0
25060
+ }
25061
+ },
25062
+ generationConfig: {
25063
+ type: "object",
25064
+ description: "\u6A21\u578B\u751F\u6210\u53C2\u6570\uFF1B\u5DF2\u77E5\u9650\u5236\u7531\u5177\u4F53\u6A21\u578B\u6536\u7A84\u3002",
25065
+ properties: {
25066
+ maxOutputTokens: {
25067
+ type: "integer",
25068
+ minimum: 1,
25069
+ maximum: 65536,
25070
+ title: "Maximum output tokens",
25071
+ description: "Maximum number of response and reasoning tokens to generate."
25072
+ },
25073
+ thinkingConfig: {
25074
+ type: "object",
25075
+ properties: {
25076
+ thinkingLevel: {
25077
+ type: "string",
25078
+ enum: [
24453
25079
  "low",
24454
25080
  "medium",
24455
- "high"
25081
+ "high",
25082
+ "LOW",
25083
+ "MEDIUM",
25084
+ "HIGH"
24456
25085
  ],
24457
25086
  title: "Thinking level",
24458
- description: "Amount of reasoning the model should perform before returning its response."
25087
+ description: "Amount of reasoning the model should perform before returning its response.",
25088
+ default: "medium"
24459
25089
  },
24460
25090
  includeThoughts: {
24461
25091
  type: "boolean",
24462
25092
  description: "Whether to include thought parts in the response. This does not enable or disable reasoning; Gemini thinking is controlled by thinking_level.",
24463
25093
  title: "Include thoughts"
24464
- }
25094
+ },
25095
+ thinkingBudget: false
24465
25096
  },
24466
25097
  additionalProperties: true
24467
- }
25098
+ },
25099
+ temperature: false,
25100
+ topP: false,
25101
+ topK: false,
25102
+ candidateCount: false,
25103
+ frequencyPenalty: false,
25104
+ presencePenalty: false
24468
25105
  },
24469
25106
  additionalProperties: true,
24470
25107
  "x-ui": {
@@ -24522,9 +25159,9 @@ var language_generated_default = [
24522
25159
  order: 0
24523
25160
  },
24524
25161
  title: "\u6A21\u578B ID",
24525
- const: "google/gemini-3.6-flash",
25162
+ const: "google/gemini-3-8-flash",
24526
25163
  examples: [
24527
- "google/gemini-3.6-flash"
25164
+ "google/gemini-3-8-flash"
24528
25165
  ]
24529
25166
  },
24530
25167
  input: {
@@ -24582,7 +25219,25 @@ var language_generated_default = [
24582
25219
  },
24583
25220
  reasoning: {
24584
25221
  type: "object",
24585
- properties: {},
25222
+ properties: {
25223
+ effort: {
25224
+ type: "string",
25225
+ enum: [
25226
+ "low",
25227
+ "medium",
25228
+ "high"
25229
+ ],
25230
+ default: "medium"
25231
+ },
25232
+ summary: {
25233
+ type: "string",
25234
+ enum: [
25235
+ "auto",
25236
+ "concise",
25237
+ "detailed"
25238
+ ]
25239
+ }
25240
+ },
24586
25241
  additionalProperties: true,
24587
25242
  "x-ui": {
24588
25243
  order: 5
@@ -24604,17 +25259,16 @@ var language_generated_default = [
24604
25259
  ]
24605
25260
  },
24606
25261
  {
24607
- id: "google/gemini-3-8-flash",
25262
+ id: "google/gemini-4-argon",
24608
25263
  contractVersion: 1,
24609
25264
  developer: "google",
24610
- displayName: "Gemini 3.8 Flash",
24611
- summary: "Generate multimodal text responses with Gemini 3.8 Flash using native Gemini contents, tools, and low, medium, or high thinking.",
25265
+ displayName: "Gemini 4 Argon",
25266
+ summary: "Generate multimodal text responses with Gemini 4 Argon using native Gemini contents, client-side tools, structured output, and low, medium, or high thinking.",
24612
25267
  kind: "language",
24613
- family: "Gemini Flash",
24614
- versionLabel: "3.8",
25268
+ family: "Gemini Argon",
25269
+ versionLabel: "4",
24615
25270
  aliases: [
24616
- "gemini-3.8-flash",
24617
- "google/gemini-3.8-flash"
25271
+ "gemini-4-argon"
24618
25272
  ],
24619
25273
  capabilities: {
24620
25274
  inputModalities: [
@@ -24716,7 +25370,7 @@ var language_generated_default = [
24716
25370
  },
24717
25371
  contents: {
24718
25372
  type: "array",
24719
- description: "\u9AD8\u7EA7\u7528\u6CD5\uFF1A\u5B8C\u6574 Gemini contents \u5386\u53F2\u3002\u56DE\u4F20 functionResponse \u65F6\u4F7F\u7528\uFF1B\u4F20\u5165\u540E\u4F1A\u8986\u76D6 input \u7684 texts/images/videos/audios \u81EA\u52A8\u7EC4\u88C5\u3002",
25373
+ description: "Full Gemini contents history. When provided, it replaces automatic message and media assembly.",
24720
25374
  minItems: 1,
24721
25375
  items: {
24722
25376
  type: "object",
@@ -24730,7 +25384,7 @@ var language_generated_default = [
24730
25384
  },
24731
25385
  function_calling_config: {
24732
25386
  type: "object",
24733
- description: "\u7B80\u5199\u5F62\u5F0F\uFF1B\u4F1A\u88AB\u5305\u88C5\u4E3A tool_config.function_calling_config\u3002",
25387
+ description: "Shorthand for tool_config.function_calling_config.",
24734
25388
  "x-ui": {
24735
25389
  order: 5,
24736
25390
  control: "json"
@@ -24808,7 +25462,7 @@ var language_generated_default = [
24808
25462
  },
24809
25463
  is_thinking: {
24810
25464
  type: "boolean",
24811
- description: "Whether to include thought parts in the response. This does not enable or disable reasoning; Gemini thinking is controlled by thinking_level.",
25465
+ description: "Whether to include thought parts in the response. This does not enable or disable reasoning.",
24812
25466
  title: "Include thoughts",
24813
25467
  "x-ui": {
24814
25468
  order: 7,
@@ -24842,7 +25496,7 @@ var language_generated_default = [
24842
25496
  },
24843
25497
  tool_config: {
24844
25498
  type: "object",
24845
- description: "Gemini ToolConfig\uFF0C\u53EF\u8BBE\u7F6E functionCallingConfig/function_calling_config \u7684 mode\u3001allowedFunctionNames \u7B49\u3002",
25499
+ description: "Gemini ToolConfig including functionCallingConfig or function_calling_config, mode, and allowedFunctionNames.",
24846
25500
  "x-ui": {
24847
25501
  order: 10,
24848
25502
  control: "json"
@@ -24850,7 +25504,7 @@ var language_generated_default = [
24850
25504
  },
24851
25505
  tools: {
24852
25506
  type: "array",
24853
- description: "Gemini Tool \u6570\u7EC4\uFF0C\u652F\u6301\u5B98\u65B9 REST camelCase\uFF08functionDeclarations\uFF09\u6216 SDK snake_case\uFF08function_declarations\uFF09\u3002",
25507
+ description: "Gemini tools using REST functionDeclarations or SDK function_declarations.",
24854
25508
  "x-ui": {
24855
25509
  order: 11,
24856
25510
  control: "json"
@@ -24923,7 +25577,7 @@ var language_generated_default = [
24923
25577
  minimum: 1,
24924
25578
  maximum: 65536,
24925
25579
  title: "Maximum output tokens",
24926
- description: "Maximum number of response and reasoning tokens to generate.",
25580
+ description: "Maximum response and thinking tokens within the shared input and output context.",
24927
25581
  "x-ui": {
24928
25582
  order: 8,
24929
25583
  control: "number"
@@ -24942,6 +25596,29 @@ var language_generated_default = [
24942
25596
  "contents"
24943
25597
  ]
24944
25598
  }
25599
+ ],
25600
+ allOf: [
25601
+ {
25602
+ if: {
25603
+ properties: {
25604
+ is_stream: {
25605
+ const: true
25606
+ }
25607
+ },
25608
+ required: [
25609
+ "is_stream"
25610
+ ]
25611
+ },
25612
+ then: {},
25613
+ else: {
25614
+ properties: {
25615
+ max_output_tokens: {
25616
+ maximum: 32768,
25617
+ type: "integer"
25618
+ }
25619
+ }
25620
+ }
25621
+ }
24945
25622
  ]
24946
25623
  },
24947
25624
  outputSchema: {
@@ -24949,18 +25626,18 @@ var language_generated_default = [
24949
25626
  properties: {
24950
25627
  text: {
24951
25628
  type: "string",
24952
- description: "\u6B63\u6587\uFF1B\u6D41\u5F0F NDJSON \u884C\u5185 `response` \u7247\u6BB5\u540C\u7ED3\u6784"
25629
+ description: "Response body; each response fragment in streaming NDJSON uses the same structure."
24953
25630
  },
24954
25631
  reasoning: {
24955
25632
  type: "string",
24956
- description: "\u6DF1\u5EA6\u601D\u8003\uFF08thought\uFF09\u65F6\u51FA\u73B0"
25633
+ description: "Thinking content returned in thought parts."
24957
25634
  },
24958
25635
  function_calls: {
24959
25636
  type: "array",
24960
25637
  items: {
24961
25638
  type: "object"
24962
25639
  },
24963
- description: "Gemini function calling \u8FD4\u56DE\u7684\u51FD\u6570\u8C03\u7528\u6570\u7EC4\uFF1B\u6BCF\u9879\u5305\u542B name\u3001args\uFF0C\u53EF\u80FD\u5305\u542B id"
25640
+ description: "Gemini function calls containing name, args, and optionally id."
24964
25641
  }
24965
25642
  },
24966
25643
  additionalProperties: false
@@ -25002,13 +25679,279 @@ var language_generated_default = [
25002
25679
  "text",
25003
25680
  "tool_call"
25004
25681
  ],
25682
+ httpOperations: [
25683
+ {
25684
+ key: "generate",
25685
+ kind: "generate",
25686
+ httpMethod: "POST",
25687
+ pathTemplate: "/v1beta/models/{model}:generateContent",
25688
+ schemaProjection: "request",
25689
+ responseStatus: 200,
25690
+ documentationUrl: "https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-argon",
25691
+ bodyParameters: {
25692
+ type: "object",
25693
+ properties: {
25694
+ contents: {
25695
+ type: "array",
25696
+ minItems: 1,
25697
+ description: "Ordered Gemini contents with roles and parts.",
25698
+ items: {
25699
+ type: "object",
25700
+ additionalProperties: true
25701
+ },
25702
+ "x-ui": {
25703
+ order: 1
25704
+ }
25705
+ },
25706
+ systemInstruction: {
25707
+ type: "object",
25708
+ additionalProperties: true,
25709
+ "x-ui": {
25710
+ order: 0
25711
+ }
25712
+ },
25713
+ generationConfig: {
25714
+ type: "object",
25715
+ description: "Generation settings supported by this model.",
25716
+ properties: {
25717
+ maxOutputTokens: {
25718
+ type: "integer",
25719
+ minimum: 1,
25720
+ maximum: 32768,
25721
+ title: "Maximum output tokens",
25722
+ description: "Maximum response and thinking tokens within the shared input and output context."
25723
+ },
25724
+ thinkingConfig: {
25725
+ type: "object",
25726
+ properties: {
25727
+ thinkingLevel: {
25728
+ type: "string",
25729
+ enum: [
25730
+ "LOW",
25731
+ "MEDIUM",
25732
+ "HIGH"
25733
+ ],
25734
+ title: "Thinking level",
25735
+ description: "Amount of reasoning the model should perform before returning its response.",
25736
+ default: "MEDIUM"
25737
+ },
25738
+ includeThoughts: {
25739
+ type: "boolean",
25740
+ description: "Whether to include thought parts in the response. This does not enable or disable reasoning.",
25741
+ title: "Include thoughts"
25742
+ },
25743
+ thinkingBudget: false
25744
+ },
25745
+ additionalProperties: true
25746
+ },
25747
+ temperature: false,
25748
+ topP: false,
25749
+ topK: false,
25750
+ candidateCount: false,
25751
+ frequencyPenalty: false,
25752
+ presencePenalty: false
25753
+ },
25754
+ additionalProperties: true,
25755
+ "x-ui": {
25756
+ order: 4
25757
+ }
25758
+ },
25759
+ tools: {
25760
+ type: "array",
25761
+ items: {
25762
+ type: "object",
25763
+ additionalProperties: true
25764
+ },
25765
+ "x-ui": {
25766
+ order: 2
25767
+ }
25768
+ },
25769
+ toolConfig: {
25770
+ type: "object",
25771
+ additionalProperties: true,
25772
+ "x-ui": {
25773
+ order: 3
25774
+ }
25775
+ },
25776
+ cachedContent: false,
25777
+ continuationToken: false,
25778
+ continuation_token: false,
25779
+ cached_content: false
25780
+ },
25781
+ required: [
25782
+ "contents"
25783
+ ],
25784
+ additionalProperties: true,
25785
+ examples: [
25786
+ {
25787
+ contents: [
25788
+ {
25789
+ role: "user",
25790
+ parts: [
25791
+ {
25792
+ text: "Explain how durable task execution prevents duplicate work."
25793
+ }
25794
+ ]
25795
+ }
25796
+ ],
25797
+ generationConfig: {
25798
+ thinkingConfig: {
25799
+ thinkingLevel: "MEDIUM"
25800
+ },
25801
+ maxOutputTokens: 2048
25802
+ }
25803
+ }
25804
+ ]
25805
+ }
25806
+ },
25807
+ {
25808
+ key: "stream",
25809
+ kind: "stream",
25810
+ httpMethod: "POST",
25811
+ pathTemplate: "/v1beta/models/{model}:streamGenerateContent",
25812
+ schemaProjection: "request",
25813
+ responseStatus: 200,
25814
+ documentationUrl: "https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-argon",
25815
+ bodyParameters: {
25816
+ type: "object",
25817
+ properties: {
25818
+ contents: {
25819
+ type: "array",
25820
+ minItems: 1,
25821
+ description: "Ordered Gemini contents with roles and parts.",
25822
+ items: {
25823
+ type: "object",
25824
+ additionalProperties: true
25825
+ },
25826
+ "x-ui": {
25827
+ order: 1
25828
+ }
25829
+ },
25830
+ systemInstruction: {
25831
+ type: "object",
25832
+ additionalProperties: true,
25833
+ "x-ui": {
25834
+ order: 0
25835
+ }
25836
+ },
25837
+ generationConfig: {
25838
+ type: "object",
25839
+ description: "Generation settings supported by this model.",
25840
+ properties: {
25841
+ maxOutputTokens: {
25842
+ type: "integer",
25843
+ minimum: 1,
25844
+ maximum: 65536,
25845
+ title: "Maximum output tokens",
25846
+ description: "Maximum response and thinking tokens within the shared input and output context."
25847
+ },
25848
+ thinkingConfig: {
25849
+ type: "object",
25850
+ properties: {
25851
+ thinkingLevel: {
25852
+ type: "string",
25853
+ enum: [
25854
+ "LOW",
25855
+ "MEDIUM",
25856
+ "HIGH"
25857
+ ],
25858
+ title: "Thinking level",
25859
+ description: "Amount of reasoning the model should perform before returning its response.",
25860
+ default: "MEDIUM"
25861
+ },
25862
+ includeThoughts: {
25863
+ type: "boolean",
25864
+ description: "Whether to include thought parts in the response. This does not enable or disable reasoning.",
25865
+ title: "Include thoughts"
25866
+ },
25867
+ thinkingBudget: false
25868
+ },
25869
+ additionalProperties: true
25870
+ },
25871
+ temperature: false,
25872
+ topP: false,
25873
+ topK: false,
25874
+ candidateCount: false,
25875
+ frequencyPenalty: false,
25876
+ presencePenalty: false
25877
+ },
25878
+ additionalProperties: true,
25879
+ "x-ui": {
25880
+ order: 4
25881
+ }
25882
+ },
25883
+ tools: {
25884
+ type: "array",
25885
+ items: {
25886
+ type: "object",
25887
+ additionalProperties: true
25888
+ },
25889
+ "x-ui": {
25890
+ order: 2
25891
+ }
25892
+ },
25893
+ toolConfig: {
25894
+ type: "object",
25895
+ additionalProperties: true,
25896
+ "x-ui": {
25897
+ order: 3
25898
+ }
25899
+ },
25900
+ cachedContent: false,
25901
+ continuationToken: false,
25902
+ continuation_token: false,
25903
+ cached_content: false
25904
+ },
25905
+ required: [
25906
+ "contents"
25907
+ ],
25908
+ additionalProperties: true,
25909
+ examples: [
25910
+ {
25911
+ contents: [
25912
+ {
25913
+ role: "user",
25914
+ parts: [
25915
+ {
25916
+ text: "Explain how durable task execution prevents duplicate work."
25917
+ }
25918
+ ]
25919
+ }
25920
+ ],
25921
+ generationConfig: {
25922
+ thinkingConfig: {
25923
+ thinkingLevel: "MEDIUM"
25924
+ },
25925
+ maxOutputTokens: 2048
25926
+ }
25927
+ }
25928
+ ]
25929
+ },
25930
+ queryParameters: {
25931
+ type: "object",
25932
+ properties: {
25933
+ alt: {
25934
+ type: "string",
25935
+ enum: [
25936
+ "sse"
25937
+ ],
25938
+ description: "Use SSE framing for streaming Gemini responses.",
25939
+ examples: [
25940
+ "sse"
25941
+ ]
25942
+ }
25943
+ },
25944
+ additionalProperties: true
25945
+ }
25946
+ }
25947
+ ],
25005
25948
  inputSchema: {
25006
25949
  type: "object",
25007
25950
  properties: {
25008
25951
  contents: {
25009
25952
  type: "array",
25010
25953
  minItems: 1,
25011
- description: "Gemini contents \u5217\u8868\u3002",
25954
+ description: "Ordered Gemini contents with roles and parts.",
25012
25955
  items: {
25013
25956
  type: "object",
25014
25957
  additionalProperties: true
@@ -25026,14 +25969,14 @@ var language_generated_default = [
25026
25969
  },
25027
25970
  generationConfig: {
25028
25971
  type: "object",
25029
- description: "\u6A21\u578B\u751F\u6210\u53C2\u6570\uFF1B\u5DF2\u77E5\u9650\u5236\u7531\u5177\u4F53\u6A21\u578B\u6536\u7A84\u3002",
25972
+ description: "Generation settings supported by this model.",
25030
25973
  properties: {
25031
25974
  maxOutputTokens: {
25032
25975
  type: "integer",
25033
25976
  minimum: 1,
25034
25977
  maximum: 65536,
25035
25978
  title: "Maximum output tokens",
25036
- description: "Maximum number of response and reasoning tokens to generate."
25979
+ description: "Maximum response and thinking tokens within the shared input and output context."
25037
25980
  },
25038
25981
  thinkingConfig: {
25039
25982
  type: "object",
@@ -25041,20 +25984,17 @@ var language_generated_default = [
25041
25984
  thinkingLevel: {
25042
25985
  type: "string",
25043
25986
  enum: [
25044
- "low",
25045
- "medium",
25046
- "high",
25047
25987
  "LOW",
25048
25988
  "MEDIUM",
25049
25989
  "HIGH"
25050
25990
  ],
25051
25991
  title: "Thinking level",
25052
25992
  description: "Amount of reasoning the model should perform before returning its response.",
25053
- default: "medium"
25993
+ default: "MEDIUM"
25054
25994
  },
25055
25995
  includeThoughts: {
25056
25996
  type: "boolean",
25057
- description: "Whether to include thought parts in the response. This does not enable or disable reasoning; Gemini thinking is controlled by thinking_level.",
25997
+ description: "Whether to include thought parts in the response. This does not enable or disable reasoning.",
25058
25998
  title: "Include thoughts"
25059
25999
  },
25060
26000
  thinkingBudget: false
@@ -25089,7 +26029,11 @@ var language_generated_default = [
25089
26029
  "x-ui": {
25090
26030
  order: 3
25091
26031
  }
25092
- }
26032
+ },
26033
+ cachedContent: false,
26034
+ continuationToken: false,
26035
+ continuation_token: false,
26036
+ cached_content: false
25093
26037
  },
25094
26038
  required: [
25095
26039
  "contents"
@@ -25098,7 +26042,7 @@ var language_generated_default = [
25098
26042
  },
25099
26043
  outputSchema: {
25100
26044
  type: "object",
25101
- description: "\u534F\u8BAE\u539F\u751F\u54CD\u5E94\uFF1B\u6D41\u5F0F\u8BF7\u6C42\u8FD4\u56DE\u8BE5\u534F\u8BAE\u5B9A\u4E49\u7684\u4E8B\u4EF6\u6D41\u3002",
26045
+ description: "Protocol-native response; streaming requests return events defined by that protocol.",
25102
26046
  additionalProperties: true
25103
26047
  }
25104
26048
  },
@@ -25124,27 +26068,27 @@ var language_generated_default = [
25124
26068
  order: 0
25125
26069
  },
25126
26070
  title: "\u6A21\u578B ID",
25127
- const: "google/gemini-3-8-flash",
26071
+ const: "google/gemini-4-argon",
25128
26072
  examples: [
25129
- "google/gemini-3-8-flash"
26073
+ "google/gemini-4-argon"
25130
26074
  ]
25131
26075
  },
25132
26076
  input: {
25133
- description: "Responses \u6587\u672C\u3001\u6D88\u606F\u6216\u8F93\u5165\u9879\u3002",
26077
+ description: "Responses text, messages, or input items.",
25134
26078
  "x-ui": {
25135
26079
  order: 2
25136
26080
  }
25137
26081
  },
25138
26082
  instructions: {
25139
26083
  type: "string",
25140
- description: "\u7CFB\u7EDF\u6216\u5F00\u53D1\u8005\u6307\u4EE4\u3002",
26084
+ description: "System or developer instructions.",
25141
26085
  "x-ui": {
25142
26086
  order: 1
25143
26087
  }
25144
26088
  },
25145
26089
  stream: {
25146
26090
  type: "boolean",
25147
- description: "\u662F\u5426\u8FD4\u56DE Responses \u7C7B\u578B\u5316 SSE\u3002",
26091
+ description: "Whether to return a typed Responses SSE event stream.",
25148
26092
  "x-ui": {
25149
26093
  order: 7
25150
26094
  },
@@ -25155,7 +26099,7 @@ var language_generated_default = [
25155
26099
  minimum: 1,
25156
26100
  maximum: 65536,
25157
26101
  title: "Maximum output tokens",
25158
- description: "\u672C\u6B21\u751F\u6210\u5141\u8BB8\u7684\u6700\u5927\u8F93\u51FA token \u6570\u3002",
26102
+ description: "Maximum response and thinking tokens within the shared input and output context.",
25159
26103
  "x-ui": {
25160
26104
  order: 6
25161
26105
  }
@@ -25207,17 +26151,49 @@ var language_generated_default = [
25207
26151
  "x-ui": {
25208
26152
  order: 5
25209
26153
  }
25210
- }
26154
+ },
26155
+ temperature: false,
26156
+ top_p: false,
26157
+ top_k: false,
26158
+ frequency_penalty: false,
26159
+ presence_penalty: false,
26160
+ seed: false,
26161
+ n: false,
26162
+ prompt_cache_key: false,
26163
+ prompt_cache_retention: false
25211
26164
  },
25212
26165
  required: [
25213
26166
  "model",
25214
26167
  "input"
25215
26168
  ],
25216
- additionalProperties: true
26169
+ additionalProperties: true,
26170
+ allOf: [
26171
+ {
26172
+ if: {
26173
+ properties: {
26174
+ stream: {
26175
+ const: true
26176
+ }
26177
+ },
26178
+ required: [
26179
+ "stream"
26180
+ ]
26181
+ },
26182
+ then: {},
26183
+ else: {
26184
+ properties: {
26185
+ max_output_tokens: {
26186
+ maximum: 32768,
26187
+ type: "integer"
26188
+ }
26189
+ }
26190
+ }
26191
+ }
26192
+ ]
25217
26193
  },
25218
26194
  outputSchema: {
25219
26195
  type: "object",
25220
- description: "\u534F\u8BAE\u539F\u751F\u54CD\u5E94\uFF1B\u6D41\u5F0F\u8BF7\u6C42\u8FD4\u56DE\u8BE5\u534F\u8BAE\u5B9A\u4E49\u7684\u4E8B\u4EF6\u6D41\u3002",
26196
+ description: "Protocol-native response; streaming requests return events defined by that protocol.",
25221
26197
  additionalProperties: true
25222
26198
  }
25223
26199
  }
@@ -32179,7 +33155,7 @@ var video_generated_default = [
32179
33155
  maximum: 15,
32180
33156
  title: "\u89C6\u9891\u65F6\u957F",
32181
33157
  default: 5,
32182
- minimum: 0.2,
33158
+ exclusiveMinimum: 0,
32183
33159
  "x-ui": {
32184
33160
  order: 12,
32185
33161
  control: "range",
@@ -41789,7 +42765,7 @@ var video_generated_default = [
41789
42765
  },
41790
42766
  {
41791
42767
  required: [
41792
- "omni_reference_task_type"
42768
+ "task_type"
41793
42769
  ]
41794
42770
  }
41795
42771
  ]
@@ -43570,6 +44546,28 @@ var video_generated_default = [
43570
44546
  }
43571
44547
  ]
43572
44548
  },
44549
+ task_type: {
44550
+ type: "string",
44551
+ enum: [
44552
+ "auto",
44553
+ "reference",
44554
+ "edit",
44555
+ "extend"
44556
+ ],
44557
+ title: "\u5168\u6A21\u6001\u4EFB\u52A1\u7C7B\u578B",
44558
+ default: "auto",
44559
+ description: "\u6307\u5B9A\u5168\u6A21\u6001\u53C2\u8003\u751F\u89C6\u9891\u7684\u4EFB\u52A1\u7C7B\u578B\uFF1Bauto \u7531\u6A21\u578B\u5224\u65AD\uFF0Creference\u3001edit\u3001extend \u4F1A\u5728\u63D0\u4EA4\u65F6\u6821\u9A8C\u5BF9\u5E94\u9650\u5236\u3002",
44560
+ "x-ui": {
44561
+ order: 8,
44562
+ control: "segmented",
44563
+ optionLabels: {
44564
+ auto: "\u81EA\u52A8",
44565
+ reference: "\u53C2\u8003\u751F\u6210",
44566
+ edit: "\u89C6\u9891\u7F16\u8F91",
44567
+ extend: "\u89C6\u9891\u5EF6\u957F"
44568
+ }
44569
+ }
44570
+ },
43573
44571
  watermark: {
43574
44572
  type: "boolean",
43575
44573
  title: "\u89C6\u9891\u6C34\u5370",
@@ -43760,10 +44758,10 @@ var video_generated_default = [
43760
44758
  description: "\u89C6\u9891\u7F16\u8F91\u5FC5\u987B\u5305\u542B\u53C2\u8003\u89C6\u9891\uFF0C\u5E76\u4F7F\u7528\u81EA\u52A8\u65F6\u957F\u548C\u81EA\u52A8\u6BD4\u4F8B\u3002",
43761
44759
  if: {
43762
44760
  required: [
43763
- "omni_reference_task_type"
44761
+ "task_type"
43764
44762
  ],
43765
44763
  properties: {
43766
- omni_reference_task_type: {
44764
+ task_type: {
43767
44765
  const: "edit"
43768
44766
  }
43769
44767
  }
@@ -43806,10 +44804,10 @@ var video_generated_default = [
43806
44804
  description: "\u89C6\u9891\u5EF6\u957F\u5FC5\u987B\u5305\u542B\u53C2\u8003\u89C6\u9891\uFF0C\u5E76\u4F7F\u7528\u81EA\u52A8\u6BD4\u4F8B\u3002",
43807
44805
  if: {
43808
44806
  required: [
43809
- "omni_reference_task_type"
44807
+ "task_type"
43810
44808
  ],
43811
44809
  properties: {
43812
- omni_reference_task_type: {
44810
+ task_type: {
43813
44811
  const: "extend"
43814
44812
  }
43815
44813
  }
@@ -43924,7 +44922,7 @@ var video_generated_default = [
43924
44922
  aspect_ratio: false,
43925
44923
  seed: false,
43926
44924
  generate_audio: false,
43927
- omni_reference_task_type: false
44925
+ task_type: false
43928
44926
  },
43929
44927
  propertyNames: {
43930
44928
  enum: [
@@ -52141,7 +53139,7 @@ var NexraWaitTimeoutError = class extends Error {
52141
53139
  };
52142
53140
 
52143
53141
  // src/generated/version.generated.ts
52144
- var SDK_VERSION = "0.1.0-alpha.37";
53142
+ var SDK_VERSION = "0.1.0-alpha.39";
52145
53143
 
52146
53144
  // src/transport.ts
52147
53145
  var DEFAULT_BASE_URL = "https://api.nexra-ai.com/v1";
@@ -52566,16 +53564,38 @@ function getLanguageModelBinding(modelId, options = {}) {
52566
53564
  const protocols = options.protocol ? [options.protocol] : LANGUAGE_PROTOCOLS;
52567
53565
  const endpoint = protocols.flatMap((protocol) => spec.endpoints.filter((candidate) => candidate.operation === "language.generate" && candidate.protocol === protocol && candidate.method === "POST"))[0];
52568
53566
  if (!endpoint) throw new Error(`Nexra language protocol is unavailable: ${modelId}${options.protocol ? ` (${options.protocol})` : ""}`);
52569
- const fields = schemaObject(endpoint.inputSchema?.properties);
52570
- const tokenField = endpoint.protocol === "gemini-generate-content" ? schemaObject(schemaObject(fields.generationConfig).properties).maxOutputTokens : endpoint.protocol === "openai-responses" ? fields.max_output_tokens : fields.max_tokens;
52571
- const limits = [spec.capabilities.maxOutputTokens, schemaObject(tokenField).maximum].filter((value) => typeof value === "number" && Number.isFinite(value) && value > 0);
53567
+ const operation = options.stream === void 0 ? void 0 : endpoint.httpOperations?.find((operation2) => operation2.httpMethod === "POST" && (options.stream ? operation2.kind === "stream" : ["request", "generate"].includes(operation2.kind)));
53568
+ const inputSchema = operation?.bodyParameters ?? endpoint.inputSchema;
53569
+ const schemas = languageCallSchemas(inputSchema, options.stream);
53570
+ const limits = [spec.capabilities.maxOutputTokens, ...schemas.map((schema) => {
53571
+ const fields = schemaObject(schema.properties);
53572
+ return schemaObject(endpoint.protocol === "gemini-generate-content" ? schemaObject(schemaObject(fields.generationConfig).properties).maxOutputTokens : endpoint.protocol === "openai-responses" ? fields.max_output_tokens : fields.max_tokens).maximum;
53573
+ })].filter((value) => typeof value === "number" && Number.isFinite(value) && value > 0);
52572
53574
  return {
52573
53575
  spec,
52574
- endpoint,
53576
+ endpoint: { ...endpoint, ...inputSchema ? { inputSchema } : {} },
52575
53577
  supportsStreaming: endpoint.capabilities.includes("sse"),
52576
53578
  ...limits.length ? { maxOutputTokens: Math.min(...limits) } : {}
52577
53579
  };
52578
53580
  }
53581
+ function languageCallSchemas(schema, stream) {
53582
+ const node = schemaObject(schema);
53583
+ const result = [node];
53584
+ for (const item of Array.isArray(node.allOf) ? node.allOf : []) {
53585
+ const rule = schemaObject(item);
53586
+ if (!rule.if) {
53587
+ result.push(...languageCallSchemas(rule, stream));
53588
+ continue;
53589
+ }
53590
+ const condition = schemaObject(rule.if);
53591
+ const fields = schemaObject(condition.properties);
53592
+ const expected = schemaObject(fields.stream).const;
53593
+ if (stream !== void 0 && Object.keys(condition).every((key) => ["properties", "required"].includes(key)) && Object.keys(fields).length === 1 && typeof expected === "boolean" && (!Array.isArray(condition.required) || condition.required.every((key) => key === "stream"))) {
53594
+ result.push(...languageCallSchemas(stream === expected ? rule.then : rule.else, stream));
53595
+ }
53596
+ }
53597
+ return result;
53598
+ }
52579
53599
  function schemaObject(value) {
52580
53600
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
52581
53601
  }
@@ -52584,7 +53604,7 @@ function effortValues(field2) {
52584
53604
  return Array.isArray(values) ? values.filter((value) => typeof value === "string") : [];
52585
53605
  }
52586
53606
  function minimumEffort(values) {
52587
- return ["none", "minimal", "low", "medium", "high", "xhigh", "max"].find((value) => values.includes(value));
53607
+ return ["none", "minimal", "low", "medium", "high", "xhigh", "max"].flatMap((effort) => values.filter((value) => value.toLowerCase() === effort))[0];
52588
53608
  }
52589
53609
  function resolveNexraLanguageReasoning(modelId, options) {
52590
53610
  const binding = getLanguageModelBinding(modelId, options);
@@ -52618,7 +53638,7 @@ function resolveNexraLanguageReasoning(modelId, options) {
52618
53638
  const level = options.enabled ? void 0 : minimumEffort(values);
52619
53639
  const budget = schemaObject(properties.thinkingBudget);
52620
53640
  const canDisable = typeof budget.minimum === "number" && budget.minimum === 0;
52621
- return { providerOptions: options.enabled ? {} : { google: { thinkingConfig: level ? { thinkingLevel: level } : canDisable ? { thinkingBudget: 0 } : {} } }, canDisable };
53641
+ return { providerOptions: options.enabled ? {} : { google: { thinkingConfig: level ? { thinkingLevel: level.toLowerCase() } : canDisable ? { thinkingBudget: 0 } : {} } }, canDisable };
52622
53642
  }
52623
53643
  function deepFreeze(value) {
52624
53644
  if (value && typeof value === "object" && !Object.isFrozen(value)) {