@effect/ai-openrouter 0.7.1 → 0.8.1
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/cjs/Generated.js +422 -145
- package/dist/cjs/Generated.js.map +1 -1
- package/dist/dts/Generated.d.ts +932 -350
- package/dist/dts/Generated.d.ts.map +1 -1
- package/dist/dts/OpenRouterClient.d.ts +1 -1
- package/dist/esm/Generated.js +395 -133
- package/dist/esm/Generated.js.map +1 -1
- package/package.json +5 -5
- package/src/Generated.ts +386 -176
package/dist/esm/Generated.js
CHANGED
|
@@ -8,7 +8,7 @@ export class CacheControlEphemeral extends /*#__PURE__*/S.Class("CacheControlEph
|
|
|
8
8
|
"type": /*#__PURE__*/S.Literal("ephemeral")
|
|
9
9
|
}) {}
|
|
10
10
|
export class ReasoningDetailSummaryType extends /*#__PURE__*/S.Literal("reasoning.summary") {}
|
|
11
|
-
export class ReasoningDetailSummaryFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1"
|
|
11
|
+
export class ReasoningDetailSummaryFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1") {}
|
|
12
12
|
/**
|
|
13
13
|
* Reasoning summary detail
|
|
14
14
|
*/
|
|
@@ -27,7 +27,7 @@ export class ReasoningDetailSummary extends /*#__PURE__*/S.Class("ReasoningDetai
|
|
|
27
27
|
})
|
|
28
28
|
}) {}
|
|
29
29
|
export class ReasoningDetailEncryptedType extends /*#__PURE__*/S.Literal("reasoning.encrypted") {}
|
|
30
|
-
export class ReasoningDetailEncryptedFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1"
|
|
30
|
+
export class ReasoningDetailEncryptedFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1") {}
|
|
31
31
|
/**
|
|
32
32
|
* Encrypted reasoning detail
|
|
33
33
|
*/
|
|
@@ -46,7 +46,7 @@ export class ReasoningDetailEncrypted extends /*#__PURE__*/S.Class("ReasoningDet
|
|
|
46
46
|
})
|
|
47
47
|
}) {}
|
|
48
48
|
export class ReasoningDetailTextType extends /*#__PURE__*/S.Literal("reasoning.text") {}
|
|
49
|
-
export class ReasoningDetailTextFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1"
|
|
49
|
+
export class ReasoningDetailTextFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1") {}
|
|
50
50
|
/**
|
|
51
51
|
* Text reasoning detail
|
|
52
52
|
*/
|
|
@@ -526,7 +526,7 @@ export class OpenResponsesResponseText extends /*#__PURE__*/S.Class("OpenRespons
|
|
|
526
526
|
nullable: true
|
|
527
527
|
})
|
|
528
528
|
}) {}
|
|
529
|
-
export class OpenAIResponsesReasoningEffort extends /*#__PURE__*/S.Literal("high", "medium", "low", "minimal", "none") {}
|
|
529
|
+
export class OpenAIResponsesReasoningEffort extends /*#__PURE__*/S.Literal("xhigh", "high", "medium", "low", "minimal", "none") {}
|
|
530
530
|
export class ReasoningSummaryVerbosity extends /*#__PURE__*/S.Literal("auto", "concise", "detailed") {}
|
|
531
531
|
export class OpenResponsesReasoningConfig extends /*#__PURE__*/S.Class("OpenResponsesReasoningConfig")({
|
|
532
532
|
"max_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
@@ -552,8 +552,7 @@ export class OpenAIResponsesPrompt extends /*#__PURE__*/S.Class("OpenAIResponses
|
|
|
552
552
|
})
|
|
553
553
|
}) {}
|
|
554
554
|
export class OpenAIResponsesIncludable extends /*#__PURE__*/S.Literal("file_search_call.results", "message.input_image.image_url", "computer_call_output.output.image_url", "reasoning.encrypted_content", "code_interpreter_call.outputs") {}
|
|
555
|
-
export class
|
|
556
|
-
export class OpenResponsesRequestServiceTier extends OpenResponsesRequestServiceTierEnum {}
|
|
555
|
+
export class OpenResponsesRequestServiceTier extends /*#__PURE__*/S.Literal("auto") {}
|
|
557
556
|
export class OpenResponsesRequestTruncationEnum extends /*#__PURE__*/S.Literal("auto", "disabled") {}
|
|
558
557
|
export class OpenResponsesRequestTruncation extends OpenResponsesRequestTruncationEnum {}
|
|
559
558
|
/**
|
|
@@ -563,16 +562,42 @@ export class OpenResponsesRequestTruncation extends OpenResponsesRequestTruncati
|
|
|
563
562
|
* - deny: use only providers which do not collect user data.
|
|
564
563
|
*/
|
|
565
564
|
export class DataCollection extends /*#__PURE__*/S.Literal("deny", "allow") {}
|
|
566
|
-
export class ProviderName extends /*#__PURE__*/S.Literal("AI21", "AionLabs", "Alibaba", "Amazon Bedrock", "Anthropic", "Arcee", "AtlasCloud", "Avian", "Azure", "BaseTen", "Black Forest Labs", "Cerebras", "Chutes", "Cirrascale", "Clarifai", "Cloudflare", "Cohere", "Crusoe", "DeepInfra", "DeepSeek", "Featherless", "Fireworks", "Friendli", "GMICloud", "Google", "Google AI Studio", "Groq", "Hyperbolic", "Inception", "InferenceNet", "Infermatic", "Inflection", "Liquid", "Mancer 2", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Perplexity", "Phala", "Relace", "SambaNova", "SiliconFlow", "Stealth", "Switchpoint", "Targon", "Together", "Venice", "WandB", "xAI", "Z.AI", "FakeProvider") {}
|
|
565
|
+
export class ProviderName extends /*#__PURE__*/S.Literal("AI21", "AionLabs", "Alibaba", "Amazon Bedrock", "Amazon Nova", "Anthropic", "Arcee AI", "AtlasCloud", "Avian", "Azure", "BaseTen", "BytePlus", "Black Forest Labs", "Cerebras", "Chutes", "Cirrascale", "Clarifai", "Cloudflare", "Cohere", "Crusoe", "DeepInfra", "DeepSeek", "Featherless", "Fireworks", "Friendli", "GMICloud", "GoPomelo", "Google", "Google AI Studio", "Groq", "Hyperbolic", "Inception", "InferenceNet", "Infermatic", "Inflection", "Liquid", "Mara", "Mancer 2", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Perplexity", "Phala", "Relace", "SambaNova", "SiliconFlow", "Sourceful", "Stealth", "StreamLake", "Switchpoint", "Targon", "Together", "Venice", "WandB", "Xiaomi", "xAI", "Z.AI", "FakeProvider") {}
|
|
567
566
|
export class Quantization extends /*#__PURE__*/S.Literal("int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown") {}
|
|
567
|
+
export class ProviderSort extends /*#__PURE__*/S.Literal("price", "throughput", "latency") {}
|
|
568
|
+
export class ProviderSortConfigPartitionEnum extends /*#__PURE__*/S.Literal("model", "none") {}
|
|
569
|
+
export class ProviderSortConfig extends /*#__PURE__*/S.Class("ProviderSortConfig")({
|
|
570
|
+
"by": /*#__PURE__*/S.optionalWith(ProviderSort, {
|
|
571
|
+
nullable: true
|
|
572
|
+
}),
|
|
573
|
+
"partition": /*#__PURE__*/S.optionalWith(ProviderSortConfigPartitionEnum, {
|
|
574
|
+
nullable: true
|
|
575
|
+
})
|
|
576
|
+
}) {}
|
|
568
577
|
/**
|
|
569
|
-
*
|
|
578
|
+
* A value in string format that is a large number
|
|
570
579
|
*/
|
|
571
|
-
export class
|
|
580
|
+
export class BigNumberUnion extends S.String {}
|
|
581
|
+
/**
|
|
582
|
+
* The search engine to use for web search.
|
|
583
|
+
*/
|
|
584
|
+
export class WebSearchEngine extends /*#__PURE__*/S.Literal("native", "exa") {}
|
|
572
585
|
/**
|
|
573
|
-
*
|
|
586
|
+
* The engine to use for parsing PDF files.
|
|
574
587
|
*/
|
|
575
|
-
export class
|
|
588
|
+
export class PDFParserEngine extends /*#__PURE__*/S.Literal("mistral-ocr", "pdf-text", "native") {}
|
|
589
|
+
/**
|
|
590
|
+
* Options for PDF parsing.
|
|
591
|
+
*/
|
|
592
|
+
export class PDFParserOptions extends /*#__PURE__*/S.Class("PDFParserOptions")({
|
|
593
|
+
"engine": /*#__PURE__*/S.optionalWith(PDFParserEngine, {
|
|
594
|
+
nullable: true
|
|
595
|
+
})
|
|
596
|
+
}) {}
|
|
597
|
+
/**
|
|
598
|
+
* **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
|
|
599
|
+
*/
|
|
600
|
+
export class OpenResponsesRequestRoute extends /*#__PURE__*/S.Literal("fallback", "sort") {}
|
|
576
601
|
/**
|
|
577
602
|
* Request schema for Responses endpoint
|
|
578
603
|
*/
|
|
@@ -642,11 +667,13 @@ export class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesReq
|
|
|
642
667
|
"safety_identifier": /*#__PURE__*/S.optionalWith(S.String, {
|
|
643
668
|
nullable: true
|
|
644
669
|
}),
|
|
645
|
-
"store": /*#__PURE__*/S.optionalWith(S.
|
|
646
|
-
nullable: true
|
|
670
|
+
"store": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal(false), {
|
|
671
|
+
nullable: true,
|
|
672
|
+
default: () => false
|
|
647
673
|
}),
|
|
648
674
|
"service_tier": /*#__PURE__*/S.optionalWith(OpenResponsesRequestServiceTier, {
|
|
649
|
-
nullable: true
|
|
675
|
+
nullable: true,
|
|
676
|
+
default: () => "auto"
|
|
650
677
|
}),
|
|
651
678
|
"truncation": /*#__PURE__*/S.optionalWith(OpenResponsesRequestTruncation, {
|
|
652
679
|
nullable: true
|
|
@@ -712,7 +739,10 @@ export class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesReq
|
|
|
712
739
|
"quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Quantization), {
|
|
713
740
|
nullable: true
|
|
714
741
|
}),
|
|
715
|
-
|
|
742
|
+
/**
|
|
743
|
+
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
744
|
+
*/
|
|
745
|
+
"sort": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(ProviderSort, ProviderSortConfig), {
|
|
716
746
|
nullable: true
|
|
717
747
|
}),
|
|
718
748
|
/**
|
|
@@ -736,6 +766,30 @@ export class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesReq
|
|
|
736
766
|
})
|
|
737
767
|
}), {
|
|
738
768
|
nullable: true
|
|
769
|
+
}),
|
|
770
|
+
/**
|
|
771
|
+
* Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
|
772
|
+
*/
|
|
773
|
+
"preferred_min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
774
|
+
nullable: true
|
|
775
|
+
}),
|
|
776
|
+
/**
|
|
777
|
+
* Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
|
778
|
+
*/
|
|
779
|
+
"preferred_max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
780
|
+
nullable: true
|
|
781
|
+
}),
|
|
782
|
+
/**
|
|
783
|
+
* **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput.
|
|
784
|
+
*/
|
|
785
|
+
"min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
786
|
+
nullable: true
|
|
787
|
+
}),
|
|
788
|
+
/**
|
|
789
|
+
* **DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.
|
|
790
|
+
*/
|
|
791
|
+
"max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
792
|
+
nullable: true
|
|
739
793
|
})
|
|
740
794
|
}), {
|
|
741
795
|
nullable: true
|
|
@@ -747,35 +801,60 @@ export class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesReq
|
|
|
747
801
|
"id": /*#__PURE__*/S.Literal("moderation")
|
|
748
802
|
}), /*#__PURE__*/S.Struct({
|
|
749
803
|
"id": /*#__PURE__*/S.Literal("web"),
|
|
804
|
+
/**
|
|
805
|
+
* Set to false to disable the web-search plugin for this request. Defaults to true.
|
|
806
|
+
*/
|
|
807
|
+
"enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
808
|
+
nullable: true
|
|
809
|
+
}),
|
|
750
810
|
"max_results": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
751
811
|
nullable: true
|
|
752
812
|
}),
|
|
753
813
|
"search_prompt": /*#__PURE__*/S.optionalWith(S.String, {
|
|
754
814
|
nullable: true
|
|
755
815
|
}),
|
|
756
|
-
"engine": /*#__PURE__*/S.optionalWith(
|
|
816
|
+
"engine": /*#__PURE__*/S.optionalWith(WebSearchEngine, {
|
|
757
817
|
nullable: true
|
|
758
818
|
})
|
|
759
819
|
}), /*#__PURE__*/S.Struct({
|
|
760
820
|
"id": /*#__PURE__*/S.Literal("file-parser"),
|
|
761
|
-
|
|
821
|
+
/**
|
|
822
|
+
* Set to false to disable the file-parser plugin for this request. Defaults to true.
|
|
823
|
+
*/
|
|
824
|
+
"enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
762
825
|
nullable: true
|
|
763
826
|
}),
|
|
764
|
-
"pdf": /*#__PURE__*/S.optionalWith(
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
827
|
+
"pdf": /*#__PURE__*/S.optionalWith(PDFParserOptions, {
|
|
828
|
+
nullable: true
|
|
829
|
+
})
|
|
830
|
+
}), /*#__PURE__*/S.Struct({
|
|
831
|
+
"id": /*#__PURE__*/S.Literal("response-healing"),
|
|
832
|
+
/**
|
|
833
|
+
* Set to false to disable the response-healing plugin for this request. Defaults to true.
|
|
834
|
+
*/
|
|
835
|
+
"enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
769
836
|
nullable: true
|
|
770
837
|
})
|
|
771
838
|
}))), {
|
|
772
839
|
nullable: true
|
|
773
840
|
}),
|
|
841
|
+
/**
|
|
842
|
+
* **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
|
|
843
|
+
*/
|
|
844
|
+
"route": /*#__PURE__*/S.optionalWith(OpenResponsesRequestRoute, {
|
|
845
|
+
nullable: true
|
|
846
|
+
}),
|
|
774
847
|
/**
|
|
775
848
|
* A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
|
|
776
849
|
*/
|
|
777
850
|
"user": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(128)), {
|
|
778
851
|
nullable: true
|
|
852
|
+
}),
|
|
853
|
+
/**
|
|
854
|
+
* A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
|
855
|
+
*/
|
|
856
|
+
"session_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(128)), {
|
|
857
|
+
nullable: true
|
|
779
858
|
})
|
|
780
859
|
}) {}
|
|
781
860
|
export class OutputMessageRole extends /*#__PURE__*/S.Literal("assistant") {}
|
|
@@ -1369,9 +1448,17 @@ export class ForbiddenResponse extends /*#__PURE__*/S.Class("ForbiddenResponse")
|
|
|
1369
1448
|
/**
|
|
1370
1449
|
* Total credits purchased and used
|
|
1371
1450
|
*/
|
|
1372
|
-
export class GetCredits200 extends /*#__PURE__*/S.
|
|
1373
|
-
|
|
1374
|
-
|
|
1451
|
+
export class GetCredits200 extends /*#__PURE__*/S.Struct({
|
|
1452
|
+
"data": /*#__PURE__*/S.Struct({
|
|
1453
|
+
/**
|
|
1454
|
+
* Total credits purchased
|
|
1455
|
+
*/
|
|
1456
|
+
"total_credits": S.Number,
|
|
1457
|
+
/**
|
|
1458
|
+
* Total credits used
|
|
1459
|
+
*/
|
|
1460
|
+
"total_usage": S.Number
|
|
1461
|
+
})
|
|
1375
1462
|
}) {}
|
|
1376
1463
|
export class CreateChargeRequestChainId extends /*#__PURE__*/S.Literal(1, 137, 8453) {}
|
|
1377
1464
|
/**
|
|
@@ -1411,6 +1498,117 @@ export class CreateCoinbaseCharge200 extends /*#__PURE__*/S.Struct({
|
|
|
1411
1498
|
})
|
|
1412
1499
|
}) {}
|
|
1413
1500
|
export class CreateEmbeddingsRequestEncodingFormat extends /*#__PURE__*/S.Literal("float", "base64") {}
|
|
1501
|
+
/**
|
|
1502
|
+
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
1503
|
+
*/
|
|
1504
|
+
export class ProviderPreferencesSort extends /*#__PURE__*/S.Literal("price", "throughput", "latency") {}
|
|
1505
|
+
/**
|
|
1506
|
+
* Provider routing preferences for the request.
|
|
1507
|
+
*/
|
|
1508
|
+
export class ProviderPreferences extends /*#__PURE__*/S.Class("ProviderPreferences")({
|
|
1509
|
+
/**
|
|
1510
|
+
* Whether to allow backup providers to serve requests
|
|
1511
|
+
* - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
|
|
1512
|
+
* - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
|
|
1513
|
+
*/
|
|
1514
|
+
"allow_fallbacks": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1515
|
+
nullable: true
|
|
1516
|
+
}),
|
|
1517
|
+
/**
|
|
1518
|
+
* Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
|
|
1519
|
+
*/
|
|
1520
|
+
"require_parameters": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1521
|
+
nullable: true
|
|
1522
|
+
}),
|
|
1523
|
+
"data_collection": /*#__PURE__*/S.optionalWith(DataCollection, {
|
|
1524
|
+
nullable: true
|
|
1525
|
+
}),
|
|
1526
|
+
/**
|
|
1527
|
+
* Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
|
|
1528
|
+
*/
|
|
1529
|
+
"zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1530
|
+
nullable: true
|
|
1531
|
+
}),
|
|
1532
|
+
/**
|
|
1533
|
+
* Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
|
|
1534
|
+
*/
|
|
1535
|
+
"enforce_distillable_text": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1536
|
+
nullable: true
|
|
1537
|
+
}),
|
|
1538
|
+
/**
|
|
1539
|
+
* An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
|
|
1540
|
+
*/
|
|
1541
|
+
"order": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
|
|
1542
|
+
nullable: true
|
|
1543
|
+
}),
|
|
1544
|
+
/**
|
|
1545
|
+
* List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
|
|
1546
|
+
*/
|
|
1547
|
+
"only": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
|
|
1548
|
+
nullable: true
|
|
1549
|
+
}),
|
|
1550
|
+
/**
|
|
1551
|
+
* List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
|
|
1552
|
+
*/
|
|
1553
|
+
"ignore": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
|
|
1554
|
+
nullable: true
|
|
1555
|
+
}),
|
|
1556
|
+
/**
|
|
1557
|
+
* A list of quantization levels to filter the provider by.
|
|
1558
|
+
*/
|
|
1559
|
+
"quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Quantization), {
|
|
1560
|
+
nullable: true
|
|
1561
|
+
}),
|
|
1562
|
+
"sort": /*#__PURE__*/S.optionalWith(ProviderPreferencesSort, {
|
|
1563
|
+
nullable: true
|
|
1564
|
+
}),
|
|
1565
|
+
/**
|
|
1566
|
+
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
1567
|
+
*/
|
|
1568
|
+
"max_price": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
|
|
1569
|
+
"prompt": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
|
|
1570
|
+
nullable: true
|
|
1571
|
+
}),
|
|
1572
|
+
"completion": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
|
|
1573
|
+
nullable: true
|
|
1574
|
+
}),
|
|
1575
|
+
"image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
|
|
1576
|
+
nullable: true
|
|
1577
|
+
}),
|
|
1578
|
+
"audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
|
|
1579
|
+
nullable: true
|
|
1580
|
+
}),
|
|
1581
|
+
"request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
|
|
1582
|
+
nullable: true
|
|
1583
|
+
})
|
|
1584
|
+
}), {
|
|
1585
|
+
nullable: true
|
|
1586
|
+
}),
|
|
1587
|
+
/**
|
|
1588
|
+
* Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
|
1589
|
+
*/
|
|
1590
|
+
"preferred_min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
1591
|
+
nullable: true
|
|
1592
|
+
}),
|
|
1593
|
+
/**
|
|
1594
|
+
* Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
|
1595
|
+
*/
|
|
1596
|
+
"preferred_max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
1597
|
+
nullable: true
|
|
1598
|
+
}),
|
|
1599
|
+
/**
|
|
1600
|
+
* **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput.
|
|
1601
|
+
*/
|
|
1602
|
+
"min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
1603
|
+
nullable: true
|
|
1604
|
+
}),
|
|
1605
|
+
/**
|
|
1606
|
+
* **DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.
|
|
1607
|
+
*/
|
|
1608
|
+
"max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
1609
|
+
nullable: true
|
|
1610
|
+
})
|
|
1611
|
+
}) {}
|
|
1414
1612
|
export class CreateEmbeddingsRequest extends /*#__PURE__*/S.Class("CreateEmbeddingsRequest")({
|
|
1415
1613
|
"input": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(S.String), /*#__PURE__*/S.Array(S.Number), /*#__PURE__*/S.Array(/*#__PURE__*/S.Array(S.Number)), /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
|
|
1416
1614
|
"content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
|
|
@@ -1433,86 +1631,7 @@ export class CreateEmbeddingsRequest extends /*#__PURE__*/S.Class("CreateEmbeddi
|
|
|
1433
1631
|
"user": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1434
1632
|
nullable: true
|
|
1435
1633
|
}),
|
|
1436
|
-
"provider": /*#__PURE__*/S.optionalWith(
|
|
1437
|
-
/**
|
|
1438
|
-
* Whether to allow backup providers to serve requests
|
|
1439
|
-
* - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
|
|
1440
|
-
* - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
|
|
1441
|
-
*/
|
|
1442
|
-
"allow_fallbacks": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1443
|
-
nullable: true
|
|
1444
|
-
}),
|
|
1445
|
-
/**
|
|
1446
|
-
* Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
|
|
1447
|
-
*/
|
|
1448
|
-
"require_parameters": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1449
|
-
nullable: true
|
|
1450
|
-
}),
|
|
1451
|
-
"data_collection": /*#__PURE__*/S.optionalWith(DataCollection, {
|
|
1452
|
-
nullable: true
|
|
1453
|
-
}),
|
|
1454
|
-
/**
|
|
1455
|
-
* Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
|
|
1456
|
-
*/
|
|
1457
|
-
"zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1458
|
-
nullable: true
|
|
1459
|
-
}),
|
|
1460
|
-
/**
|
|
1461
|
-
* Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
|
|
1462
|
-
*/
|
|
1463
|
-
"enforce_distillable_text": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1464
|
-
nullable: true
|
|
1465
|
-
}),
|
|
1466
|
-
/**
|
|
1467
|
-
* An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
|
|
1468
|
-
*/
|
|
1469
|
-
"order": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
|
|
1470
|
-
nullable: true
|
|
1471
|
-
}),
|
|
1472
|
-
/**
|
|
1473
|
-
* List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
|
|
1474
|
-
*/
|
|
1475
|
-
"only": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
|
|
1476
|
-
nullable: true
|
|
1477
|
-
}),
|
|
1478
|
-
/**
|
|
1479
|
-
* List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
|
|
1480
|
-
*/
|
|
1481
|
-
"ignore": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
|
|
1482
|
-
nullable: true
|
|
1483
|
-
}),
|
|
1484
|
-
/**
|
|
1485
|
-
* A list of quantization levels to filter the provider by.
|
|
1486
|
-
*/
|
|
1487
|
-
"quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Quantization), {
|
|
1488
|
-
nullable: true
|
|
1489
|
-
}),
|
|
1490
|
-
"sort": /*#__PURE__*/S.optionalWith(ProviderSort, {
|
|
1491
|
-
nullable: true
|
|
1492
|
-
}),
|
|
1493
|
-
/**
|
|
1494
|
-
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
1495
|
-
*/
|
|
1496
|
-
"max_price": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
|
|
1497
|
-
"prompt": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
|
|
1498
|
-
nullable: true
|
|
1499
|
-
}),
|
|
1500
|
-
"completion": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
|
|
1501
|
-
nullable: true
|
|
1502
|
-
}),
|
|
1503
|
-
"image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
|
|
1504
|
-
nullable: true
|
|
1505
|
-
}),
|
|
1506
|
-
"audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
|
|
1507
|
-
nullable: true
|
|
1508
|
-
}),
|
|
1509
|
-
"request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
|
|
1510
|
-
nullable: true
|
|
1511
|
-
})
|
|
1512
|
-
}), {
|
|
1513
|
-
nullable: true
|
|
1514
|
-
})
|
|
1515
|
-
}), {
|
|
1634
|
+
"provider": /*#__PURE__*/S.optionalWith(ProviderPreferences, {
|
|
1516
1635
|
nullable: true
|
|
1517
1636
|
}),
|
|
1518
1637
|
"input_type": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -1653,7 +1772,7 @@ export class PerRequestLimits extends /*#__PURE__*/S.Class("PerRequestLimits")({
|
|
|
1653
1772
|
*/
|
|
1654
1773
|
"completion_tokens": S.Number
|
|
1655
1774
|
}) {}
|
|
1656
|
-
export class Parameter extends /*#__PURE__*/S.Literal("temperature", "top_p", "top_k", "min_p", "top_a", "frequency_penalty", "presence_penalty", "repetition_penalty", "max_tokens", "logit_bias", "logprobs", "top_logprobs", "seed", "response_format", "structured_outputs", "stop", "tools", "tool_choice", "parallel_tool_calls", "include_reasoning", "reasoning", "web_search_options", "verbosity") {}
|
|
1775
|
+
export class Parameter extends /*#__PURE__*/S.Literal("temperature", "top_p", "top_k", "min_p", "top_a", "frequency_penalty", "presence_penalty", "repetition_penalty", "max_tokens", "logit_bias", "logprobs", "top_logprobs", "seed", "response_format", "structured_outputs", "stop", "tools", "tool_choice", "parallel_tool_calls", "include_reasoning", "reasoning", "reasoning_effort", "web_search_options", "verbosity") {}
|
|
1657
1776
|
/**
|
|
1658
1777
|
* Default parameters for this model
|
|
1659
1778
|
*/
|
|
@@ -2008,9 +2127,8 @@ export class ListEndpoints200 extends /*#__PURE__*/S.Struct({
|
|
|
2008
2127
|
export class ListEndpointsZdr200 extends /*#__PURE__*/S.Struct({
|
|
2009
2128
|
"data": /*#__PURE__*/S.Array(PublicEndpoint)
|
|
2010
2129
|
}) {}
|
|
2011
|
-
export class GetParametersParamsProvider extends /*#__PURE__*/S.Literal("AI21", "AionLabs", "Alibaba", "Amazon Bedrock", "Anthropic", "Arcee", "AtlasCloud", "Avian", "Azure", "BaseTen", "Black Forest Labs", "Cerebras", "Chutes", "Cirrascale", "Clarifai", "Cloudflare", "Cohere", "Crusoe", "DeepInfra", "DeepSeek", "Featherless", "Fireworks", "Friendli", "GMICloud", "Google", "Google AI Studio", "Groq", "Hyperbolic", "Inception", "InferenceNet", "Infermatic", "Inflection", "Liquid", "Mancer 2", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Perplexity", "Phala", "Relace", "SambaNova", "SiliconFlow", "Stealth", "Switchpoint", "Targon", "Together", "Venice", "WandB", "xAI", "Z.AI", "FakeProvider") {}
|
|
2012
2130
|
export class GetParametersParams extends /*#__PURE__*/S.Struct({
|
|
2013
|
-
"provider": /*#__PURE__*/S.optionalWith(
|
|
2131
|
+
"provider": /*#__PURE__*/S.optionalWith(ProviderName, {
|
|
2014
2132
|
nullable: true
|
|
2015
2133
|
})
|
|
2016
2134
|
}) {}
|
|
@@ -2026,7 +2144,7 @@ export class GetParameters200 extends /*#__PURE__*/S.Struct({
|
|
|
2026
2144
|
/**
|
|
2027
2145
|
* List of parameters supported by this model
|
|
2028
2146
|
*/
|
|
2029
|
-
"supported_parameters": /*#__PURE__*/S.Array(/*#__PURE__*/S.Literal("temperature", "top_p", "top_k", "min_p", "top_a", "frequency_penalty", "presence_penalty", "repetition_penalty", "max_tokens", "logit_bias", "logprobs", "top_logprobs", "seed", "response_format", "structured_outputs", "stop", "tools", "tool_choice", "parallel_tool_calls", "include_reasoning", "reasoning", "web_search_options", "verbosity"))
|
|
2147
|
+
"supported_parameters": /*#__PURE__*/S.Array(/*#__PURE__*/S.Literal("temperature", "top_p", "top_k", "min_p", "top_a", "frequency_penalty", "presence_penalty", "repetition_penalty", "max_tokens", "logit_bias", "logprobs", "top_logprobs", "seed", "response_format", "structured_outputs", "stop", "tools", "tool_choice", "parallel_tool_calls", "include_reasoning", "reasoning", "reasoning_effort", "web_search_options", "verbosity"))
|
|
2030
2148
|
})
|
|
2031
2149
|
}) {}
|
|
2032
2150
|
export class ListProviders200 extends /*#__PURE__*/S.Struct({
|
|
@@ -2666,9 +2784,24 @@ export class CreateAuthKeysCode200 extends /*#__PURE__*/S.Struct({
|
|
|
2666
2784
|
"created_at": S.String
|
|
2667
2785
|
})
|
|
2668
2786
|
}) {}
|
|
2787
|
+
export class ChatGenerationParamsProviderEnumDataCollectionEnum extends /*#__PURE__*/S.Literal("deny", "allow") {}
|
|
2788
|
+
export class Schema0 extends /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Literal("AI21", "AionLabs", "Alibaba", "Amazon Bedrock", "Amazon Nova", "Anthropic", "Arcee AI", "AtlasCloud", "Avian", "Azure", "BaseTen", "BytePlus", "Black Forest Labs", "Cerebras", "Chutes", "Cirrascale", "Clarifai", "Cloudflare", "Cohere", "Crusoe", "DeepInfra", "DeepSeek", "Featherless", "Fireworks", "Friendli", "GMICloud", "GoPomelo", "Google", "Google AI Studio", "Groq", "Hyperbolic", "Inception", "InferenceNet", "Infermatic", "Inflection", "Liquid", "Mara", "Mancer 2", "Minimax", "ModelRun", "Mistral", "Modular", "Moonshot AI", "Morph", "NCompass", "Nebius", "NextBit", "Novita", "Nvidia", "OpenAI", "OpenInference", "Parasail", "Perplexity", "Phala", "Relace", "SambaNova", "SiliconFlow", "Sourceful", "Stealth", "StreamLake", "Switchpoint", "Targon", "Together", "Venice", "WandB", "Xiaomi", "xAI", "Z.AI", "FakeProvider"), S.String)) {}
|
|
2789
|
+
export class ProviderSortUnion extends /*#__PURE__*/S.Union(ProviderSort, ProviderSortConfig) {}
|
|
2790
|
+
export class Schema1 extends /*#__PURE__*/S.Union(S.Number, S.String, S.Number) {}
|
|
2791
|
+
export class ChatGenerationParamsRouteEnum extends /*#__PURE__*/S.Literal("fallback", "sort") {}
|
|
2792
|
+
export class ChatMessageContentItemCacheControlTtl extends /*#__PURE__*/S.Literal("5m", "1h") {}
|
|
2793
|
+
export class ChatMessageContentItemCacheControl extends /*#__PURE__*/S.Class("ChatMessageContentItemCacheControl")({
|
|
2794
|
+
"type": /*#__PURE__*/S.Literal("ephemeral"),
|
|
2795
|
+
"ttl": /*#__PURE__*/S.optionalWith(ChatMessageContentItemCacheControlTtl, {
|
|
2796
|
+
nullable: true
|
|
2797
|
+
})
|
|
2798
|
+
}) {}
|
|
2669
2799
|
export class ChatMessageContentItemText extends /*#__PURE__*/S.Class("ChatMessageContentItemText")({
|
|
2670
2800
|
"type": /*#__PURE__*/S.Literal("text"),
|
|
2671
|
-
"text": S.String
|
|
2801
|
+
"text": S.String,
|
|
2802
|
+
"cache_control": /*#__PURE__*/S.optionalWith(ChatMessageContentItemCacheControl, {
|
|
2803
|
+
nullable: true
|
|
2804
|
+
})
|
|
2672
2805
|
}) {}
|
|
2673
2806
|
export class SystemMessage extends /*#__PURE__*/S.Class("SystemMessage")({
|
|
2674
2807
|
"role": /*#__PURE__*/S.Literal("system"),
|
|
@@ -2687,33 +2820,17 @@ export class ChatMessageContentItemImage extends /*#__PURE__*/S.Class("ChatMessa
|
|
|
2687
2820
|
})
|
|
2688
2821
|
})
|
|
2689
2822
|
}) {}
|
|
2690
|
-
export class ChatMessageContentItemAudioInputAudioFormat extends /*#__PURE__*/S.Literal("wav", "mp3", "flac", "m4a", "ogg", "pcm16", "pcm24") {}
|
|
2691
2823
|
export class ChatMessageContentItemAudio extends /*#__PURE__*/S.Class("ChatMessageContentItemAudio")({
|
|
2692
2824
|
"type": /*#__PURE__*/S.Literal("input_audio"),
|
|
2693
2825
|
"input_audio": /*#__PURE__*/S.Struct({
|
|
2694
2826
|
"data": S.String,
|
|
2695
|
-
"format":
|
|
2827
|
+
"format": S.String
|
|
2696
2828
|
})
|
|
2697
2829
|
}) {}
|
|
2698
|
-
export class VideoURL extends /*#__PURE__*/S.Class("VideoURL")({
|
|
2699
|
-
"url": S.String
|
|
2700
|
-
}) {}
|
|
2701
2830
|
export class ChatMessageContentItemVideo extends /*#__PURE__*/S.Record({
|
|
2702
2831
|
key: S.String,
|
|
2703
2832
|
value: S.Unknown
|
|
2704
2833
|
}) {}
|
|
2705
|
-
export class ChatMessageContentItemFile extends /*#__PURE__*/S.Class("ChatMessageContentItemFile")({
|
|
2706
|
-
"type": /*#__PURE__*/S.Literal("file"),
|
|
2707
|
-
"file": /*#__PURE__*/S.Struct({
|
|
2708
|
-
"file_data": S.String,
|
|
2709
|
-
"file_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2710
|
-
nullable: true
|
|
2711
|
-
}),
|
|
2712
|
-
"filename": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2713
|
-
nullable: true
|
|
2714
|
-
})
|
|
2715
|
-
})
|
|
2716
|
-
}) {}
|
|
2717
2834
|
export class ChatMessageContentItem extends /*#__PURE__*/S.Record({
|
|
2718
2835
|
key: S.String,
|
|
2719
2836
|
value: S.Unknown
|
|
@@ -2770,7 +2887,7 @@ export class Message extends /*#__PURE__*/S.Record({
|
|
|
2770
2887
|
value: S.Unknown
|
|
2771
2888
|
}) {}
|
|
2772
2889
|
export class ModelName extends S.String {}
|
|
2773
|
-
export class ChatGenerationParamsReasoningEffortEnum extends /*#__PURE__*/S.Literal("
|
|
2890
|
+
export class ChatGenerationParamsReasoningEffortEnum extends /*#__PURE__*/S.Literal("xhigh", "high", "medium", "low", "minimal", "none") {}
|
|
2774
2891
|
export class JSONSchemaConfig extends /*#__PURE__*/S.Class("JSONSchemaConfig")({
|
|
2775
2892
|
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(64)),
|
|
2776
2893
|
"description": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -2825,6 +2942,127 @@ export class ToolDefinitionJson extends /*#__PURE__*/S.Class("ToolDefinitionJson
|
|
|
2825
2942
|
})
|
|
2826
2943
|
}) {}
|
|
2827
2944
|
export class ChatGenerationParams extends /*#__PURE__*/S.Class("ChatGenerationParams")({
|
|
2945
|
+
/**
|
|
2946
|
+
* When multiple model providers are available, optionally indicate your routing preference.
|
|
2947
|
+
*/
|
|
2948
|
+
"provider": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
|
|
2949
|
+
/**
|
|
2950
|
+
* Whether to allow backup providers to serve requests
|
|
2951
|
+
* - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
|
|
2952
|
+
* - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
|
|
2953
|
+
*/
|
|
2954
|
+
"allow_fallbacks": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2955
|
+
nullable: true
|
|
2956
|
+
}),
|
|
2957
|
+
/**
|
|
2958
|
+
* Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
|
|
2959
|
+
*/
|
|
2960
|
+
"require_parameters": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2961
|
+
nullable: true
|
|
2962
|
+
}),
|
|
2963
|
+
/**
|
|
2964
|
+
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
2965
|
+
* - allow: (default) allow providers which store user data non-transiently and may train on it
|
|
2966
|
+
*
|
|
2967
|
+
* - deny: use only providers which do not collect user data.
|
|
2968
|
+
*/
|
|
2969
|
+
"data_collection": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("deny", "allow"), {
|
|
2970
|
+
nullable: true
|
|
2971
|
+
}),
|
|
2972
|
+
"zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2973
|
+
nullable: true
|
|
2974
|
+
}),
|
|
2975
|
+
"enforce_distillable_text": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2976
|
+
nullable: true
|
|
2977
|
+
}),
|
|
2978
|
+
/**
|
|
2979
|
+
* An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
|
|
2980
|
+
*/
|
|
2981
|
+
"order": /*#__PURE__*/S.optionalWith(Schema0, {
|
|
2982
|
+
nullable: true
|
|
2983
|
+
}),
|
|
2984
|
+
/**
|
|
2985
|
+
* List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
|
|
2986
|
+
*/
|
|
2987
|
+
"only": /*#__PURE__*/S.optionalWith(Schema0, {
|
|
2988
|
+
nullable: true
|
|
2989
|
+
}),
|
|
2990
|
+
/**
|
|
2991
|
+
* List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
|
|
2992
|
+
*/
|
|
2993
|
+
"ignore": /*#__PURE__*/S.optionalWith(Schema0, {
|
|
2994
|
+
nullable: true
|
|
2995
|
+
}),
|
|
2996
|
+
/**
|
|
2997
|
+
* A list of quantization levels to filter the provider by.
|
|
2998
|
+
*/
|
|
2999
|
+
"quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Literal("int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown")), {
|
|
3000
|
+
nullable: true
|
|
3001
|
+
}),
|
|
3002
|
+
/**
|
|
3003
|
+
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
3004
|
+
*/
|
|
3005
|
+
"sort": /*#__PURE__*/S.optionalWith(ProviderSortUnion, {
|
|
3006
|
+
nullable: true
|
|
3007
|
+
}),
|
|
3008
|
+
/**
|
|
3009
|
+
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
3010
|
+
*/
|
|
3011
|
+
"max_price": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
|
|
3012
|
+
"prompt": /*#__PURE__*/S.optionalWith(Schema1, {
|
|
3013
|
+
nullable: true
|
|
3014
|
+
}),
|
|
3015
|
+
"completion": /*#__PURE__*/S.optionalWith(Schema1, {
|
|
3016
|
+
nullable: true
|
|
3017
|
+
}),
|
|
3018
|
+
"image": /*#__PURE__*/S.optionalWith(Schema1, {
|
|
3019
|
+
nullable: true
|
|
3020
|
+
}),
|
|
3021
|
+
"audio": /*#__PURE__*/S.optionalWith(Schema1, {
|
|
3022
|
+
nullable: true
|
|
3023
|
+
}),
|
|
3024
|
+
"request": /*#__PURE__*/S.optionalWith(Schema1, {
|
|
3025
|
+
nullable: true
|
|
3026
|
+
})
|
|
3027
|
+
}), {
|
|
3028
|
+
nullable: true
|
|
3029
|
+
}),
|
|
3030
|
+
"preferred_min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
3031
|
+
nullable: true
|
|
3032
|
+
}),
|
|
3033
|
+
"preferred_max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
3034
|
+
nullable: true
|
|
3035
|
+
}),
|
|
3036
|
+
"min_throughput": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
3037
|
+
nullable: true
|
|
3038
|
+
}),
|
|
3039
|
+
"max_latency": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
3040
|
+
nullable: true
|
|
3041
|
+
})
|
|
3042
|
+
}), {
|
|
3043
|
+
nullable: true
|
|
3044
|
+
}),
|
|
3045
|
+
/**
|
|
3046
|
+
* Plugins you want to enable for this request, including their settings.
|
|
3047
|
+
*/
|
|
3048
|
+
"plugins": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Record({
|
|
3049
|
+
key: S.String,
|
|
3050
|
+
value: S.Unknown
|
|
3051
|
+
})), {
|
|
3052
|
+
nullable: true
|
|
3053
|
+
}),
|
|
3054
|
+
"route": /*#__PURE__*/S.optionalWith(ChatGenerationParamsRouteEnum, {
|
|
3055
|
+
nullable: true
|
|
3056
|
+
}),
|
|
3057
|
+
"user": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3058
|
+
nullable: true
|
|
3059
|
+
}),
|
|
3060
|
+
/**
|
|
3061
|
+
* A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
|
3062
|
+
*/
|
|
3063
|
+
"session_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(128)), {
|
|
3064
|
+
nullable: true
|
|
3065
|
+
}),
|
|
2828
3066
|
"messages": /*#__PURE__*/S.NonEmptyArray(Message).pipe(/*#__PURE__*/S.minItems(1)),
|
|
2829
3067
|
"model": /*#__PURE__*/S.optionalWith(ModelName, {
|
|
2830
3068
|
nullable: true
|
|
@@ -2905,12 +3143,24 @@ export class ChatGenerationParams extends /*#__PURE__*/S.Class("ChatGenerationPa
|
|
|
2905
3143
|
nullable: true,
|
|
2906
3144
|
default: () => 1
|
|
2907
3145
|
}),
|
|
2908
|
-
"
|
|
3146
|
+
"debug": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
|
|
3147
|
+
"echo_upstream_body": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
3148
|
+
nullable: true
|
|
3149
|
+
})
|
|
3150
|
+
}), {
|
|
2909
3151
|
nullable: true
|
|
2910
3152
|
})
|
|
2911
3153
|
}) {}
|
|
2912
|
-
export class
|
|
2913
|
-
export class
|
|
3154
|
+
export class ChatCompletionFinishReason extends /*#__PURE__*/S.Literal("tool_calls", "stop", "length", "content_filter", "error") {}
|
|
3155
|
+
export class Schema2 extends /*#__PURE__*/S.Union(ChatCompletionFinishReason, S.Null) {}
|
|
3156
|
+
export class Schema4 extends /*#__PURE__*/S.Union(S.String, S.Null) {}
|
|
3157
|
+
export class Schema5Enum extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
|
|
3158
|
+
export class Schema5 extends /*#__PURE__*/S.Union(Schema5Enum, S.Null) {}
|
|
3159
|
+
export class Schema6 extends S.Number {}
|
|
3160
|
+
export class Schema3 extends /*#__PURE__*/S.Record({
|
|
3161
|
+
key: S.String,
|
|
3162
|
+
value: S.Unknown
|
|
3163
|
+
}) {}
|
|
2914
3164
|
export class ChatMessageTokenLogprob extends /*#__PURE__*/S.Class("ChatMessageTokenLogprob")({
|
|
2915
3165
|
"token": S.String,
|
|
2916
3166
|
"logprob": S.Number,
|
|
@@ -2930,9 +3180,12 @@ export class ChatMessageTokenLogprobs extends /*#__PURE__*/S.Class("ChatMessageT
|
|
|
2930
3180
|
})
|
|
2931
3181
|
}) {}
|
|
2932
3182
|
export class ChatResponseChoice extends /*#__PURE__*/S.Class("ChatResponseChoice")({
|
|
2933
|
-
"finish_reason": /*#__PURE__*/S.NullOr(
|
|
3183
|
+
"finish_reason": /*#__PURE__*/S.NullOr(ChatCompletionFinishReason),
|
|
2934
3184
|
"index": S.Number,
|
|
2935
3185
|
"message": AssistantMessage,
|
|
3186
|
+
"reasoning_details": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Schema3), {
|
|
3187
|
+
nullable: true
|
|
3188
|
+
}),
|
|
2936
3189
|
"logprobs": /*#__PURE__*/S.optionalWith(ChatMessageTokenLogprobs, {
|
|
2937
3190
|
nullable: true
|
|
2938
3191
|
})
|
|
@@ -3101,7 +3354,13 @@ export class CompletionChoice extends /*#__PURE__*/S.Class("CompletionChoice")({
|
|
|
3101
3354
|
"text": S.String,
|
|
3102
3355
|
"index": S.Number,
|
|
3103
3356
|
"logprobs": /*#__PURE__*/S.NullOr(CompletionLogprobs),
|
|
3104
|
-
"finish_reason": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Literal("stop", "length", "content_filter"))
|
|
3357
|
+
"finish_reason": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Literal("stop", "length", "content_filter")),
|
|
3358
|
+
"native_finish_reason": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3359
|
+
nullable: true
|
|
3360
|
+
}),
|
|
3361
|
+
"reasoning": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3362
|
+
nullable: true
|
|
3363
|
+
})
|
|
3105
3364
|
}) {}
|
|
3106
3365
|
export class CompletionUsage extends /*#__PURE__*/S.Class("CompletionUsage")({
|
|
3107
3366
|
"prompt_tokens": S.Number,
|
|
@@ -3113,6 +3372,9 @@ export class CompletionResponse extends /*#__PURE__*/S.Class("CompletionResponse
|
|
|
3113
3372
|
"object": /*#__PURE__*/S.Literal("text_completion"),
|
|
3114
3373
|
"created": S.Number,
|
|
3115
3374
|
"model": S.String,
|
|
3375
|
+
"provider": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3376
|
+
nullable: true
|
|
3377
|
+
}),
|
|
3116
3378
|
"system_fingerprint": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3117
3379
|
nullable: true
|
|
3118
3380
|
}),
|