@effect/ai-openrouter 0.8.0 → 0.8.2

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.
@@ -3,9 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ModelsListResponse = exports.ModelsCountResponse = exports.ModelName = exports.ModelGroup = exports.ModelArchitectureInstructType = exports.ModelArchitecture = exports.Model = exports.Message = exports.ListProviders200 = exports.ListParams = exports.ListEndpointsZdr200 = exports.ListEndpointsResponseArchitectureEnumInstructType = exports.ListEndpointsResponseArchitecture = exports.ListEndpointsResponse = exports.ListEndpoints200 = exports.List200 = exports.JSONSchemaConfig = exports.InternalServerResponseErrorData = exports.InternalServerResponse = exports.InputModality = exports.ImageGenerationStatus = exports.GetUserActivityParams = exports.GetUserActivity200 = exports.GetParametersParamsProvider = exports.GetParametersParams = exports.GetParameters200 = exports.GetModelsParams = exports.GetKey200 = exports.GetGenerationParams = exports.GetGeneration200DataApiType = exports.GetGeneration200 = exports.GetCurrentKey200 = exports.GetCredits200 = exports.ForbiddenResponseErrorData = exports.ForbiddenResponse = exports.FilePathType = exports.FilePath = exports.FileCitationType = exports.FileCitation = exports.FileAnnotationDetailType = exports.FileAnnotationDetail = exports.ExchangeAuthCodeForAPIKeyRequestCodeChallengeMethod = exports.ExchangeAuthCodeForAPIKeyRequest = exports.ExchangeAuthCodeForAPIKey200 = exports.EndpointStatus = exports.EdgeNetworkTimeoutResponseErrorData = exports.EdgeNetworkTimeoutResponse = exports.DeleteKeys200 = exports.DefaultParameters = exports.DataCollection = exports.CreateKeysRequestLimitReset = exports.CreateKeysRequest = exports.CreateKeys201 = exports.CreateEmbeddingsRequestEncodingFormat = exports.CreateEmbeddingsRequest = exports.CreateEmbeddings200Object = exports.CreateEmbeddings200 = exports.CreateCoinbaseCharge200 = exports.CreateChargeRequestChainId = exports.CreateChargeRequest = exports.CreateAuthKeysCodeRequestCodeChallengeMethod = exports.CreateAuthKeysCodeRequest = exports.CreateAuthKeysCode200 = exports.CompletionUsage = exports.CompletionResponse = exports.CompletionLogprobs = exports.CompletionFinishReasonEnum = exports.CompletionFinishReason = exports.CompletionCreateParams = exports.CompletionChoice = exports.ClientError = exports.ChatStreamOptions = exports.ChatResponseChoice = exports.ChatResponse = exports.ChatMessageToolCall = exports.ChatMessageTokenLogprobs = exports.ChatMessageTokenLogprob = exports.ChatMessageContentItemVideo = exports.ChatMessageContentItemText = exports.ChatMessageContentItemImageImageUrlDetail = exports.ChatMessageContentItemImage = exports.ChatMessageContentItemFile = exports.ChatMessageContentItemAudioInputAudioFormat = exports.ChatMessageContentItemAudio = exports.ChatMessageContentItem = exports.ChatGenerationTokenUsage = exports.ChatGenerationParamsReasoningEffortEnum = exports.ChatGenerationParams = exports.ChatError = exports.ChatCompletionFinishReasonEnum = exports.ChatCompletionFinishReason = exports.CacheControlEphemeral = exports.BigNumberUnion = exports.BadRequestResponseErrorData = exports.BadRequestResponse = exports.BadGatewayResponseErrorData = exports.BadGatewayResponse = exports.AssistantMessage = exports.AnnotationDetail = exports.ActivityItem = void 0;
7
- exports.ReasoningSummaryTextType = exports.ReasoningSummaryText = exports.ReasoningDetailTextType = exports.ReasoningDetailTextFormat = exports.ReasoningDetailText = exports.ReasoningDetailSummaryType = exports.ReasoningDetailSummaryFormat = exports.ReasoningDetailSummary = exports.ReasoningDetailEncryptedType = exports.ReasoningDetailEncryptedFormat = exports.ReasoningDetailEncrypted = exports.ReasoningDetail = exports.Quantization = exports.PublicPricing = exports.PublicEndpointQuantizationEnum = exports.PublicEndpointQuantization = exports.PublicEndpoint = exports.ProviderSort = exports.ProviderOverloadedResponseErrorData = exports.ProviderOverloadedResponse = exports.ProviderName = exports.PerRequestLimits = exports.PaymentRequiredResponseErrorData = exports.PaymentRequiredResponse = exports.PayloadTooLargeResponseErrorData = exports.PayloadTooLargeResponse = exports.Parameter = exports.OutputModality = exports.OutputMessageType = exports.OutputMessageStatusEnum = exports.OutputMessageRole = exports.OutputMessage = exports.OutputItemWebSearchCallType = exports.OutputItemWebSearchCall = exports.OutputItemReasoningType = exports.OutputItemReasoningStatusEnum = exports.OutputItemReasoning = exports.OutputItemImageGenerationCallType = exports.OutputItemImageGenerationCall = exports.OutputItemFunctionCallType = exports.OutputItemFunctionCallStatusEnum = exports.OutputItemFunctionCall = exports.OutputItemFileSearchCallType = exports.OutputItemFileSearchCall = exports.OpenResponsesWebSearchToolType = exports.OpenResponsesWebSearchTool = exports.OpenResponsesWebSearchPreviewToolType = exports.OpenResponsesWebSearchPreviewTool = exports.OpenResponsesWebSearchPreview20250311ToolType = exports.OpenResponsesWebSearchPreview20250311Tool = exports.OpenResponsesWebSearch20250826ToolType = exports.OpenResponsesWebSearch20250826Tool = exports.OpenResponsesResponseTextVerbosity = exports.OpenResponsesResponseText = exports.OpenResponsesRequestTruncationEnum = exports.OpenResponsesRequestTruncation = exports.OpenResponsesRequestServiceTierEnum = exports.OpenResponsesRequestServiceTier = exports.OpenResponsesRequestMetadata = exports.OpenResponsesRequest = exports.OpenResponsesReasoningType = exports.OpenResponsesReasoningStatusEnum = exports.OpenResponsesReasoningFormat = exports.OpenResponsesReasoningConfig = exports.OpenResponsesReasoning = exports.OpenResponsesNonStreamingResponseObject = exports.OpenResponsesNonStreamingResponse = exports.OpenResponsesInputMessageItemType = exports.OpenResponsesInputMessageItemRoleEnum = exports.OpenResponsesInputMessageItem = exports.OpenResponsesInput = exports.OpenResponsesFunctionToolCallType = exports.OpenResponsesFunctionToolCall = exports.OpenResponsesFunctionCallOutputType = exports.OpenResponsesFunctionCallOutput = exports.OpenResponsesEasyInputMessageType = exports.OpenResponsesEasyInputMessageRoleEnum = exports.OpenResponsesEasyInputMessage = exports.OpenAIResponsesUsage = exports.OpenAIResponsesTruncation = exports.OpenAIResponsesToolChoiceEnumTypeEnum = exports.OpenAIResponsesToolChoiceEnumType = exports.OpenAIResponsesToolChoiceEnum = exports.OpenAIResponsesToolChoice = exports.OpenAIResponsesServiceTier = exports.OpenAIResponsesResponseStatus = exports.OpenAIResponsesRefusalContentType = exports.OpenAIResponsesRefusalContent = exports.OpenAIResponsesReasoningEffort = exports.OpenAIResponsesReasoningConfig = exports.OpenAIResponsesPrompt = exports.OpenAIResponsesInput = exports.OpenAIResponsesIncompleteDetailsReason = exports.OpenAIResponsesIncompleteDetails = exports.OpenAIResponsesIncludable = exports.OpenAIResponsesAnnotation = exports.NotFoundResponseErrorData = exports.NotFoundResponse = exports.NamedToolChoice = exports.ModelsListResponseData = void 0;
8
- exports.make = exports.WebSearchStatus = exports.WebSearchPreviewToolUserLocationType = exports.WebSearchPreviewToolUserLocation = exports.VideoURL = exports.UserMessage = exports.UpdateKeysRequestLimitReset = exports.UpdateKeysRequest = exports.UpdateKeys200 = exports.UnprocessableEntityResponseErrorData = exports.UnprocessableEntityResponse = exports.UnauthorizedResponseErrorData = exports.UnauthorizedResponse = exports.URLCitationType = exports.URLCitationAnnotationDetailType = exports.URLCitationAnnotationDetail = exports.URLCitation = exports.TopProviderInfo = exports.ToolResponseMessage = exports.ToolDefinitionJson = exports.ToolChoiceOption = exports.ToolCallStatus = exports.TooManyRequestsResponseErrorData = exports.TooManyRequestsResponse = exports.SystemMessage = exports.ServiceUnavailableResponseErrorData = exports.ServiceUnavailableResponse = exports.ResponsesWebSearchUserLocationType = exports.ResponsesWebSearchUserLocation = exports.ResponsesWebSearchCallOutputType = exports.ResponsesWebSearchCallOutput = exports.ResponsesSearchContextSize = exports.ResponsesOutputMessageType = exports.ResponsesOutputMessageStatusEnum = exports.ResponsesOutputMessageRole = exports.ResponsesOutputMessage = exports.ResponsesOutputItemReasoningType = exports.ResponsesOutputItemReasoningStatusEnum = exports.ResponsesOutputItemReasoning = exports.ResponsesOutputItemFunctionCallType = exports.ResponsesOutputItemFunctionCallStatusEnum = exports.ResponsesOutputItemFunctionCall = exports.ResponsesOutputItemFileSearchCallType = exports.ResponsesOutputItemFileSearchCall = exports.ResponsesImageGenerationCallType = exports.ResponsesImageGenerationCall = exports.ResponsesFormatTextType = exports.ResponsesFormatTextJSONSchemaConfigType = exports.ResponsesFormatTextJSONSchemaConfig = exports.ResponsesFormatText = exports.ResponsesFormatJSONObjectType = exports.ResponsesFormatJSONObject = exports.ResponsesErrorFieldCode = exports.ResponsesErrorField = exports.ResponseTextConfigVerbosity = exports.ResponseTextConfig = exports.ResponseOutputTextType = exports.ResponseOutputText = exports.ResponseInputTextType = exports.ResponseInputText = exports.ResponseInputImageType = exports.ResponseInputImageDetail = exports.ResponseInputImage = exports.ResponseInputFileType = exports.ResponseInputFile = exports.ResponseInputAudioType = exports.ResponseInputAudioInputAudioFormat = exports.ResponseInputAudio = exports.ResponseFormatTextGrammar = exports.ResponseFormatTextConfig = exports.ResponseFormatJSONSchema = exports.RequestTimeoutResponseErrorData = exports.RequestTimeoutResponse = exports.ReasoningTextContentType = exports.ReasoningTextContent = exports.ReasoningSummaryVerbosity = void 0;
6
+ exports.ExchangeAuthCodeForAPIKeyRequestCodeChallengeMethod = exports.ExchangeAuthCodeForAPIKeyRequest = exports.ExchangeAuthCodeForAPIKey200 = exports.EndpointStatus = exports.EdgeNetworkTimeoutResponseErrorData = exports.EdgeNetworkTimeoutResponse = exports.DeleteKeys200 = exports.DeleteGuardrail200 = exports.DefaultParameters = exports.DataCollection = exports.CreateMessages529Type = exports.CreateMessages529 = exports.CreateMessages503Type = exports.CreateMessages503 = exports.CreateMessages500Type = exports.CreateMessages500 = exports.CreateMessages429Type = exports.CreateMessages429 = exports.CreateMessages404Type = exports.CreateMessages404 = exports.CreateMessages403Type = exports.CreateMessages403 = exports.CreateMessages401Type = exports.CreateMessages401 = exports.CreateMessages400Type = exports.CreateMessages400 = exports.CreateKeysRequestLimitReset = exports.CreateKeysRequest = exports.CreateKeys201 = exports.CreateGuardrailRequestResetInterval = exports.CreateGuardrailRequest = exports.CreateGuardrail201DataResetInterval = exports.CreateGuardrail201 = exports.CreateEmbeddingsRequestEncodingFormat = exports.CreateEmbeddingsRequest = exports.CreateEmbeddings200Object = exports.CreateEmbeddings200 = exports.CreateCoinbaseCharge200 = exports.CreateChargeRequestChainId = exports.CreateChargeRequest = exports.CreateAuthKeysCodeRequestCodeChallengeMethod = exports.CreateAuthKeysCodeRequest = exports.CreateAuthKeysCode200 = exports.CompletionUsage = exports.CompletionResponse = exports.CompletionLogprobs = exports.CompletionFinishReasonEnum = exports.CompletionFinishReason = exports.CompletionCreateParams = exports.CompletionChoice = exports.ClientError = exports.ChatStreamOptions = exports.ChatResponseChoice = exports.ChatResponse = exports.ChatMessageToolCall = exports.ChatMessageTokenLogprobs = exports.ChatMessageTokenLogprob = exports.ChatMessageContentItemVideo = exports.ChatMessageContentItemText = exports.ChatMessageContentItemImageImageUrlDetail = exports.ChatMessageContentItemImage = exports.ChatMessageContentItemCacheControlTtl = exports.ChatMessageContentItemCacheControl = exports.ChatMessageContentItemAudio = exports.ChatMessageContentItem = exports.ChatGenerationTokenUsage = exports.ChatGenerationParamsRouteEnum = exports.ChatGenerationParamsReasoningEffortEnum = exports.ChatGenerationParamsProviderEnumDataCollectionEnum = exports.ChatGenerationParams = exports.ChatError = exports.ChatCompletionFinishReason = exports.CacheControlEphemeral = exports.BulkUnassignMembersFromGuardrailRequest = exports.BulkUnassignMembersFromGuardrail200 = exports.BulkUnassignKeysFromGuardrailRequest = exports.BulkUnassignKeysFromGuardrail200 = exports.BulkAssignMembersToGuardrailRequest = exports.BulkAssignMembersToGuardrail200 = exports.BulkAssignKeysToGuardrailRequest = exports.BulkAssignKeysToGuardrail200 = exports.BigNumberUnion = exports.BadRequestResponseErrorData = exports.BadRequestResponse = exports.BadGatewayResponseErrorData = exports.BadGatewayResponse = exports.AssistantMessage = exports.AnthropicMessagesResponseUsageServiceTier = exports.AnthropicMessagesResponseType = exports.AnthropicMessagesResponseStopReason = exports.AnthropicMessagesResponseRole = exports.AnthropicMessagesResponse = exports.AnthropicMessagesRequestToolChoiceEnumType = exports.AnthropicMessagesRequestThinkingEnumType = exports.AnthropicMessagesRequestServiceTier = exports.AnthropicMessagesRequestRoute = exports.AnthropicMessagesRequestProviderSort = exports.AnthropicMessagesRequest = exports.AnnotationDetail = exports.ActivityItem = void 0;
7
+ exports.OpenResponsesWebSearch20250826ToolType = exports.OpenResponsesWebSearch20250826Tool = exports.OpenResponsesResponseTextVerbosity = exports.OpenResponsesResponseText = exports.OpenResponsesRequestTruncationEnum = exports.OpenResponsesRequestTruncation = exports.OpenResponsesRequestServiceTier = exports.OpenResponsesRequestRoute = exports.OpenResponsesRequestMetadata = exports.OpenResponsesRequest = exports.OpenResponsesReasoningType = exports.OpenResponsesReasoningStatusEnum = exports.OpenResponsesReasoningFormat = exports.OpenResponsesReasoningConfig = exports.OpenResponsesReasoning = exports.OpenResponsesNonStreamingResponseObject = exports.OpenResponsesNonStreamingResponse = exports.OpenResponsesInputMessageItemType = exports.OpenResponsesInputMessageItemRoleEnum = exports.OpenResponsesInputMessageItem = exports.OpenResponsesInput = exports.OpenResponsesFunctionToolCallType = exports.OpenResponsesFunctionToolCall = exports.OpenResponsesFunctionCallOutputType = exports.OpenResponsesFunctionCallOutput = exports.OpenResponsesEasyInputMessageType = exports.OpenResponsesEasyInputMessageRoleEnum = exports.OpenResponsesEasyInputMessage = exports.OpenAIResponsesUsage = exports.OpenAIResponsesTruncation = exports.OpenAIResponsesToolChoiceEnumTypeEnum = exports.OpenAIResponsesToolChoiceEnumType = exports.OpenAIResponsesToolChoiceEnum = exports.OpenAIResponsesToolChoice = exports.OpenAIResponsesServiceTier = exports.OpenAIResponsesResponseStatus = exports.OpenAIResponsesRefusalContentType = exports.OpenAIResponsesRefusalContent = exports.OpenAIResponsesReasoningEffort = exports.OpenAIResponsesReasoningConfig = exports.OpenAIResponsesPrompt = exports.OpenAIResponsesInput = exports.OpenAIResponsesIncompleteDetailsReason = exports.OpenAIResponsesIncompleteDetails = exports.OpenAIResponsesIncludable = exports.OpenAIResponsesAnnotation = exports.NotFoundResponseErrorData = exports.NotFoundResponse = exports.NamedToolChoice = exports.ModelsListResponseData = exports.ModelsListResponse = exports.ModelsCountResponse = exports.ModelName = exports.ModelGroup = exports.ModelArchitectureInstructType = exports.ModelArchitecture = exports.Model = exports.Message = exports.ListProviders200 = exports.ListParams = exports.ListMemberAssignmentsParams = exports.ListMemberAssignments200 = exports.ListKeyAssignmentsParams = exports.ListKeyAssignments200 = exports.ListGuardrailsParams = exports.ListGuardrails200 = exports.ListGuardrailMemberAssignmentsParams = exports.ListGuardrailMemberAssignments200 = exports.ListGuardrailKeyAssignmentsParams = exports.ListGuardrailKeyAssignments200 = exports.ListEndpointsZdr200 = exports.ListEndpointsResponseArchitectureEnumInstructType = exports.ListEndpointsResponseArchitecture = exports.ListEndpointsResponse = exports.ListEndpoints200 = exports.List200 = exports.JSONSchemaConfig = exports.InternalServerResponseErrorData = exports.InternalServerResponse = exports.InputModality = exports.ImageGenerationStatus = exports.GetUserActivityParams = exports.GetUserActivity200 = exports.GetModelsParamsCategory = exports.GetModelsParams = exports.GetKey200 = exports.GetGuardrail200DataResetInterval = exports.GetGuardrail200 = exports.GetGenerationParams = exports.GetGeneration200DataApiType = exports.GetGeneration200 = exports.GetCurrentKey200 = exports.GetCredits200 = exports.ForbiddenResponseErrorData = exports.ForbiddenResponse = exports.FilePathType = exports.FilePath = exports.FileCitationType = exports.FileCitation = exports.FileAnnotationDetail = void 0;
8
+ exports.ResponsesOutputItemReasoningFormat = exports.ResponsesOutputItemReasoning = exports.ResponsesOutputItemFunctionCallType = exports.ResponsesOutputItemFunctionCallStatusEnum = exports.ResponsesOutputItemFunctionCall = exports.ResponsesOutputItemFileSearchCallType = exports.ResponsesOutputItemFileSearchCall = exports.ResponsesImageGenerationCallType = exports.ResponsesImageGenerationCall = exports.ResponsesFormatTextType = exports.ResponsesFormatTextJSONSchemaConfigType = exports.ResponsesFormatTextJSONSchemaConfig = exports.ResponsesFormatText = exports.ResponsesFormatJSONObjectType = exports.ResponsesFormatJSONObject = exports.ResponsesErrorFieldCode = exports.ResponsesErrorField = exports.ResponseTextConfigVerbosity = exports.ResponseTextConfig = exports.ResponseOutputTextType = exports.ResponseOutputText = exports.ResponseInputVideoType = exports.ResponseInputVideo = exports.ResponseInputTextType = exports.ResponseInputText = exports.ResponseInputImageType = exports.ResponseInputImageDetail = exports.ResponseInputImage = exports.ResponseInputFileType = exports.ResponseInputFile = exports.ResponseInputAudioType = exports.ResponseInputAudioInputAudioFormat = exports.ResponseInputAudio = exports.ResponseFormatTextGrammar = exports.ResponseFormatTextConfig = exports.ResponseFormatJSONSchema = exports.RequestTimeoutResponseErrorData = exports.RequestTimeoutResponse = exports.ReasoningTextContentType = exports.ReasoningTextContent = exports.ReasoningSummaryVerbosity = exports.ReasoningSummaryTextType = exports.ReasoningSummaryText = exports.ReasoningDetailText = exports.ReasoningDetailSummary = exports.ReasoningDetailEncrypted = exports.ReasoningDetail = exports.Quantization = exports.PublicPricing = exports.PublicEndpointThroughputLast30M = exports.PublicEndpointQuantizationEnum = exports.PublicEndpointQuantization = exports.PublicEndpoint = exports.ProviderSortUnion = exports.ProviderSortConfigPartitionEnum = exports.ProviderSortConfig = exports.ProviderSort = exports.ProviderPreferencesSort = exports.ProviderPreferences = exports.ProviderOverloadedResponseErrorData = exports.ProviderOverloadedResponse = exports.ProviderName = exports.PreferredMinThroughput = exports.PreferredMaxLatency = exports.PercentileThroughputCutoffs = exports.PercentileStats = exports.PercentileLatencyCutoffs = exports.PerRequestLimits = exports.PaymentRequiredResponseErrorData = exports.PaymentRequiredResponse = exports.PayloadTooLargeResponseErrorData = exports.PayloadTooLargeResponse = exports.Parameter = exports.PDFParserOptions = exports.PDFParserEngine = exports.OutputModality = exports.OutputMessageType = exports.OutputMessageStatusEnum = exports.OutputMessageRole = exports.OutputMessage = exports.OutputItemWebSearchCallType = exports.OutputItemWebSearchCall = exports.OutputItemReasoningType = exports.OutputItemReasoningStatusEnum = exports.OutputItemReasoning = exports.OutputItemImageGenerationCallType = exports.OutputItemImageGenerationCall = exports.OutputItemFunctionCallType = exports.OutputItemFunctionCallStatusEnum = exports.OutputItemFunctionCall = exports.OutputItemFileSearchCallType = exports.OutputItemFileSearchCall = exports.OpenRouterAnthropicMessageParamRole = exports.OpenRouterAnthropicMessageParam = exports.OpenResponsesWebSearchToolType = exports.OpenResponsesWebSearchTool = exports.OpenResponsesWebSearchPreviewToolType = exports.OpenResponsesWebSearchPreviewTool = exports.OpenResponsesWebSearchPreview20250311ToolType = exports.OpenResponsesWebSearchPreview20250311Tool = void 0;
9
+ exports.make = exports.WebSearchStatus = exports.WebSearchPreviewToolUserLocationType = exports.WebSearchPreviewToolUserLocation = exports.WebSearchEngine = exports.UserMessage = exports.UpdateKeysRequestLimitReset = exports.UpdateKeysRequest = exports.UpdateKeys200 = exports.UpdateGuardrailRequestResetInterval = exports.UpdateGuardrailRequest = exports.UpdateGuardrail200DataResetInterval = exports.UpdateGuardrail200 = exports.UnprocessableEntityResponseErrorData = exports.UnprocessableEntityResponse = exports.UnauthorizedResponseErrorData = exports.UnauthorizedResponse = exports.URLCitationType = exports.URLCitationAnnotationDetail = exports.URLCitation = exports.TopProviderInfo = exports.ToolResponseMessage = exports.ToolDefinitionJson = exports.ToolChoiceOption = exports.ToolCallStatus = exports.TooManyRequestsResponseErrorData = exports.TooManyRequestsResponse = exports.SystemMessage = exports.ServiceUnavailableResponseErrorData = exports.ServiceUnavailableResponse = exports.Schema6 = exports.Schema5 = exports.Schema4Enum = exports.Schema4 = exports.Schema3 = exports.Schema2 = exports.Schema1 = exports.Schema0 = exports.ResponsesWebSearchUserLocationType = exports.ResponsesWebSearchUserLocation = exports.ResponsesWebSearchCallOutputType = exports.ResponsesWebSearchCallOutput = exports.ResponsesSearchContextSize = exports.ResponsesOutputModality = exports.ResponsesOutputMessageType = exports.ResponsesOutputMessageStatusEnum = exports.ResponsesOutputMessageRole = exports.ResponsesOutputMessage = exports.ResponsesOutputItemReasoningType = exports.ResponsesOutputItemReasoningStatusEnum = void 0;
9
10
  var HttpClientError = _interopRequireWildcard(require("@effect/platform/HttpClientError"));
10
11
  var HttpClientRequest = _interopRequireWildcard(require("@effect/platform/HttpClientRequest"));
11
12
  var HttpClientResponse = _interopRequireWildcard(require("@effect/platform/HttpClientResponse"));
@@ -17,89 +18,92 @@ class CacheControlEphemeral extends /*#__PURE__*/S.Class("CacheControlEphemeral"
17
18
  "type": /*#__PURE__*/S.Literal("ephemeral")
18
19
  }) {}
19
20
  exports.CacheControlEphemeral = CacheControlEphemeral;
20
- class ReasoningDetailSummaryType extends /*#__PURE__*/S.Literal("reasoning.summary") {}
21
- exports.ReasoningDetailSummaryType = ReasoningDetailSummaryType;
22
- class ReasoningDetailSummaryFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
23
- /**
24
- * Reasoning summary detail
25
- */
26
- exports.ReasoningDetailSummaryFormat = ReasoningDetailSummaryFormat;
27
- class ReasoningDetailSummary extends /*#__PURE__*/S.Class("ReasoningDetailSummary")({
28
- "type": ReasoningDetailSummaryType,
29
- "summary": S.String,
30
- "id": /*#__PURE__*/S.optionalWith(S.String, {
21
+ class OpenResponsesReasoningFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "azure-openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
22
+ exports.OpenResponsesReasoningFormat = OpenResponsesReasoningFormat;
23
+ class OpenResponsesReasoningType extends /*#__PURE__*/S.Literal("reasoning") {}
24
+ exports.OpenResponsesReasoningType = OpenResponsesReasoningType;
25
+ class ReasoningTextContentType extends /*#__PURE__*/S.Literal("reasoning_text") {}
26
+ exports.ReasoningTextContentType = ReasoningTextContentType;
27
+ class ReasoningTextContent extends /*#__PURE__*/S.Class("ReasoningTextContent")({
28
+ "type": ReasoningTextContentType,
29
+ "text": S.String
30
+ }) {}
31
+ exports.ReasoningTextContent = ReasoningTextContent;
32
+ class ReasoningSummaryTextType extends /*#__PURE__*/S.Literal("summary_text") {}
33
+ exports.ReasoningSummaryTextType = ReasoningSummaryTextType;
34
+ class ReasoningSummaryText extends /*#__PURE__*/S.Class("ReasoningSummaryText")({
35
+ "type": ReasoningSummaryTextType,
36
+ "text": S.String
37
+ }) {}
38
+ exports.ReasoningSummaryText = ReasoningSummaryText;
39
+ class OpenResponsesReasoningStatusEnum extends /*#__PURE__*/S.Literal("in_progress") {}
40
+ exports.OpenResponsesReasoningStatusEnum = OpenResponsesReasoningStatusEnum;
41
+ class OpenResponsesReasoning extends /*#__PURE__*/S.Class("OpenResponsesReasoning")({
42
+ "signature": /*#__PURE__*/S.optionalWith(S.String, {
31
43
  nullable: true
32
44
  }),
33
- "format": /*#__PURE__*/S.optionalWith(ReasoningDetailSummaryFormat, {
34
- nullable: true,
35
- default: () => "anthropic-claude-v1"
45
+ "format": /*#__PURE__*/S.optionalWith(OpenResponsesReasoningFormat, {
46
+ nullable: true
47
+ }),
48
+ "type": OpenResponsesReasoningType,
49
+ "id": S.String,
50
+ "content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ReasoningTextContent), {
51
+ nullable: true
52
+ }),
53
+ "summary": /*#__PURE__*/S.Array(ReasoningSummaryText),
54
+ "encrypted_content": /*#__PURE__*/S.optionalWith(S.String, {
55
+ nullable: true
36
56
  }),
37
- "index": /*#__PURE__*/S.optionalWith(S.Number, {
57
+ "status": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(OpenResponsesReasoningStatusEnum, OpenResponsesReasoningStatusEnum, OpenResponsesReasoningStatusEnum), {
38
58
  nullable: true
39
59
  })
40
60
  }) {}
61
+ exports.OpenResponsesReasoning = OpenResponsesReasoning;
62
+ class ReasoningDetailSummary extends /*#__PURE__*/S.Class("ReasoningDetailSummary")({
63
+ id: /*#__PURE__*/S.optionalWith(S.String, {
64
+ nullable: true
65
+ }),
66
+ type: /*#__PURE__*/S.Literal("reasoning.summary"),
67
+ index: /*#__PURE__*/S.optional(S.Number),
68
+ format: /*#__PURE__*/S.optionalWith(OpenResponsesReasoningFormat, {
69
+ nullable: true
70
+ }),
71
+ summary: S.String
72
+ }) {}
41
73
  exports.ReasoningDetailSummary = ReasoningDetailSummary;
42
- class ReasoningDetailEncryptedType extends /*#__PURE__*/S.Literal("reasoning.encrypted") {}
43
- exports.ReasoningDetailEncryptedType = ReasoningDetailEncryptedType;
44
- class ReasoningDetailEncryptedFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
45
- /**
46
- * Encrypted reasoning detail
47
- */
48
- exports.ReasoningDetailEncryptedFormat = ReasoningDetailEncryptedFormat;
49
74
  class ReasoningDetailEncrypted extends /*#__PURE__*/S.Class("ReasoningDetailEncrypted")({
50
- "type": ReasoningDetailEncryptedType,
51
- "data": S.String,
52
- "id": /*#__PURE__*/S.optionalWith(S.String, {
75
+ id: /*#__PURE__*/S.optionalWith(S.String, {
53
76
  nullable: true
54
77
  }),
55
- "format": /*#__PURE__*/S.optionalWith(ReasoningDetailEncryptedFormat, {
56
- nullable: true,
57
- default: () => "anthropic-claude-v1"
58
- }),
59
- "index": /*#__PURE__*/S.optionalWith(S.Number, {
78
+ type: /*#__PURE__*/S.Literal("reasoning.encrypted"),
79
+ index: /*#__PURE__*/S.optional(S.Number),
80
+ format: /*#__PURE__*/S.optionalWith(OpenResponsesReasoningFormat, {
60
81
  nullable: true
61
- })
82
+ }),
83
+ data: S.String
62
84
  }) {}
63
85
  exports.ReasoningDetailEncrypted = ReasoningDetailEncrypted;
64
- class ReasoningDetailTextType extends /*#__PURE__*/S.Literal("reasoning.text") {}
65
- exports.ReasoningDetailTextType = ReasoningDetailTextType;
66
- class ReasoningDetailTextFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
67
- /**
68
- * Text reasoning detail
69
- */
70
- exports.ReasoningDetailTextFormat = ReasoningDetailTextFormat;
71
86
  class ReasoningDetailText extends /*#__PURE__*/S.Class("ReasoningDetailText")({
72
- "type": ReasoningDetailTextType,
73
- "text": /*#__PURE__*/S.optionalWith(S.String, {
87
+ id: /*#__PURE__*/S.optionalWith(S.String, {
74
88
  nullable: true
75
89
  }),
76
- "signature": /*#__PURE__*/S.optionalWith(S.String, {
90
+ type: /*#__PURE__*/S.Literal("reasoning.text"),
91
+ index: /*#__PURE__*/S.optional(S.Number),
92
+ format: /*#__PURE__*/S.optionalWith(OpenResponsesReasoningFormat, {
77
93
  nullable: true
78
94
  }),
79
- "id": /*#__PURE__*/S.optionalWith(S.String, {
95
+ text: /*#__PURE__*/S.optionalWith(S.String, {
80
96
  nullable: true
81
97
  }),
82
- "format": /*#__PURE__*/S.optionalWith(ReasoningDetailTextFormat, {
83
- nullable: true,
84
- default: () => "anthropic-claude-v1"
85
- }),
86
- "index": /*#__PURE__*/S.optionalWith(S.Number, {
98
+ signature: /*#__PURE__*/S.optionalWith(S.String, {
87
99
  nullable: true
88
100
  })
89
101
  }) {}
90
- /**
91
- * Reasoning detail information
92
- */
93
102
  exports.ReasoningDetailText = ReasoningDetailText;
94
103
  class ReasoningDetail extends /*#__PURE__*/S.Union(ReasoningDetailSummary, ReasoningDetailEncrypted, ReasoningDetailText) {}
95
104
  exports.ReasoningDetail = ReasoningDetail;
96
- class FileAnnotationDetailType extends /*#__PURE__*/S.Literal("file") {}
97
- /**
98
- * File annotation with content
99
- */
100
- exports.FileAnnotationDetailType = FileAnnotationDetailType;
101
105
  class FileAnnotationDetail extends /*#__PURE__*/S.Class("FileAnnotationDetail")({
102
- "type": FileAnnotationDetailType,
106
+ "type": /*#__PURE__*/S.Literal("file"),
103
107
  "file": /*#__PURE__*/S.Struct({
104
108
  "hash": S.String,
105
109
  "name": /*#__PURE__*/S.optionalWith(S.String, {
@@ -117,13 +121,8 @@ class FileAnnotationDetail extends /*#__PURE__*/S.Class("FileAnnotationDetail")(
117
121
  })
118
122
  }) {}
119
123
  exports.FileAnnotationDetail = FileAnnotationDetail;
120
- class URLCitationAnnotationDetailType extends /*#__PURE__*/S.Literal("url_citation") {}
121
- /**
122
- * URL citation annotation
123
- */
124
- exports.URLCitationAnnotationDetailType = URLCitationAnnotationDetailType;
125
124
  class URLCitationAnnotationDetail extends /*#__PURE__*/S.Class("URLCitationAnnotationDetail")({
126
- "type": URLCitationAnnotationDetailType,
125
+ "type": /*#__PURE__*/S.Literal("url_citation"),
127
126
  "url_citation": /*#__PURE__*/S.Struct({
128
127
  "end_index": S.Number,
129
128
  "start_index": S.Number,
@@ -134,53 +133,9 @@ class URLCitationAnnotationDetail extends /*#__PURE__*/S.Class("URLCitationAnnot
134
133
  })
135
134
  })
136
135
  }) {}
137
- /**
138
- * Annotation information
139
- */
140
136
  exports.URLCitationAnnotationDetail = URLCitationAnnotationDetail;
141
137
  class AnnotationDetail extends /*#__PURE__*/S.Union(FileAnnotationDetail, URLCitationAnnotationDetail) {}
142
138
  exports.AnnotationDetail = AnnotationDetail;
143
- class OpenResponsesReasoningFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
144
- exports.OpenResponsesReasoningFormat = OpenResponsesReasoningFormat;
145
- class OpenResponsesReasoningType extends /*#__PURE__*/S.Literal("reasoning") {}
146
- exports.OpenResponsesReasoningType = OpenResponsesReasoningType;
147
- class ReasoningTextContentType extends /*#__PURE__*/S.Literal("reasoning_text") {}
148
- exports.ReasoningTextContentType = ReasoningTextContentType;
149
- class ReasoningTextContent extends /*#__PURE__*/S.Class("ReasoningTextContent")({
150
- "type": ReasoningTextContentType,
151
- "text": S.String
152
- }) {}
153
- exports.ReasoningTextContent = ReasoningTextContent;
154
- class ReasoningSummaryTextType extends /*#__PURE__*/S.Literal("summary_text") {}
155
- exports.ReasoningSummaryTextType = ReasoningSummaryTextType;
156
- class ReasoningSummaryText extends /*#__PURE__*/S.Class("ReasoningSummaryText")({
157
- "type": ReasoningSummaryTextType,
158
- "text": S.String
159
- }) {}
160
- exports.ReasoningSummaryText = ReasoningSummaryText;
161
- class OpenResponsesReasoningStatusEnum extends /*#__PURE__*/S.Literal("in_progress") {}
162
- exports.OpenResponsesReasoningStatusEnum = OpenResponsesReasoningStatusEnum;
163
- class OpenResponsesReasoning extends /*#__PURE__*/S.Class("OpenResponsesReasoning")({
164
- "signature": /*#__PURE__*/S.optionalWith(S.String, {
165
- nullable: true
166
- }),
167
- "format": /*#__PURE__*/S.optionalWith(OpenResponsesReasoningFormat, {
168
- nullable: true
169
- }),
170
- "type": OpenResponsesReasoningType,
171
- "id": S.String,
172
- "content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ReasoningTextContent), {
173
- nullable: true
174
- }),
175
- "summary": /*#__PURE__*/S.Array(ReasoningSummaryText),
176
- "encrypted_content": /*#__PURE__*/S.optionalWith(S.String, {
177
- nullable: true
178
- }),
179
- "status": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(OpenResponsesReasoningStatusEnum, OpenResponsesReasoningStatusEnum, OpenResponsesReasoningStatusEnum), {
180
- nullable: true
181
- })
182
- }) {}
183
- exports.OpenResponsesReasoning = OpenResponsesReasoning;
184
139
  class OpenResponsesEasyInputMessageType extends /*#__PURE__*/S.Literal("message") {}
185
140
  exports.OpenResponsesEasyInputMessageType = OpenResponsesEasyInputMessageType;
186
141
  class OpenResponsesEasyInputMessageRoleEnum extends /*#__PURE__*/S.Literal("developer") {}
@@ -195,21 +150,6 @@ class ResponseInputText extends /*#__PURE__*/S.Class("ResponseInputText")({
195
150
  "text": S.String
196
151
  }) {}
197
152
  exports.ResponseInputText = ResponseInputText;
198
- class ResponseInputImageType extends /*#__PURE__*/S.Literal("input_image") {}
199
- exports.ResponseInputImageType = ResponseInputImageType;
200
- class ResponseInputImageDetail extends /*#__PURE__*/S.Literal("auto", "high", "low") {}
201
- /**
202
- * Image input content item
203
- */
204
- exports.ResponseInputImageDetail = ResponseInputImageDetail;
205
- class ResponseInputImage extends /*#__PURE__*/S.Class("ResponseInputImage")({
206
- "type": ResponseInputImageType,
207
- "detail": ResponseInputImageDetail,
208
- "image_url": /*#__PURE__*/S.optionalWith(S.String, {
209
- nullable: true
210
- })
211
- }) {}
212
- exports.ResponseInputImage = ResponseInputImage;
213
153
  class ResponseInputFileType extends /*#__PURE__*/S.Literal("input_file") {}
214
154
  /**
215
155
  * File input content item
@@ -246,12 +186,35 @@ class ResponseInputAudio extends /*#__PURE__*/S.Class("ResponseInputAudio")({
246
186
  })
247
187
  }) {}
248
188
  exports.ResponseInputAudio = ResponseInputAudio;
189
+ class ResponseInputVideoType extends /*#__PURE__*/S.Literal("input_video") {}
190
+ /**
191
+ * Video input content item
192
+ */
193
+ exports.ResponseInputVideoType = ResponseInputVideoType;
194
+ class ResponseInputVideo extends /*#__PURE__*/S.Class("ResponseInputVideo")({
195
+ "type": ResponseInputVideoType,
196
+ /**
197
+ * A base64 data URL or remote URL that resolves to a video file
198
+ */
199
+ "video_url": S.String
200
+ }) {}
201
+ exports.ResponseInputVideo = ResponseInputVideo;
249
202
  class OpenResponsesEasyInputMessage extends /*#__PURE__*/S.Class("OpenResponsesEasyInputMessage")({
250
203
  "type": /*#__PURE__*/S.optionalWith(OpenResponsesEasyInputMessageType, {
251
204
  nullable: true
252
205
  }),
253
206
  "role": /*#__PURE__*/S.Union(OpenResponsesEasyInputMessageRoleEnum, OpenResponsesEasyInputMessageRoleEnum, OpenResponsesEasyInputMessageRoleEnum, OpenResponsesEasyInputMessageRoleEnum),
254
- "content": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseInputText, ResponseInputImage, ResponseInputFile, ResponseInputAudio)), S.String)
207
+ "content": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseInputText, /*#__PURE__*/
208
+ /**
209
+ * Image input content item
210
+ */
211
+ S.Struct({
212
+ "type": /*#__PURE__*/S.Literal("input_image"),
213
+ "detail": /*#__PURE__*/S.Literal("auto", "high", "low"),
214
+ "image_url": /*#__PURE__*/S.optionalWith(S.String, {
215
+ nullable: true
216
+ })
217
+ }), ResponseInputFile, ResponseInputAudio, ResponseInputVideo)), S.String)
255
218
  }) {}
256
219
  exports.OpenResponsesEasyInputMessage = OpenResponsesEasyInputMessage;
257
220
  class OpenResponsesInputMessageItemType extends /*#__PURE__*/S.Literal("message") {}
@@ -266,7 +229,17 @@ class OpenResponsesInputMessageItem extends /*#__PURE__*/S.Class("OpenResponsesI
266
229
  nullable: true
267
230
  }),
268
231
  "role": /*#__PURE__*/S.Union(OpenResponsesInputMessageItemRoleEnum, OpenResponsesInputMessageItemRoleEnum, OpenResponsesInputMessageItemRoleEnum),
269
- "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseInputText, ResponseInputImage, ResponseInputFile, ResponseInputAudio))
232
+ "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseInputText, /*#__PURE__*/
233
+ /**
234
+ * Image input content item
235
+ */
236
+ S.Struct({
237
+ "type": /*#__PURE__*/S.Literal("input_image"),
238
+ "detail": /*#__PURE__*/S.Literal("auto", "high", "low"),
239
+ "image_url": /*#__PURE__*/S.optionalWith(S.String, {
240
+ nullable: true
241
+ })
242
+ }), ResponseInputFile, ResponseInputAudio, ResponseInputVideo))
270
243
  }) {}
271
244
  exports.OpenResponsesInputMessageItem = OpenResponsesInputMessageItem;
272
245
  class OpenResponsesFunctionToolCallType extends /*#__PURE__*/S.Literal("function_call") {}
@@ -346,6 +319,18 @@ class ResponseOutputText extends /*#__PURE__*/S.Class("ResponseOutputText")({
346
319
  "text": S.String,
347
320
  "annotations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(OpenAIResponsesAnnotation), {
348
321
  nullable: true
322
+ }),
323
+ "logprobs": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
324
+ "token": S.String,
325
+ "bytes": /*#__PURE__*/S.Array(S.Number),
326
+ "logprob": S.Number,
327
+ "top_logprobs": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
328
+ "token": S.String,
329
+ "bytes": /*#__PURE__*/S.Array(S.Number),
330
+ "logprob": S.Number
331
+ }))
332
+ })), {
333
+ nullable: true
349
334
  })
350
335
  }) {}
351
336
  exports.ResponseOutputText = ResponseOutputText;
@@ -365,12 +350,29 @@ class ResponsesOutputMessage extends /*#__PURE__*/S.Class("ResponsesOutputMessag
365
350
  }),
366
351
  "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseOutputText, OpenAIResponsesRefusalContent))
367
352
  }) {}
353
+ /**
354
+ * The format of the reasoning content
355
+ */
368
356
  exports.ResponsesOutputMessage = ResponsesOutputMessage;
357
+ class ResponsesOutputItemReasoningFormat extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "azure-openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
358
+ exports.ResponsesOutputItemReasoningFormat = ResponsesOutputItemReasoningFormat;
369
359
  class ResponsesOutputItemReasoningType extends /*#__PURE__*/S.Literal("reasoning") {}
370
360
  exports.ResponsesOutputItemReasoningType = ResponsesOutputItemReasoningType;
371
361
  class ResponsesOutputItemReasoningStatusEnum extends /*#__PURE__*/S.Literal("in_progress") {}
372
362
  exports.ResponsesOutputItemReasoningStatusEnum = ResponsesOutputItemReasoningStatusEnum;
373
363
  class ResponsesOutputItemReasoning extends /*#__PURE__*/S.Class("ResponsesOutputItemReasoning")({
364
+ /**
365
+ * A signature for the reasoning content, used for verification
366
+ */
367
+ "signature": /*#__PURE__*/S.optionalWith(S.String, {
368
+ nullable: true
369
+ }),
370
+ /**
371
+ * The format of the reasoning content
372
+ */
373
+ "format": /*#__PURE__*/S.optionalWith(ResponsesOutputItemReasoningFormat, {
374
+ nullable: true
375
+ }),
374
376
  "type": ResponsesOutputItemReasoningType,
375
377
  "id": S.String,
376
378
  "content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ReasoningTextContent), {
@@ -637,7 +639,7 @@ class OpenResponsesResponseText extends /*#__PURE__*/S.Class("OpenResponsesRespo
637
639
  })
638
640
  }) {}
639
641
  exports.OpenResponsesResponseText = OpenResponsesResponseText;
640
- class OpenAIResponsesReasoningEffort extends /*#__PURE__*/S.Literal("high", "medium", "low", "minimal", "none") {}
642
+ class OpenAIResponsesReasoningEffort extends /*#__PURE__*/S.Literal("xhigh", "high", "medium", "low", "minimal", "none") {}
641
643
  exports.OpenAIResponsesReasoningEffort = OpenAIResponsesReasoningEffort;
642
644
  class ReasoningSummaryVerbosity extends /*#__PURE__*/S.Literal("auto", "concise", "detailed") {}
643
645
  exports.ReasoningSummaryVerbosity = ReasoningSummaryVerbosity;
@@ -656,6 +658,8 @@ class OpenResponsesReasoningConfig extends /*#__PURE__*/S.Class("OpenResponsesRe
656
658
  })
657
659
  }) {}
658
660
  exports.OpenResponsesReasoningConfig = OpenResponsesReasoningConfig;
661
+ class ResponsesOutputModality extends /*#__PURE__*/S.Literal("text", "image") {}
662
+ exports.ResponsesOutputModality = ResponsesOutputModality;
659
663
  class OpenAIResponsesPrompt extends /*#__PURE__*/S.Class("OpenAIResponsesPrompt")({
660
664
  "id": S.String,
661
665
  "variables": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Record({
@@ -668,9 +672,7 @@ class OpenAIResponsesPrompt extends /*#__PURE__*/S.Class("OpenAIResponsesPrompt"
668
672
  exports.OpenAIResponsesPrompt = OpenAIResponsesPrompt;
669
673
  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") {}
670
674
  exports.OpenAIResponsesIncludable = OpenAIResponsesIncludable;
671
- class OpenResponsesRequestServiceTierEnum extends /*#__PURE__*/S.Literal("auto", "default", "flex", "scale", "priority") {}
672
- exports.OpenResponsesRequestServiceTierEnum = OpenResponsesRequestServiceTierEnum;
673
- class OpenResponsesRequestServiceTier extends OpenResponsesRequestServiceTierEnum {}
675
+ class OpenResponsesRequestServiceTier extends /*#__PURE__*/S.Literal("auto") {}
674
676
  exports.OpenResponsesRequestServiceTier = OpenResponsesRequestServiceTier;
675
677
  class OpenResponsesRequestTruncationEnum extends /*#__PURE__*/S.Literal("auto", "disabled") {}
676
678
  exports.OpenResponsesRequestTruncationEnum = OpenResponsesRequestTruncationEnum;
@@ -684,23 +686,125 @@ class OpenResponsesRequestTruncation extends OpenResponsesRequestTruncationEnum
684
686
  exports.OpenResponsesRequestTruncation = OpenResponsesRequestTruncation;
685
687
  class DataCollection extends /*#__PURE__*/S.Literal("deny", "allow") {}
686
688
  exports.DataCollection = DataCollection;
687
- 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") {}
689
+ 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", "Google", "Google AI Studio", "Groq", "Hyperbolic", "Inception", "Inceptron", "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", "Seed", "SiliconFlow", "Sourceful", "Stealth", "StreamLake", "Switchpoint", "Together", "Upstage", "Venice", "WandB", "Xiaomi", "xAI", "Z.AI", "FakeProvider") {}
688
690
  exports.ProviderName = ProviderName;
689
691
  class Quantization extends /*#__PURE__*/S.Literal("int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown") {}
690
- /**
691
- * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
692
- */
693
692
  exports.Quantization = Quantization;
694
693
  class ProviderSort extends /*#__PURE__*/S.Literal("price", "throughput", "latency") {}
694
+ exports.ProviderSort = ProviderSort;
695
+ class ProviderSortConfigPartitionEnum extends /*#__PURE__*/S.Literal("model", "none") {}
696
+ exports.ProviderSortConfigPartitionEnum = ProviderSortConfigPartitionEnum;
697
+ class ProviderSortConfig extends /*#__PURE__*/S.Class("ProviderSortConfig")({
698
+ "by": /*#__PURE__*/S.optionalWith(ProviderSort, {
699
+ nullable: true
700
+ }),
701
+ "partition": /*#__PURE__*/S.optionalWith(ProviderSortConfigPartitionEnum, {
702
+ nullable: true
703
+ })
704
+ }) {}
695
705
  /**
696
- * A value in string or number format that is a large number
706
+ * A value in string format that is a large number
697
707
  */
698
- exports.ProviderSort = ProviderSort;
699
- class BigNumberUnion extends /*#__PURE__*/S.Union(S.Number, S.String, S.Number) {}
708
+ exports.ProviderSortConfig = ProviderSortConfig;
709
+ class BigNumberUnion extends S.String {}
700
710
  /**
701
- * Request schema for Responses endpoint
711
+ * Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
702
712
  */
703
713
  exports.BigNumberUnion = BigNumberUnion;
714
+ class PercentileThroughputCutoffs extends /*#__PURE__*/S.Class("PercentileThroughputCutoffs")({
715
+ /**
716
+ * Minimum p50 throughput (tokens/sec)
717
+ */
718
+ "p50": /*#__PURE__*/S.optionalWith(S.Number, {
719
+ nullable: true
720
+ }),
721
+ /**
722
+ * Minimum p75 throughput (tokens/sec)
723
+ */
724
+ "p75": /*#__PURE__*/S.optionalWith(S.Number, {
725
+ nullable: true
726
+ }),
727
+ /**
728
+ * Minimum p90 throughput (tokens/sec)
729
+ */
730
+ "p90": /*#__PURE__*/S.optionalWith(S.Number, {
731
+ nullable: true
732
+ }),
733
+ /**
734
+ * Minimum p99 throughput (tokens/sec)
735
+ */
736
+ "p99": /*#__PURE__*/S.optionalWith(S.Number, {
737
+ nullable: true
738
+ })
739
+ }) {}
740
+ /**
741
+ * Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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.
742
+ */
743
+ exports.PercentileThroughputCutoffs = PercentileThroughputCutoffs;
744
+ class PreferredMinThroughput extends /*#__PURE__*/S.Union(S.Number, PercentileThroughputCutoffs) {}
745
+ /**
746
+ * Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
747
+ */
748
+ exports.PreferredMinThroughput = PreferredMinThroughput;
749
+ class PercentileLatencyCutoffs extends /*#__PURE__*/S.Class("PercentileLatencyCutoffs")({
750
+ /**
751
+ * Maximum p50 latency (seconds)
752
+ */
753
+ "p50": /*#__PURE__*/S.optionalWith(S.Number, {
754
+ nullable: true
755
+ }),
756
+ /**
757
+ * Maximum p75 latency (seconds)
758
+ */
759
+ "p75": /*#__PURE__*/S.optionalWith(S.Number, {
760
+ nullable: true
761
+ }),
762
+ /**
763
+ * Maximum p90 latency (seconds)
764
+ */
765
+ "p90": /*#__PURE__*/S.optionalWith(S.Number, {
766
+ nullable: true
767
+ }),
768
+ /**
769
+ * Maximum p99 latency (seconds)
770
+ */
771
+ "p99": /*#__PURE__*/S.optionalWith(S.Number, {
772
+ nullable: true
773
+ })
774
+ }) {}
775
+ /**
776
+ * Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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.
777
+ */
778
+ exports.PercentileLatencyCutoffs = PercentileLatencyCutoffs;
779
+ class PreferredMaxLatency extends /*#__PURE__*/S.Union(S.Number, PercentileLatencyCutoffs) {}
780
+ /**
781
+ * The search engine to use for web search.
782
+ */
783
+ exports.PreferredMaxLatency = PreferredMaxLatency;
784
+ class WebSearchEngine extends /*#__PURE__*/S.Literal("native", "exa") {}
785
+ /**
786
+ * The engine to use for parsing PDF files.
787
+ */
788
+ exports.WebSearchEngine = WebSearchEngine;
789
+ class PDFParserEngine extends /*#__PURE__*/S.Literal("mistral-ocr", "pdf-text", "native") {}
790
+ /**
791
+ * Options for PDF parsing.
792
+ */
793
+ exports.PDFParserEngine = PDFParserEngine;
794
+ class PDFParserOptions extends /*#__PURE__*/S.Class("PDFParserOptions")({
795
+ "engine": /*#__PURE__*/S.optionalWith(PDFParserEngine, {
796
+ nullable: true
797
+ })
798
+ }) {}
799
+ /**
800
+ * **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
801
+ */
802
+ exports.PDFParserOptions = PDFParserOptions;
803
+ class OpenResponsesRequestRoute extends /*#__PURE__*/S.Literal("fallback", "sort") {}
804
+ /**
805
+ * Request schema for Responses endpoint
806
+ */
807
+ exports.OpenResponsesRequestRoute = OpenResponsesRequestRoute;
704
808
  class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesRequest")({
705
809
  "input": /*#__PURE__*/S.optionalWith(OpenResponsesInput, {
706
810
  nullable: true
@@ -745,9 +849,36 @@ class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesRequest")(
745
849
  "top_p": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), {
746
850
  nullable: true
747
851
  }),
852
+ "top_logprobs": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(20)), {
853
+ nullable: true
854
+ }),
855
+ "max_tool_calls": /*#__PURE__*/S.optionalWith(S.Int, {
856
+ nullable: true
857
+ }),
858
+ "presence_penalty": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(-2), /*#__PURE__*/S.lessThanOrEqualTo(2)), {
859
+ nullable: true
860
+ }),
861
+ "frequency_penalty": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(-2), /*#__PURE__*/S.lessThanOrEqualTo(2)), {
862
+ nullable: true
863
+ }),
748
864
  "top_k": /*#__PURE__*/S.optionalWith(S.Number, {
749
865
  nullable: true
750
866
  }),
867
+ /**
868
+ * Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
869
+ */
870
+ "image_config": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Record({
871
+ key: S.String,
872
+ value: S.Unknown
873
+ }), {
874
+ nullable: true
875
+ }),
876
+ /**
877
+ * Output modalities for the response. Supported values are "text" and "image".
878
+ */
879
+ "modalities": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ResponsesOutputModality), {
880
+ nullable: true
881
+ }),
751
882
  "prompt_cache_key": /*#__PURE__*/S.optionalWith(S.String, {
752
883
  nullable: true
753
884
  }),
@@ -766,11 +897,13 @@ class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesRequest")(
766
897
  "safety_identifier": /*#__PURE__*/S.optionalWith(S.String, {
767
898
  nullable: true
768
899
  }),
769
- "store": /*#__PURE__*/S.optionalWith(S.Boolean, {
770
- nullable: true
900
+ "store": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal(false), {
901
+ nullable: true,
902
+ default: () => false
771
903
  }),
772
904
  "service_tier": /*#__PURE__*/S.optionalWith(OpenResponsesRequestServiceTier, {
773
- nullable: true
905
+ nullable: true,
906
+ default: () => "auto"
774
907
  }),
775
908
  "truncation": /*#__PURE__*/S.optionalWith(OpenResponsesRequestTruncation, {
776
909
  nullable: true
@@ -836,7 +969,10 @@ class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesRequest")(
836
969
  "quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Quantization), {
837
970
  nullable: true
838
971
  }),
839
- "sort": /*#__PURE__*/S.optionalWith(ProviderSort, {
972
+ /**
973
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
974
+ */
975
+ "sort": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(ProviderSort, ProviderSortConfig), {
840
976
  nullable: true
841
977
  }),
842
978
  /**
@@ -860,6 +996,12 @@ class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesRequest")(
860
996
  })
861
997
  }), {
862
998
  nullable: true
999
+ }),
1000
+ "preferred_min_throughput": /*#__PURE__*/S.optionalWith(PreferredMinThroughput, {
1001
+ nullable: true
1002
+ }),
1003
+ "preferred_max_latency": /*#__PURE__*/S.optionalWith(PreferredMaxLatency, {
1004
+ nullable: true
863
1005
  })
864
1006
  }), {
865
1007
  nullable: true
@@ -868,38 +1010,77 @@ class OpenResponsesRequest extends /*#__PURE__*/S.Class("OpenResponsesRequest")(
868
1010
  * Plugins you want to enable for this request, including their settings.
869
1011
  */
870
1012
  "plugins": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
871
- "id": /*#__PURE__*/S.Literal("moderation")
872
- }), /*#__PURE__*/S.Struct({
873
- "id": /*#__PURE__*/S.Literal("web"),
874
- "max_results": /*#__PURE__*/S.optionalWith(S.Number, {
1013
+ "id": /*#__PURE__*/S.Literal("auto-router"),
1014
+ /**
1015
+ * Set to false to disable the auto-router plugin for this request. Defaults to true.
1016
+ */
1017
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
1018
+ nullable: true
1019
+ }),
1020
+ /**
1021
+ * List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
1022
+ */
1023
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
1024
+ nullable: true
1025
+ })
1026
+ }), /*#__PURE__*/S.Struct({
1027
+ "id": /*#__PURE__*/S.Literal("moderation")
1028
+ }), /*#__PURE__*/S.Struct({
1029
+ "id": /*#__PURE__*/S.Literal("web"),
1030
+ /**
1031
+ * Set to false to disable the web-search plugin for this request. Defaults to true.
1032
+ */
1033
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
1034
+ nullable: true
1035
+ }),
1036
+ "max_results": /*#__PURE__*/S.optionalWith(S.Number, {
875
1037
  nullable: true
876
1038
  }),
877
1039
  "search_prompt": /*#__PURE__*/S.optionalWith(S.String, {
878
1040
  nullable: true
879
1041
  }),
880
- "engine": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("native", "exa"), {
1042
+ "engine": /*#__PURE__*/S.optionalWith(WebSearchEngine, {
881
1043
  nullable: true
882
1044
  })
883
1045
  }), /*#__PURE__*/S.Struct({
884
1046
  "id": /*#__PURE__*/S.Literal("file-parser"),
885
- "max_files": /*#__PURE__*/S.optionalWith(S.Number, {
1047
+ /**
1048
+ * Set to false to disable the file-parser plugin for this request. Defaults to true.
1049
+ */
1050
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
886
1051
  nullable: true
887
1052
  }),
888
- "pdf": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
889
- "engine": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("mistral-ocr", "pdf-text", "native"), {
890
- nullable: true
891
- })
892
- }), {
1053
+ "pdf": /*#__PURE__*/S.optionalWith(PDFParserOptions, {
1054
+ nullable: true
1055
+ })
1056
+ }), /*#__PURE__*/S.Struct({
1057
+ "id": /*#__PURE__*/S.Literal("response-healing"),
1058
+ /**
1059
+ * Set to false to disable the response-healing plugin for this request. Defaults to true.
1060
+ */
1061
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
893
1062
  nullable: true
894
1063
  })
895
1064
  }))), {
896
1065
  nullable: true
897
1066
  }),
1067
+ /**
1068
+ * **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
1069
+ */
1070
+ "route": /*#__PURE__*/S.optionalWith(OpenResponsesRequestRoute, {
1071
+ nullable: true
1072
+ }),
898
1073
  /**
899
1074
  * 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.
900
1075
  */
901
1076
  "user": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(128)), {
902
1077
  nullable: true
1078
+ }),
1079
+ /**
1080
+ * 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.
1081
+ */
1082
+ "session_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(128)), {
1083
+ nullable: true
903
1084
  })
904
1085
  }) {}
905
1086
  exports.OpenResponsesRequest = OpenResponsesRequest;
@@ -1017,6 +1198,21 @@ class OpenAIResponsesIncompleteDetails extends /*#__PURE__*/S.Class("OpenAIRespo
1017
1198
  })
1018
1199
  }) {}
1019
1200
  exports.OpenAIResponsesIncompleteDetails = OpenAIResponsesIncompleteDetails;
1201
+ class ResponseInputImageType extends /*#__PURE__*/S.Literal("input_image") {}
1202
+ exports.ResponseInputImageType = ResponseInputImageType;
1203
+ class ResponseInputImageDetail extends /*#__PURE__*/S.Literal("auto", "high", "low") {}
1204
+ /**
1205
+ * Image input content item
1206
+ */
1207
+ exports.ResponseInputImageDetail = ResponseInputImageDetail;
1208
+ class ResponseInputImage extends /*#__PURE__*/S.Class("ResponseInputImage")({
1209
+ "type": ResponseInputImageType,
1210
+ "detail": ResponseInputImageDetail,
1211
+ "image_url": /*#__PURE__*/S.optionalWith(S.String, {
1212
+ nullable: true
1213
+ })
1214
+ }) {}
1215
+ exports.ResponseInputImage = ResponseInputImage;
1020
1216
  class OpenAIResponsesInput extends /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1021
1217
  "type": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("message"), {
1022
1218
  nullable: true
@@ -1089,9 +1285,8 @@ class OpenResponsesNonStreamingResponse extends /*#__PURE__*/S.Class("OpenRespon
1089
1285
  "object": OpenResponsesNonStreamingResponseObject,
1090
1286
  "created_at": S.Number,
1091
1287
  "model": S.String,
1092
- "status": /*#__PURE__*/S.optionalWith(OpenAIResponsesResponseStatus, {
1093
- nullable: true
1094
- }),
1288
+ "status": OpenAIResponsesResponseStatus,
1289
+ "completed_at": /*#__PURE__*/S.NullOr(S.Number),
1095
1290
  "user": /*#__PURE__*/S.optionalWith(S.String, {
1096
1291
  nullable: true
1097
1292
  }),
@@ -1117,6 +1312,8 @@ class OpenResponsesNonStreamingResponse extends /*#__PURE__*/S.Class("OpenRespon
1117
1312
  }),
1118
1313
  "temperature": /*#__PURE__*/S.NullOr(S.Number),
1119
1314
  "top_p": /*#__PURE__*/S.NullOr(S.Number),
1315
+ "presence_penalty": /*#__PURE__*/S.NullOr(S.Number),
1316
+ "frequency_penalty": /*#__PURE__*/S.NullOr(S.Number),
1120
1317
  "instructions": OpenAIResponsesInput,
1121
1318
  "metadata": /*#__PURE__*/S.NullOr(OpenResponsesRequestMetadata),
1122
1319
  "tools": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/
@@ -1464,247 +1661,1227 @@ class ProviderOverloadedResponse extends /*#__PURE__*/S.Class("ProviderOverloade
1464
1661
  })
1465
1662
  }) {}
1466
1663
  exports.ProviderOverloadedResponse = ProviderOverloadedResponse;
1467
- class GetUserActivityParams extends /*#__PURE__*/S.Struct({
1468
- /**
1469
- * Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
1470
- */
1471
- "date": /*#__PURE__*/S.optionalWith(S.String, {
1472
- nullable: true
1473
- })
1474
- }) {}
1475
- exports.GetUserActivityParams = GetUserActivityParams;
1476
- class ActivityItem extends /*#__PURE__*/S.Class("ActivityItem")({
1477
- /**
1478
- * Date of the activity (YYYY-MM-DD format)
1479
- */
1480
- "date": S.String,
1481
- /**
1482
- * Model slug (e.g., "openai/gpt-4.1")
1483
- */
1484
- "model": S.String,
1485
- /**
1486
- * Model permaslug (e.g., "openai/gpt-4.1-2025-04-14")
1487
- */
1488
- "model_permaslug": S.String,
1489
- /**
1490
- * Unique identifier for the endpoint
1491
- */
1492
- "endpoint_id": S.String,
1493
- /**
1494
- * Name of the provider serving this endpoint
1495
- */
1496
- "provider_name": S.String,
1497
- /**
1498
- * Total cost in USD (OpenRouter credits spent)
1499
- */
1500
- "usage": S.Number,
1501
- /**
1502
- * BYOK inference cost in USD (external credits spent)
1503
- */
1504
- "byok_usage_inference": S.Number,
1505
- /**
1506
- * Number of requests made
1507
- */
1508
- "requests": S.Number,
1509
- /**
1510
- * Total prompt tokens used
1511
- */
1512
- "prompt_tokens": S.Number,
1513
- /**
1514
- * Total completion tokens generated
1515
- */
1516
- "completion_tokens": S.Number,
1517
- /**
1518
- * Total reasoning tokens used
1519
- */
1520
- "reasoning_tokens": S.Number
1521
- }) {}
1522
- exports.ActivityItem = ActivityItem;
1523
- class GetUserActivity200 extends /*#__PURE__*/S.Struct({
1524
- /**
1525
- * List of activity items
1526
- */
1527
- "data": /*#__PURE__*/S.Array(ActivityItem)
1528
- }) {}
1529
- /**
1530
- * Error data for ForbiddenResponse
1531
- */
1532
- exports.GetUserActivity200 = GetUserActivity200;
1533
- class ForbiddenResponseErrorData extends /*#__PURE__*/S.Class("ForbiddenResponseErrorData")({
1534
- "code": S.Int,
1535
- "message": S.String,
1536
- "metadata": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Record({
1537
- key: S.String,
1538
- value: S.Unknown
1539
- }), {
1540
- nullable: true
1541
- })
1542
- }) {}
1543
- /**
1544
- * Forbidden - Authentication successful but insufficient permissions
1545
- */
1546
- exports.ForbiddenResponseErrorData = ForbiddenResponseErrorData;
1547
- class ForbiddenResponse extends /*#__PURE__*/S.Class("ForbiddenResponse")({
1548
- "error": ForbiddenResponseErrorData,
1549
- "user_id": /*#__PURE__*/S.optionalWith(S.String, {
1550
- nullable: true
1551
- })
1552
- }) {}
1553
- /**
1554
- * Total credits purchased and used
1555
- */
1556
- exports.ForbiddenResponse = ForbiddenResponse;
1557
- class GetCredits200 extends /*#__PURE__*/S.Record({
1558
- key: S.String,
1559
- value: S.Unknown
1560
- }) {}
1561
- exports.GetCredits200 = GetCredits200;
1562
- class CreateChargeRequestChainId extends /*#__PURE__*/S.Literal(1, 137, 8453) {}
1664
+ class OpenRouterAnthropicMessageParamRole extends /*#__PURE__*/S.Literal("user", "assistant") {}
1563
1665
  /**
1564
- * Create a Coinbase charge for crypto payment
1666
+ * Anthropic message with OpenRouter extensions
1565
1667
  */
1566
- exports.CreateChargeRequestChainId = CreateChargeRequestChainId;
1567
- class CreateChargeRequest extends /*#__PURE__*/S.Class("CreateChargeRequest")({
1568
- "amount": S.Number,
1569
- "sender": S.String,
1570
- "chain_id": CreateChargeRequestChainId
1571
- }) {}
1572
- exports.CreateChargeRequest = CreateChargeRequest;
1573
- class CreateCoinbaseCharge200 extends /*#__PURE__*/S.Struct({
1574
- "data": /*#__PURE__*/S.Struct({
1575
- "id": S.String,
1576
- "created_at": S.String,
1577
- "expires_at": S.String,
1578
- "web3_data": /*#__PURE__*/S.Struct({
1579
- "transfer_intent": /*#__PURE__*/S.Struct({
1580
- "call_data": /*#__PURE__*/S.Struct({
1581
- "deadline": S.String,
1582
- "fee_amount": S.String,
1583
- "id": S.String,
1584
- "operator": S.String,
1585
- "prefix": S.String,
1586
- "recipient": S.String,
1587
- "recipient_amount": S.String,
1588
- "recipient_currency": S.String,
1589
- "refund_destination": S.String,
1590
- "signature": S.String
1591
- }),
1592
- "metadata": /*#__PURE__*/S.Struct({
1593
- "chain_id": S.Number,
1594
- "contract_address": S.String,
1595
- "sender": S.String
1596
- })
1668
+ exports.OpenRouterAnthropicMessageParamRole = OpenRouterAnthropicMessageParamRole;
1669
+ class OpenRouterAnthropicMessageParam extends /*#__PURE__*/S.Class("OpenRouterAnthropicMessageParam")({
1670
+ "role": OpenRouterAnthropicMessageParamRole,
1671
+ "content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1672
+ "type": /*#__PURE__*/S.Literal("text"),
1673
+ "text": S.String,
1674
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1675
+ "type": /*#__PURE__*/S.Literal("char_location"),
1676
+ "cited_text": S.String,
1677
+ "document_index": S.Number,
1678
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1679
+ "start_char_index": S.Number,
1680
+ "end_char_index": S.Number
1681
+ }), /*#__PURE__*/S.Struct({
1682
+ "type": /*#__PURE__*/S.Literal("page_location"),
1683
+ "cited_text": S.String,
1684
+ "document_index": S.Number,
1685
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1686
+ "start_page_number": S.Number,
1687
+ "end_page_number": S.Number
1688
+ }), /*#__PURE__*/S.Struct({
1689
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
1690
+ "cited_text": S.String,
1691
+ "document_index": S.Number,
1692
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1693
+ "start_block_index": S.Number,
1694
+ "end_block_index": S.Number
1695
+ }), /*#__PURE__*/S.Struct({
1696
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
1697
+ "cited_text": S.String,
1698
+ "encrypted_index": S.String,
1699
+ "title": /*#__PURE__*/S.NullOr(S.String),
1700
+ "url": S.String
1701
+ }), /*#__PURE__*/S.Struct({
1702
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
1703
+ "cited_text": S.String,
1704
+ "search_result_index": S.Number,
1705
+ "source": S.String,
1706
+ "title": /*#__PURE__*/S.NullOr(S.String),
1707
+ "start_block_index": S.Number,
1708
+ "end_block_index": S.Number
1709
+ }))), {
1710
+ nullable: true
1711
+ }),
1712
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1713
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1714
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1715
+ nullable: true
1597
1716
  })
1717
+ }), {
1718
+ nullable: true
1598
1719
  })
1599
- })
1600
- }) {}
1601
- exports.CreateCoinbaseCharge200 = CreateCoinbaseCharge200;
1602
- class CreateEmbeddingsRequestEncodingFormat extends /*#__PURE__*/S.Literal("float", "base64") {}
1603
- exports.CreateEmbeddingsRequestEncodingFormat = CreateEmbeddingsRequestEncodingFormat;
1604
- class CreateEmbeddingsRequest extends /*#__PURE__*/S.Class("CreateEmbeddingsRequest")({
1605
- "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({
1606
- "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1720
+ }), /*#__PURE__*/S.Struct({
1721
+ "type": /*#__PURE__*/S.Literal("image"),
1722
+ "source": /*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1723
+ "type": /*#__PURE__*/S.Literal("base64"),
1724
+ "media_type": /*#__PURE__*/S.Literal("image/jpeg", "image/png", "image/gif", "image/webp"),
1725
+ "data": S.String
1726
+ }), /*#__PURE__*/S.Struct({
1727
+ "type": /*#__PURE__*/S.Literal("url"),
1728
+ "url": S.String
1729
+ })),
1730
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1731
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1732
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1733
+ nullable: true
1734
+ })
1735
+ }), {
1736
+ nullable: true
1737
+ })
1738
+ }), /*#__PURE__*/S.Struct({
1739
+ "type": /*#__PURE__*/S.Literal("document"),
1740
+ "source": /*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1741
+ "type": /*#__PURE__*/S.Literal("base64"),
1742
+ "media_type": /*#__PURE__*/S.Literal("application/pdf"),
1743
+ "data": S.String
1744
+ }), /*#__PURE__*/S.Struct({
1607
1745
  "type": /*#__PURE__*/S.Literal("text"),
1608
- "text": S.String
1746
+ "media_type": /*#__PURE__*/S.Literal("text/plain"),
1747
+ "data": S.String
1609
1748
  }), /*#__PURE__*/S.Struct({
1610
- "type": /*#__PURE__*/S.Literal("image_url"),
1611
- "image_url": /*#__PURE__*/S.Struct({
1612
- "url": S.String
1749
+ "type": /*#__PURE__*/S.Literal("content"),
1750
+ "content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1751
+ "type": /*#__PURE__*/S.Literal("text"),
1752
+ "text": S.String,
1753
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1754
+ "type": /*#__PURE__*/S.Literal("char_location"),
1755
+ "cited_text": S.String,
1756
+ "document_index": S.Number,
1757
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1758
+ "start_char_index": S.Number,
1759
+ "end_char_index": S.Number
1760
+ }), /*#__PURE__*/S.Struct({
1761
+ "type": /*#__PURE__*/S.Literal("page_location"),
1762
+ "cited_text": S.String,
1763
+ "document_index": S.Number,
1764
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1765
+ "start_page_number": S.Number,
1766
+ "end_page_number": S.Number
1767
+ }), /*#__PURE__*/S.Struct({
1768
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
1769
+ "cited_text": S.String,
1770
+ "document_index": S.Number,
1771
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1772
+ "start_block_index": S.Number,
1773
+ "end_block_index": S.Number
1774
+ }), /*#__PURE__*/S.Struct({
1775
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
1776
+ "cited_text": S.String,
1777
+ "encrypted_index": S.String,
1778
+ "title": /*#__PURE__*/S.NullOr(S.String),
1779
+ "url": S.String
1780
+ }), /*#__PURE__*/S.Struct({
1781
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
1782
+ "cited_text": S.String,
1783
+ "search_result_index": S.Number,
1784
+ "source": S.String,
1785
+ "title": /*#__PURE__*/S.NullOr(S.String),
1786
+ "start_block_index": S.Number,
1787
+ "end_block_index": S.Number
1788
+ }))), {
1789
+ nullable: true
1790
+ }),
1791
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1792
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1793
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1794
+ nullable: true
1795
+ })
1796
+ }), {
1797
+ nullable: true
1798
+ })
1799
+ }), /*#__PURE__*/S.Struct({
1800
+ "type": /*#__PURE__*/S.Literal("image"),
1801
+ "source": /*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1802
+ "type": /*#__PURE__*/S.Literal("base64"),
1803
+ "media_type": /*#__PURE__*/S.Literal("image/jpeg", "image/png", "image/gif", "image/webp"),
1804
+ "data": S.String
1805
+ }), /*#__PURE__*/S.Struct({
1806
+ "type": /*#__PURE__*/S.Literal("url"),
1807
+ "url": S.String
1808
+ })),
1809
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1810
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1811
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1812
+ nullable: true
1813
+ })
1814
+ }), {
1815
+ nullable: true
1816
+ })
1817
+ }))))
1818
+ }), /*#__PURE__*/S.Struct({
1819
+ "type": /*#__PURE__*/S.Literal("url"),
1820
+ "url": S.String
1821
+ })),
1822
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1823
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
1824
+ nullable: true
1613
1825
  })
1614
- })))
1615
- }))),
1616
- "model": S.String,
1617
- "encoding_format": /*#__PURE__*/S.optionalWith(CreateEmbeddingsRequestEncodingFormat, {
1618
- nullable: true
1619
- }),
1620
- "dimensions": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThan(0)), {
1621
- nullable: true
1622
- }),
1623
- "user": /*#__PURE__*/S.optionalWith(S.String, {
1624
- nullable: true
1625
- }),
1626
- "provider": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1627
- /**
1628
- * Whether to allow backup providers to serve requests
1629
- * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
1630
- * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
1631
- */
1632
- "allow_fallbacks": /*#__PURE__*/S.optionalWith(S.Boolean, {
1826
+ }), {
1633
1827
  nullable: true
1634
1828
  }),
1635
- /**
1636
- * 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.
1637
- */
1638
- "require_parameters": /*#__PURE__*/S.optionalWith(S.Boolean, {
1829
+ "context": /*#__PURE__*/S.optionalWith(S.String, {
1639
1830
  nullable: true
1640
1831
  }),
1641
- "data_collection": /*#__PURE__*/S.optionalWith(DataCollection, {
1832
+ "title": /*#__PURE__*/S.optionalWith(S.String, {
1642
1833
  nullable: true
1643
1834
  }),
1644
- /**
1645
- * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
1646
- */
1647
- "zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
1835
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1836
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1837
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1838
+ nullable: true
1839
+ })
1840
+ }), {
1648
1841
  nullable: true
1649
- }),
1650
- /**
1651
- * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
1652
- */
1653
- "enforce_distillable_text": /*#__PURE__*/S.optionalWith(S.Boolean, {
1842
+ })
1843
+ }), /*#__PURE__*/S.Struct({
1844
+ "type": /*#__PURE__*/S.Literal("tool_use"),
1845
+ "id": S.String,
1846
+ "name": S.String,
1847
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1848
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1849
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1850
+ nullable: true
1851
+ })
1852
+ }), {
1853
+ nullable: true
1854
+ })
1855
+ }), /*#__PURE__*/S.Struct({
1856
+ "type": /*#__PURE__*/S.Literal("tool_result"),
1857
+ "tool_use_id": S.String,
1858
+ "content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1859
+ "type": /*#__PURE__*/S.Literal("text"),
1860
+ "text": S.String,
1861
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1862
+ "type": /*#__PURE__*/S.Literal("char_location"),
1863
+ "cited_text": S.String,
1864
+ "document_index": S.Number,
1865
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1866
+ "start_char_index": S.Number,
1867
+ "end_char_index": S.Number
1868
+ }), /*#__PURE__*/S.Struct({
1869
+ "type": /*#__PURE__*/S.Literal("page_location"),
1870
+ "cited_text": S.String,
1871
+ "document_index": S.Number,
1872
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1873
+ "start_page_number": S.Number,
1874
+ "end_page_number": S.Number
1875
+ }), /*#__PURE__*/S.Struct({
1876
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
1877
+ "cited_text": S.String,
1878
+ "document_index": S.Number,
1879
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1880
+ "start_block_index": S.Number,
1881
+ "end_block_index": S.Number
1882
+ }), /*#__PURE__*/S.Struct({
1883
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
1884
+ "cited_text": S.String,
1885
+ "encrypted_index": S.String,
1886
+ "title": /*#__PURE__*/S.NullOr(S.String),
1887
+ "url": S.String
1888
+ }), /*#__PURE__*/S.Struct({
1889
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
1890
+ "cited_text": S.String,
1891
+ "search_result_index": S.Number,
1892
+ "source": S.String,
1893
+ "title": /*#__PURE__*/S.NullOr(S.String),
1894
+ "start_block_index": S.Number,
1895
+ "end_block_index": S.Number
1896
+ }))), {
1897
+ nullable: true
1898
+ }),
1899
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1900
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1901
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1902
+ nullable: true
1903
+ })
1904
+ }), {
1905
+ nullable: true
1906
+ })
1907
+ }), /*#__PURE__*/S.Struct({
1908
+ "type": /*#__PURE__*/S.Literal("image"),
1909
+ "source": /*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1910
+ "type": /*#__PURE__*/S.Literal("base64"),
1911
+ "media_type": /*#__PURE__*/S.Literal("image/jpeg", "image/png", "image/gif", "image/webp"),
1912
+ "data": S.String
1913
+ }), /*#__PURE__*/S.Struct({
1914
+ "type": /*#__PURE__*/S.Literal("url"),
1915
+ "url": S.String
1916
+ })),
1917
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1918
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1919
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1920
+ nullable: true
1921
+ })
1922
+ }), {
1923
+ nullable: true
1924
+ })
1925
+ })))), {
1926
+ nullable: true
1927
+ }),
1928
+ "is_error": /*#__PURE__*/S.optionalWith(S.Boolean, {
1929
+ nullable: true
1930
+ }),
1931
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1932
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1933
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1934
+ nullable: true
1935
+ })
1936
+ }), {
1937
+ nullable: true
1938
+ })
1939
+ }), /*#__PURE__*/S.Struct({
1940
+ "type": /*#__PURE__*/S.Literal("thinking"),
1941
+ "thinking": S.String,
1942
+ "signature": S.String
1943
+ }), /*#__PURE__*/S.Struct({
1944
+ "type": /*#__PURE__*/S.Literal("redacted_thinking"),
1945
+ "data": S.String
1946
+ }), /*#__PURE__*/S.Struct({
1947
+ "type": /*#__PURE__*/S.Literal("server_tool_use"),
1948
+ "id": S.String,
1949
+ "name": /*#__PURE__*/S.Literal("web_search"),
1950
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1951
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1952
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1953
+ nullable: true
1954
+ })
1955
+ }), {
1956
+ nullable: true
1957
+ })
1958
+ }), /*#__PURE__*/S.Struct({
1959
+ "type": /*#__PURE__*/S.Literal("web_search_tool_result"),
1960
+ "tool_use_id": S.String,
1961
+ "content": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
1962
+ "type": /*#__PURE__*/S.Literal("web_search_result"),
1963
+ "encrypted_content": S.String,
1964
+ "title": S.String,
1965
+ "url": S.String,
1966
+ "page_age": /*#__PURE__*/S.optionalWith(S.String, {
1967
+ nullable: true
1968
+ })
1969
+ })), /*#__PURE__*/S.Struct({
1970
+ "type": /*#__PURE__*/S.Literal("web_search_tool_result_error"),
1971
+ "error_code": /*#__PURE__*/S.Literal("invalid_tool_input", "unavailable", "max_uses_exceeded", "too_many_requests", "query_too_long")
1972
+ })),
1973
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1974
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
1975
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
1976
+ nullable: true
1977
+ })
1978
+ }), {
1979
+ nullable: true
1980
+ })
1981
+ }), /*#__PURE__*/S.Struct({
1982
+ "type": /*#__PURE__*/S.Literal("search_result"),
1983
+ "source": S.String,
1984
+ "title": S.String,
1985
+ "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
1986
+ "type": /*#__PURE__*/S.Literal("text"),
1987
+ "text": S.String,
1988
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
1989
+ "type": /*#__PURE__*/S.Literal("char_location"),
1990
+ "cited_text": S.String,
1991
+ "document_index": S.Number,
1992
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
1993
+ "start_char_index": S.Number,
1994
+ "end_char_index": S.Number
1995
+ }), /*#__PURE__*/S.Struct({
1996
+ "type": /*#__PURE__*/S.Literal("page_location"),
1997
+ "cited_text": S.String,
1998
+ "document_index": S.Number,
1999
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2000
+ "start_page_number": S.Number,
2001
+ "end_page_number": S.Number
2002
+ }), /*#__PURE__*/S.Struct({
2003
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
2004
+ "cited_text": S.String,
2005
+ "document_index": S.Number,
2006
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2007
+ "start_block_index": S.Number,
2008
+ "end_block_index": S.Number
2009
+ }), /*#__PURE__*/S.Struct({
2010
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
2011
+ "cited_text": S.String,
2012
+ "encrypted_index": S.String,
2013
+ "title": /*#__PURE__*/S.NullOr(S.String),
2014
+ "url": S.String
2015
+ }), /*#__PURE__*/S.Struct({
2016
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
2017
+ "cited_text": S.String,
2018
+ "search_result_index": S.Number,
2019
+ "source": S.String,
2020
+ "title": /*#__PURE__*/S.NullOr(S.String),
2021
+ "start_block_index": S.Number,
2022
+ "end_block_index": S.Number
2023
+ }))), {
2024
+ nullable: true
2025
+ }),
2026
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2027
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2028
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2029
+ nullable: true
2030
+ })
2031
+ }), {
2032
+ nullable: true
2033
+ })
2034
+ })),
2035
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2036
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2037
+ nullable: true
2038
+ })
2039
+ }), {
2040
+ nullable: true
2041
+ }),
2042
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2043
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2044
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2045
+ nullable: true
2046
+ })
2047
+ }), {
2048
+ nullable: true
2049
+ })
2050
+ }))))
2051
+ }) {}
2052
+ exports.OpenRouterAnthropicMessageParam = OpenRouterAnthropicMessageParam;
2053
+ class AnthropicMessagesRequestToolChoiceEnumType extends /*#__PURE__*/S.Literal("tool") {}
2054
+ exports.AnthropicMessagesRequestToolChoiceEnumType = AnthropicMessagesRequestToolChoiceEnumType;
2055
+ class AnthropicMessagesRequestThinkingEnumType extends /*#__PURE__*/S.Literal("disabled") {}
2056
+ exports.AnthropicMessagesRequestThinkingEnumType = AnthropicMessagesRequestThinkingEnumType;
2057
+ class AnthropicMessagesRequestServiceTier extends /*#__PURE__*/S.Literal("auto", "standard_only") {}
2058
+ /**
2059
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
2060
+ */
2061
+ exports.AnthropicMessagesRequestServiceTier = AnthropicMessagesRequestServiceTier;
2062
+ class AnthropicMessagesRequestProviderSort extends /*#__PURE__*/S.Literal("price", "throughput", "latency") {}
2063
+ /**
2064
+ * **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
2065
+ */
2066
+ exports.AnthropicMessagesRequestProviderSort = AnthropicMessagesRequestProviderSort;
2067
+ class AnthropicMessagesRequestRoute extends /*#__PURE__*/S.Literal("fallback", "sort") {}
2068
+ /**
2069
+ * Request schema for Anthropic Messages API endpoint
2070
+ */
2071
+ exports.AnthropicMessagesRequestRoute = AnthropicMessagesRequestRoute;
2072
+ class AnthropicMessagesRequest extends /*#__PURE__*/S.Class("AnthropicMessagesRequest")({
2073
+ "model": S.String,
2074
+ "max_tokens": S.Number,
2075
+ "messages": /*#__PURE__*/S.Array(OpenRouterAnthropicMessageParam),
2076
+ "system": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2077
+ "type": /*#__PURE__*/S.Literal("text"),
2078
+ "text": S.String,
2079
+ "citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2080
+ "type": /*#__PURE__*/S.Literal("char_location"),
2081
+ "cited_text": S.String,
2082
+ "document_index": S.Number,
2083
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2084
+ "start_char_index": S.Number,
2085
+ "end_char_index": S.Number
2086
+ }), /*#__PURE__*/S.Struct({
2087
+ "type": /*#__PURE__*/S.Literal("page_location"),
2088
+ "cited_text": S.String,
2089
+ "document_index": S.Number,
2090
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2091
+ "start_page_number": S.Number,
2092
+ "end_page_number": S.Number
2093
+ }), /*#__PURE__*/S.Struct({
2094
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
2095
+ "cited_text": S.String,
2096
+ "document_index": S.Number,
2097
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2098
+ "start_block_index": S.Number,
2099
+ "end_block_index": S.Number
2100
+ }), /*#__PURE__*/S.Struct({
2101
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
2102
+ "cited_text": S.String,
2103
+ "encrypted_index": S.String,
2104
+ "title": /*#__PURE__*/S.NullOr(S.String),
2105
+ "url": S.String
2106
+ }), /*#__PURE__*/S.Struct({
2107
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
2108
+ "cited_text": S.String,
2109
+ "search_result_index": S.Number,
2110
+ "source": S.String,
2111
+ "title": /*#__PURE__*/S.NullOr(S.String),
2112
+ "start_block_index": S.Number,
2113
+ "end_block_index": S.Number
2114
+ }))), {
2115
+ nullable: true
2116
+ }),
2117
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2118
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2119
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2120
+ nullable: true
2121
+ })
2122
+ }), {
2123
+ nullable: true
2124
+ })
2125
+ }))), {
2126
+ nullable: true
2127
+ }),
2128
+ "metadata": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2129
+ "user_id": /*#__PURE__*/S.optionalWith(S.String, {
2130
+ nullable: true
2131
+ })
2132
+ }), {
2133
+ nullable: true
2134
+ }),
2135
+ "stop_sequences": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2136
+ nullable: true
2137
+ }),
2138
+ "stream": /*#__PURE__*/S.optionalWith(S.Boolean, {
2139
+ nullable: true
2140
+ }),
2141
+ "temperature": /*#__PURE__*/S.optionalWith(S.Number, {
2142
+ nullable: true
2143
+ }),
2144
+ "top_p": /*#__PURE__*/S.optionalWith(S.Number, {
2145
+ nullable: true
2146
+ }),
2147
+ "top_k": /*#__PURE__*/S.optionalWith(S.Number, {
2148
+ nullable: true
2149
+ }),
2150
+ "tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2151
+ "name": S.String,
2152
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
2153
+ nullable: true
2154
+ }),
2155
+ "input_schema": /*#__PURE__*/S.Struct({
2156
+ "type": /*#__PURE__*/S.Literal("object"),
2157
+ "required": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2158
+ nullable: true
2159
+ })
2160
+ }),
2161
+ "type": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("custom"), {
2162
+ nullable: true
2163
+ }),
2164
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2165
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2166
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2167
+ nullable: true
2168
+ })
2169
+ }), {
2170
+ nullable: true
2171
+ })
2172
+ }), /*#__PURE__*/S.Struct({
2173
+ "type": /*#__PURE__*/S.Literal("bash_20250124"),
2174
+ "name": /*#__PURE__*/S.Literal("bash"),
2175
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2176
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2177
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2178
+ nullable: true
2179
+ })
2180
+ }), {
2181
+ nullable: true
2182
+ })
2183
+ }), /*#__PURE__*/S.Struct({
2184
+ "type": /*#__PURE__*/S.Literal("text_editor_20250124"),
2185
+ "name": /*#__PURE__*/S.Literal("str_replace_editor"),
2186
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2187
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2188
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2189
+ nullable: true
2190
+ })
2191
+ }), {
2192
+ nullable: true
2193
+ })
2194
+ }), /*#__PURE__*/S.Struct({
2195
+ "type": /*#__PURE__*/S.Literal("web_search_20250305"),
2196
+ "name": /*#__PURE__*/S.Literal("web_search"),
2197
+ "allowed_domains": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2198
+ nullable: true
2199
+ }),
2200
+ "blocked_domains": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2201
+ nullable: true
2202
+ }),
2203
+ "max_uses": /*#__PURE__*/S.optionalWith(S.Number, {
1654
2204
  nullable: true
1655
2205
  }),
2206
+ "user_location": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2207
+ "type": /*#__PURE__*/S.Literal("approximate"),
2208
+ "city": /*#__PURE__*/S.optionalWith(S.String, {
2209
+ nullable: true
2210
+ }),
2211
+ "country": /*#__PURE__*/S.optionalWith(S.String, {
2212
+ nullable: true
2213
+ }),
2214
+ "region": /*#__PURE__*/S.optionalWith(S.String, {
2215
+ nullable: true
2216
+ }),
2217
+ "timezone": /*#__PURE__*/S.optionalWith(S.String, {
2218
+ nullable: true
2219
+ })
2220
+ }), {
2221
+ nullable: true
2222
+ }),
2223
+ "cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2224
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
2225
+ "ttl": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("5m", "1h"), {
2226
+ nullable: true
2227
+ })
2228
+ }), {
2229
+ nullable: true
2230
+ })
2231
+ }))), {
2232
+ nullable: true
2233
+ }),
2234
+ "tool_choice": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2235
+ "type": AnthropicMessagesRequestToolChoiceEnumType,
2236
+ "disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
2237
+ nullable: true
2238
+ })
2239
+ }), /*#__PURE__*/S.Struct({
2240
+ "type": AnthropicMessagesRequestToolChoiceEnumType,
2241
+ "disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
2242
+ nullable: true
2243
+ })
2244
+ }), /*#__PURE__*/S.Struct({
2245
+ "type": AnthropicMessagesRequestToolChoiceEnumType
2246
+ }), /*#__PURE__*/S.Struct({
2247
+ "type": AnthropicMessagesRequestToolChoiceEnumType,
2248
+ "name": S.String,
2249
+ "disable_parallel_tool_use": /*#__PURE__*/S.optionalWith(S.Boolean, {
2250
+ nullable: true
2251
+ })
2252
+ })), {
2253
+ nullable: true
2254
+ }),
2255
+ "thinking": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2256
+ "type": AnthropicMessagesRequestThinkingEnumType,
2257
+ "budget_tokens": S.Number
2258
+ }), /*#__PURE__*/S.Struct({
2259
+ "type": AnthropicMessagesRequestThinkingEnumType
2260
+ })), {
2261
+ nullable: true
2262
+ }),
2263
+ "service_tier": /*#__PURE__*/S.optionalWith(AnthropicMessagesRequestServiceTier, {
2264
+ nullable: true
2265
+ }),
2266
+ /**
2267
+ * When multiple model providers are available, optionally indicate your routing preference.
2268
+ */
2269
+ "provider": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2270
+ /**
2271
+ * Whether to allow backup providers to serve requests
2272
+ * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
2273
+ * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
2274
+ */
2275
+ "allow_fallbacks": /*#__PURE__*/S.optionalWith(S.Boolean, {
2276
+ nullable: true
2277
+ }),
2278
+ /**
2279
+ * 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.
2280
+ */
2281
+ "require_parameters": /*#__PURE__*/S.optionalWith(S.Boolean, {
2282
+ nullable: true
2283
+ }),
2284
+ "data_collection": /*#__PURE__*/S.optionalWith(DataCollection, {
2285
+ nullable: true
2286
+ }),
2287
+ /**
2288
+ * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
2289
+ */
2290
+ "zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
2291
+ nullable: true
2292
+ }),
2293
+ /**
2294
+ * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
2295
+ */
2296
+ "enforce_distillable_text": /*#__PURE__*/S.optionalWith(S.Boolean, {
2297
+ nullable: true
2298
+ }),
2299
+ /**
2300
+ * 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.
2301
+ */
2302
+ "order": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2303
+ nullable: true
2304
+ }),
2305
+ /**
2306
+ * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
2307
+ */
2308
+ "only": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2309
+ nullable: true
2310
+ }),
2311
+ /**
2312
+ * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
2313
+ */
2314
+ "ignore": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2315
+ nullable: true
2316
+ }),
2317
+ /**
2318
+ * A list of quantization levels to filter the provider by.
2319
+ */
2320
+ "quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Quantization), {
2321
+ nullable: true
2322
+ }),
2323
+ "sort": /*#__PURE__*/S.optionalWith(AnthropicMessagesRequestProviderSort, {
2324
+ nullable: true
2325
+ }),
2326
+ /**
2327
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
2328
+ */
2329
+ "max_price": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2330
+ "prompt": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2331
+ nullable: true
2332
+ }),
2333
+ "completion": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2334
+ nullable: true
2335
+ }),
2336
+ "image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2337
+ nullable: true
2338
+ }),
2339
+ "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2340
+ nullable: true
2341
+ }),
2342
+ "request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2343
+ nullable: true
2344
+ })
2345
+ }), {
2346
+ nullable: true
2347
+ }),
2348
+ "preferred_min_throughput": /*#__PURE__*/S.optionalWith(PreferredMinThroughput, {
2349
+ nullable: true
2350
+ }),
2351
+ "preferred_max_latency": /*#__PURE__*/S.optionalWith(PreferredMaxLatency, {
2352
+ nullable: true
2353
+ })
2354
+ }), {
2355
+ nullable: true
2356
+ }),
2357
+ /**
2358
+ * Plugins you want to enable for this request, including their settings.
2359
+ */
2360
+ "plugins": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2361
+ "id": /*#__PURE__*/S.Literal("auto-router"),
2362
+ /**
2363
+ * Set to false to disable the auto-router plugin for this request. Defaults to true.
2364
+ */
2365
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2366
+ nullable: true
2367
+ }),
2368
+ /**
2369
+ * List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
2370
+ */
2371
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2372
+ nullable: true
2373
+ })
2374
+ }), /*#__PURE__*/S.Struct({
2375
+ "id": /*#__PURE__*/S.Literal("moderation")
2376
+ }), /*#__PURE__*/S.Struct({
2377
+ "id": /*#__PURE__*/S.Literal("web"),
2378
+ /**
2379
+ * Set to false to disable the web-search plugin for this request. Defaults to true.
2380
+ */
2381
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2382
+ nullable: true
2383
+ }),
2384
+ "max_results": /*#__PURE__*/S.optionalWith(S.Number, {
2385
+ nullable: true
2386
+ }),
2387
+ "search_prompt": /*#__PURE__*/S.optionalWith(S.String, {
2388
+ nullable: true
2389
+ }),
2390
+ "engine": /*#__PURE__*/S.optionalWith(WebSearchEngine, {
2391
+ nullable: true
2392
+ })
2393
+ }), /*#__PURE__*/S.Struct({
2394
+ "id": /*#__PURE__*/S.Literal("file-parser"),
2395
+ /**
2396
+ * Set to false to disable the file-parser plugin for this request. Defaults to true.
2397
+ */
2398
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2399
+ nullable: true
2400
+ }),
2401
+ "pdf": /*#__PURE__*/S.optionalWith(PDFParserOptions, {
2402
+ nullable: true
2403
+ })
2404
+ }), /*#__PURE__*/S.Struct({
2405
+ "id": /*#__PURE__*/S.Literal("response-healing"),
2406
+ /**
2407
+ * Set to false to disable the response-healing plugin for this request. Defaults to true.
2408
+ */
2409
+ "enabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2410
+ nullable: true
2411
+ })
2412
+ }))), {
2413
+ nullable: true
2414
+ }),
2415
+ /**
2416
+ * **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
2417
+ */
2418
+ "route": /*#__PURE__*/S.optionalWith(AnthropicMessagesRequestRoute, {
2419
+ nullable: true
2420
+ }),
2421
+ /**
2422
+ * 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.
2423
+ */
2424
+ "user": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(128)), {
2425
+ nullable: true
2426
+ }),
2427
+ /**
2428
+ * 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.
2429
+ */
2430
+ "session_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(128)), {
2431
+ nullable: true
2432
+ }),
2433
+ "models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
2434
+ nullable: true
2435
+ })
2436
+ }) {}
2437
+ exports.AnthropicMessagesRequest = AnthropicMessagesRequest;
2438
+ class AnthropicMessagesResponseType extends /*#__PURE__*/S.Literal("message") {}
2439
+ exports.AnthropicMessagesResponseType = AnthropicMessagesResponseType;
2440
+ class AnthropicMessagesResponseRole extends /*#__PURE__*/S.Literal("assistant") {}
2441
+ exports.AnthropicMessagesResponseRole = AnthropicMessagesResponseRole;
2442
+ class AnthropicMessagesResponseStopReason extends /*#__PURE__*/S.Literal("end_turn", "max_tokens", "stop_sequence", "tool_use", "pause_turn", "refusal", "model_context_window_exceeded") {}
2443
+ exports.AnthropicMessagesResponseStopReason = AnthropicMessagesResponseStopReason;
2444
+ class AnthropicMessagesResponseUsageServiceTier extends /*#__PURE__*/S.Literal("standard", "priority", "batch") {}
2445
+ exports.AnthropicMessagesResponseUsageServiceTier = AnthropicMessagesResponseUsageServiceTier;
2446
+ class AnthropicMessagesResponse extends /*#__PURE__*/S.Class("AnthropicMessagesResponse")({
2447
+ "id": S.String,
2448
+ "type": AnthropicMessagesResponseType,
2449
+ "role": AnthropicMessagesResponseRole,
2450
+ "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2451
+ "type": /*#__PURE__*/S.Literal("text"),
2452
+ "text": S.String,
2453
+ "citations": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2454
+ "type": /*#__PURE__*/S.Literal("char_location"),
2455
+ "cited_text": S.String,
2456
+ "document_index": S.Number,
2457
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2458
+ "start_char_index": S.Number,
2459
+ "end_char_index": S.Number,
2460
+ "file_id": /*#__PURE__*/S.NullOr(S.String)
2461
+ }), /*#__PURE__*/S.Struct({
2462
+ "type": /*#__PURE__*/S.Literal("page_location"),
2463
+ "cited_text": S.String,
2464
+ "document_index": S.Number,
2465
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2466
+ "start_page_number": S.Number,
2467
+ "end_page_number": S.Number,
2468
+ "file_id": /*#__PURE__*/S.NullOr(S.String)
2469
+ }), /*#__PURE__*/S.Struct({
2470
+ "type": /*#__PURE__*/S.Literal("content_block_location"),
2471
+ "cited_text": S.String,
2472
+ "document_index": S.Number,
2473
+ "document_title": /*#__PURE__*/S.NullOr(S.String),
2474
+ "start_block_index": S.Number,
2475
+ "end_block_index": S.Number,
2476
+ "file_id": /*#__PURE__*/S.NullOr(S.String)
2477
+ }), /*#__PURE__*/S.Struct({
2478
+ "type": /*#__PURE__*/S.Literal("web_search_result_location"),
2479
+ "cited_text": S.String,
2480
+ "encrypted_index": S.String,
2481
+ "title": /*#__PURE__*/S.NullOr(S.String),
2482
+ "url": S.String
2483
+ }), /*#__PURE__*/S.Struct({
2484
+ "type": /*#__PURE__*/S.Literal("search_result_location"),
2485
+ "cited_text": S.String,
2486
+ "search_result_index": S.Number,
2487
+ "source": S.String,
2488
+ "title": /*#__PURE__*/S.NullOr(S.String),
2489
+ "start_block_index": S.Number,
2490
+ "end_block_index": S.Number
2491
+ }))))
2492
+ }), /*#__PURE__*/S.Struct({
2493
+ "type": /*#__PURE__*/S.Literal("tool_use"),
2494
+ "id": S.String,
2495
+ "name": S.String
2496
+ }), /*#__PURE__*/S.Struct({
2497
+ "type": /*#__PURE__*/S.Literal("thinking"),
2498
+ "thinking": S.String,
2499
+ "signature": S.String
2500
+ }), /*#__PURE__*/S.Struct({
2501
+ "type": /*#__PURE__*/S.Literal("redacted_thinking"),
2502
+ "data": S.String
2503
+ }), /*#__PURE__*/S.Struct({
2504
+ "type": /*#__PURE__*/S.Literal("server_tool_use"),
2505
+ "id": S.String,
2506
+ "name": /*#__PURE__*/S.Literal("web_search")
2507
+ }), /*#__PURE__*/S.Struct({
2508
+ "type": /*#__PURE__*/S.Literal("web_search_tool_result"),
2509
+ "tool_use_id": S.String,
2510
+ "content": /*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2511
+ "type": /*#__PURE__*/S.Literal("web_search_result"),
2512
+ "encrypted_content": S.String,
2513
+ "page_age": /*#__PURE__*/S.NullOr(S.String),
2514
+ "title": S.String,
2515
+ "url": S.String
2516
+ })), /*#__PURE__*/S.Struct({
2517
+ "type": /*#__PURE__*/S.Literal("web_search_tool_result_error"),
2518
+ "error_code": /*#__PURE__*/S.Literal("invalid_tool_input", "unavailable", "max_uses_exceeded", "too_many_requests", "query_too_long")
2519
+ }))
2520
+ }))),
2521
+ "model": S.String,
2522
+ "stop_reason": /*#__PURE__*/S.NullOr(AnthropicMessagesResponseStopReason),
2523
+ "stop_sequence": /*#__PURE__*/S.NullOr(S.String),
2524
+ "usage": /*#__PURE__*/S.Struct({
2525
+ "input_tokens": S.Number,
2526
+ "output_tokens": S.Number,
2527
+ "cache_creation_input_tokens": /*#__PURE__*/S.NullOr(S.Number),
2528
+ "cache_read_input_tokens": /*#__PURE__*/S.NullOr(S.Number),
2529
+ "cache_creation": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Struct({
2530
+ "ephemeral_5m_input_tokens": S.Number,
2531
+ "ephemeral_1h_input_tokens": S.Number
2532
+ })),
2533
+ "server_tool_use": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Struct({
2534
+ "web_search_requests": S.Number
2535
+ })),
2536
+ "service_tier": /*#__PURE__*/S.NullOr(AnthropicMessagesResponseUsageServiceTier)
2537
+ })
2538
+ }) {}
2539
+ exports.AnthropicMessagesResponse = AnthropicMessagesResponse;
2540
+ class CreateMessages400Type extends /*#__PURE__*/S.Literal("error") {}
2541
+ exports.CreateMessages400Type = CreateMessages400Type;
2542
+ class CreateMessages400 extends /*#__PURE__*/S.Struct({
2543
+ "type": CreateMessages400Type,
2544
+ "error": /*#__PURE__*/S.Struct({
2545
+ "type": S.String,
2546
+ "message": S.String
2547
+ })
2548
+ }) {}
2549
+ exports.CreateMessages400 = CreateMessages400;
2550
+ class CreateMessages401Type extends /*#__PURE__*/S.Literal("error") {}
2551
+ exports.CreateMessages401Type = CreateMessages401Type;
2552
+ class CreateMessages401 extends /*#__PURE__*/S.Struct({
2553
+ "type": CreateMessages401Type,
2554
+ "error": /*#__PURE__*/S.Struct({
2555
+ "type": S.String,
2556
+ "message": S.String
2557
+ })
2558
+ }) {}
2559
+ exports.CreateMessages401 = CreateMessages401;
2560
+ class CreateMessages403Type extends /*#__PURE__*/S.Literal("error") {}
2561
+ exports.CreateMessages403Type = CreateMessages403Type;
2562
+ class CreateMessages403 extends /*#__PURE__*/S.Struct({
2563
+ "type": CreateMessages403Type,
2564
+ "error": /*#__PURE__*/S.Struct({
2565
+ "type": S.String,
2566
+ "message": S.String
2567
+ })
2568
+ }) {}
2569
+ exports.CreateMessages403 = CreateMessages403;
2570
+ class CreateMessages404Type extends /*#__PURE__*/S.Literal("error") {}
2571
+ exports.CreateMessages404Type = CreateMessages404Type;
2572
+ class CreateMessages404 extends /*#__PURE__*/S.Struct({
2573
+ "type": CreateMessages404Type,
2574
+ "error": /*#__PURE__*/S.Struct({
2575
+ "type": S.String,
2576
+ "message": S.String
2577
+ })
2578
+ }) {}
2579
+ exports.CreateMessages404 = CreateMessages404;
2580
+ class CreateMessages429Type extends /*#__PURE__*/S.Literal("error") {}
2581
+ exports.CreateMessages429Type = CreateMessages429Type;
2582
+ class CreateMessages429 extends /*#__PURE__*/S.Struct({
2583
+ "type": CreateMessages429Type,
2584
+ "error": /*#__PURE__*/S.Struct({
2585
+ "type": S.String,
2586
+ "message": S.String
2587
+ })
2588
+ }) {}
2589
+ exports.CreateMessages429 = CreateMessages429;
2590
+ class CreateMessages500Type extends /*#__PURE__*/S.Literal("error") {}
2591
+ exports.CreateMessages500Type = CreateMessages500Type;
2592
+ class CreateMessages500 extends /*#__PURE__*/S.Struct({
2593
+ "type": CreateMessages500Type,
2594
+ "error": /*#__PURE__*/S.Struct({
2595
+ "type": S.String,
2596
+ "message": S.String
2597
+ })
2598
+ }) {}
2599
+ exports.CreateMessages500 = CreateMessages500;
2600
+ class CreateMessages503Type extends /*#__PURE__*/S.Literal("error") {}
2601
+ exports.CreateMessages503Type = CreateMessages503Type;
2602
+ class CreateMessages503 extends /*#__PURE__*/S.Struct({
2603
+ "type": CreateMessages503Type,
2604
+ "error": /*#__PURE__*/S.Struct({
2605
+ "type": S.String,
2606
+ "message": S.String
2607
+ })
2608
+ }) {}
2609
+ exports.CreateMessages503 = CreateMessages503;
2610
+ class CreateMessages529Type extends /*#__PURE__*/S.Literal("error") {}
2611
+ exports.CreateMessages529Type = CreateMessages529Type;
2612
+ class CreateMessages529 extends /*#__PURE__*/S.Struct({
2613
+ "type": CreateMessages529Type,
2614
+ "error": /*#__PURE__*/S.Struct({
2615
+ "type": S.String,
2616
+ "message": S.String
2617
+ })
2618
+ }) {}
2619
+ exports.CreateMessages529 = CreateMessages529;
2620
+ class GetUserActivityParams extends /*#__PURE__*/S.Struct({
2621
+ /**
2622
+ * Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
2623
+ */
2624
+ "date": /*#__PURE__*/S.optionalWith(S.String, {
2625
+ nullable: true
2626
+ })
2627
+ }) {}
2628
+ exports.GetUserActivityParams = GetUserActivityParams;
2629
+ class ActivityItem extends /*#__PURE__*/S.Class("ActivityItem")({
2630
+ /**
2631
+ * Date of the activity (YYYY-MM-DD format)
2632
+ */
2633
+ "date": S.String,
2634
+ /**
2635
+ * Model slug (e.g., "openai/gpt-4.1")
2636
+ */
2637
+ "model": S.String,
2638
+ /**
2639
+ * Model permaslug (e.g., "openai/gpt-4.1-2025-04-14")
2640
+ */
2641
+ "model_permaslug": S.String,
2642
+ /**
2643
+ * Unique identifier for the endpoint
2644
+ */
2645
+ "endpoint_id": S.String,
2646
+ /**
2647
+ * Name of the provider serving this endpoint
2648
+ */
2649
+ "provider_name": S.String,
2650
+ /**
2651
+ * Total cost in USD (OpenRouter credits spent)
2652
+ */
2653
+ "usage": S.Number,
2654
+ /**
2655
+ * BYOK inference cost in USD (external credits spent)
2656
+ */
2657
+ "byok_usage_inference": S.Number,
2658
+ /**
2659
+ * Number of requests made
2660
+ */
2661
+ "requests": S.Number,
2662
+ /**
2663
+ * Total prompt tokens used
2664
+ */
2665
+ "prompt_tokens": S.Number,
2666
+ /**
2667
+ * Total completion tokens generated
2668
+ */
2669
+ "completion_tokens": S.Number,
2670
+ /**
2671
+ * Total reasoning tokens used
2672
+ */
2673
+ "reasoning_tokens": S.Number
2674
+ }) {}
2675
+ exports.ActivityItem = ActivityItem;
2676
+ class GetUserActivity200 extends /*#__PURE__*/S.Struct({
2677
+ /**
2678
+ * List of activity items
2679
+ */
2680
+ "data": /*#__PURE__*/S.Array(ActivityItem)
2681
+ }) {}
2682
+ /**
2683
+ * Error data for ForbiddenResponse
2684
+ */
2685
+ exports.GetUserActivity200 = GetUserActivity200;
2686
+ class ForbiddenResponseErrorData extends /*#__PURE__*/S.Class("ForbiddenResponseErrorData")({
2687
+ "code": S.Int,
2688
+ "message": S.String,
2689
+ "metadata": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Record({
2690
+ key: S.String,
2691
+ value: S.Unknown
2692
+ }), {
2693
+ nullable: true
2694
+ })
2695
+ }) {}
2696
+ /**
2697
+ * Forbidden - Authentication successful but insufficient permissions
2698
+ */
2699
+ exports.ForbiddenResponseErrorData = ForbiddenResponseErrorData;
2700
+ class ForbiddenResponse extends /*#__PURE__*/S.Class("ForbiddenResponse")({
2701
+ "error": ForbiddenResponseErrorData,
2702
+ "user_id": /*#__PURE__*/S.optionalWith(S.String, {
2703
+ nullable: true
2704
+ })
2705
+ }) {}
2706
+ /**
2707
+ * Total credits purchased and used
2708
+ */
2709
+ exports.ForbiddenResponse = ForbiddenResponse;
2710
+ class GetCredits200 extends /*#__PURE__*/S.Struct({
2711
+ "data": /*#__PURE__*/S.Struct({
1656
2712
  /**
1657
- * 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.
2713
+ * Total credits purchased
1658
2714
  */
1659
- "order": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
1660
- nullable: true
1661
- }),
2715
+ "total_credits": S.Number,
1662
2716
  /**
1663
- * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
2717
+ * Total credits used
1664
2718
  */
1665
- "only": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2719
+ "total_usage": S.Number
2720
+ })
2721
+ }) {}
2722
+ exports.GetCredits200 = GetCredits200;
2723
+ class CreateChargeRequestChainId extends /*#__PURE__*/S.Literal(1, 137, 8453) {}
2724
+ /**
2725
+ * Create a Coinbase charge for crypto payment
2726
+ */
2727
+ exports.CreateChargeRequestChainId = CreateChargeRequestChainId;
2728
+ class CreateChargeRequest extends /*#__PURE__*/S.Class("CreateChargeRequest")({
2729
+ "amount": S.Number,
2730
+ "sender": S.String,
2731
+ "chain_id": CreateChargeRequestChainId
2732
+ }) {}
2733
+ exports.CreateChargeRequest = CreateChargeRequest;
2734
+ class CreateCoinbaseCharge200 extends /*#__PURE__*/S.Struct({
2735
+ "data": /*#__PURE__*/S.Struct({
2736
+ "id": S.String,
2737
+ "created_at": S.String,
2738
+ "expires_at": S.String,
2739
+ "web3_data": /*#__PURE__*/S.Struct({
2740
+ "transfer_intent": /*#__PURE__*/S.Struct({
2741
+ "call_data": /*#__PURE__*/S.Struct({
2742
+ "deadline": S.String,
2743
+ "fee_amount": S.String,
2744
+ "id": S.String,
2745
+ "operator": S.String,
2746
+ "prefix": S.String,
2747
+ "recipient": S.String,
2748
+ "recipient_amount": S.String,
2749
+ "recipient_currency": S.String,
2750
+ "refund_destination": S.String,
2751
+ "signature": S.String
2752
+ }),
2753
+ "metadata": /*#__PURE__*/S.Struct({
2754
+ "chain_id": S.Number,
2755
+ "contract_address": S.String,
2756
+ "sender": S.String
2757
+ })
2758
+ })
2759
+ })
2760
+ })
2761
+ }) {}
2762
+ exports.CreateCoinbaseCharge200 = CreateCoinbaseCharge200;
2763
+ class CreateEmbeddingsRequestEncodingFormat extends /*#__PURE__*/S.Literal("float", "base64") {}
2764
+ /**
2765
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
2766
+ */
2767
+ exports.CreateEmbeddingsRequestEncodingFormat = CreateEmbeddingsRequestEncodingFormat;
2768
+ class ProviderPreferencesSort extends /*#__PURE__*/S.Literal("price", "throughput", "latency") {}
2769
+ /**
2770
+ * Provider routing preferences for the request.
2771
+ */
2772
+ exports.ProviderPreferencesSort = ProviderPreferencesSort;
2773
+ class ProviderPreferences extends /*#__PURE__*/S.Class("ProviderPreferences")({
2774
+ /**
2775
+ * Whether to allow backup providers to serve requests
2776
+ * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
2777
+ * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
2778
+ */
2779
+ "allow_fallbacks": /*#__PURE__*/S.optionalWith(S.Boolean, {
2780
+ nullable: true
2781
+ }),
2782
+ /**
2783
+ * 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.
2784
+ */
2785
+ "require_parameters": /*#__PURE__*/S.optionalWith(S.Boolean, {
2786
+ nullable: true
2787
+ }),
2788
+ "data_collection": /*#__PURE__*/S.optionalWith(DataCollection, {
2789
+ nullable: true
2790
+ }),
2791
+ /**
2792
+ * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
2793
+ */
2794
+ "zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
2795
+ nullable: true
2796
+ }),
2797
+ /**
2798
+ * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
2799
+ */
2800
+ "enforce_distillable_text": /*#__PURE__*/S.optionalWith(S.Boolean, {
2801
+ nullable: true
2802
+ }),
2803
+ /**
2804
+ * 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.
2805
+ */
2806
+ "order": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2807
+ nullable: true
2808
+ }),
2809
+ /**
2810
+ * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
2811
+ */
2812
+ "only": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2813
+ nullable: true
2814
+ }),
2815
+ /**
2816
+ * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
2817
+ */
2818
+ "ignore": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2819
+ nullable: true
2820
+ }),
2821
+ /**
2822
+ * A list of quantization levels to filter the provider by.
2823
+ */
2824
+ "quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Quantization), {
2825
+ nullable: true
2826
+ }),
2827
+ "sort": /*#__PURE__*/S.optionalWith(ProviderPreferencesSort, {
2828
+ nullable: true
2829
+ }),
2830
+ /**
2831
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
2832
+ */
2833
+ "max_price": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
2834
+ "prompt": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1666
2835
  nullable: true
1667
2836
  }),
1668
- /**
1669
- * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
1670
- */
1671
- "ignore": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ProviderName, S.String)), {
2837
+ "completion": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1672
2838
  nullable: true
1673
2839
  }),
1674
- /**
1675
- * A list of quantization levels to filter the provider by.
1676
- */
1677
- "quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(Quantization), {
2840
+ "image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1678
2841
  nullable: true
1679
2842
  }),
1680
- "sort": /*#__PURE__*/S.optionalWith(ProviderSort, {
2843
+ "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1681
2844
  nullable: true
1682
2845
  }),
1683
- /**
1684
- * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
1685
- */
1686
- "max_price": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
1687
- "prompt": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1688
- nullable: true
1689
- }),
1690
- "completion": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1691
- nullable: true
1692
- }),
1693
- "image": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1694
- nullable: true
1695
- }),
1696
- "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1697
- nullable: true
1698
- }),
1699
- "request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1700
- nullable: true
1701
- })
1702
- }), {
2846
+ "request": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1703
2847
  nullable: true
1704
2848
  })
1705
2849
  }), {
1706
2850
  nullable: true
1707
2851
  }),
2852
+ "preferred_min_throughput": /*#__PURE__*/S.optionalWith(PreferredMinThroughput, {
2853
+ nullable: true
2854
+ }),
2855
+ "preferred_max_latency": /*#__PURE__*/S.optionalWith(PreferredMaxLatency, {
2856
+ nullable: true
2857
+ })
2858
+ }) {}
2859
+ exports.ProviderPreferences = ProviderPreferences;
2860
+ class CreateEmbeddingsRequest extends /*#__PURE__*/S.Class("CreateEmbeddingsRequest")({
2861
+ "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({
2862
+ "content": /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(/*#__PURE__*/S.Struct({
2863
+ "type": /*#__PURE__*/S.Literal("text"),
2864
+ "text": S.String
2865
+ }), /*#__PURE__*/S.Struct({
2866
+ "type": /*#__PURE__*/S.Literal("image_url"),
2867
+ "image_url": /*#__PURE__*/S.Struct({
2868
+ "url": S.String
2869
+ })
2870
+ })))
2871
+ }))),
2872
+ "model": S.String,
2873
+ "encoding_format": /*#__PURE__*/S.optionalWith(CreateEmbeddingsRequestEncodingFormat, {
2874
+ nullable: true
2875
+ }),
2876
+ "dimensions": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThan(0)), {
2877
+ nullable: true
2878
+ }),
2879
+ "user": /*#__PURE__*/S.optionalWith(S.String, {
2880
+ nullable: true
2881
+ }),
2882
+ "provider": /*#__PURE__*/S.optionalWith(ProviderPreferences, {
2883
+ nullable: true
2884
+ }),
1708
2885
  "input_type": /*#__PURE__*/S.optionalWith(S.String, {
1709
2886
  nullable: true
1710
2887
  })
@@ -1757,6 +2934,9 @@ class PublicPricing extends /*#__PURE__*/S.Class("PublicPricing")({
1757
2934
  "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1758
2935
  nullable: true
1759
2936
  }),
2937
+ "audio_output": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2938
+ nullable: true
2939
+ }),
1760
2940
  "input_audio_cache": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
1761
2941
  nullable: true
1762
2942
  }),
@@ -1789,7 +2969,7 @@ class ModelArchitectureInstructType extends /*#__PURE__*/S.Literal("none", "airo
1789
2969
  exports.ModelArchitectureInstructType = ModelArchitectureInstructType;
1790
2970
  class InputModality extends /*#__PURE__*/S.Literal("text", "image", "file", "audio", "video") {}
1791
2971
  exports.InputModality = InputModality;
1792
- class OutputModality extends /*#__PURE__*/S.Literal("text", "image", "embeddings") {}
2972
+ class OutputModality extends /*#__PURE__*/S.Literal("text", "image", "embeddings", "audio") {}
1793
2973
  /**
1794
2974
  * Model architecture information
1795
2975
  */
@@ -1854,7 +3034,7 @@ class PerRequestLimits extends /*#__PURE__*/S.Class("PerRequestLimits")({
1854
3034
  "completion_tokens": S.Number
1855
3035
  }) {}
1856
3036
  exports.PerRequestLimits = PerRequestLimits;
1857
- 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") {}
3037
+ 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") {}
1858
3038
  /**
1859
3039
  * Default parameters for this model
1860
3040
  */
@@ -1915,7 +3095,13 @@ class Model extends /*#__PURE__*/S.Class("Model")({
1915
3095
  * List of supported parameters for this model
1916
3096
  */
1917
3097
  "supported_parameters": /*#__PURE__*/S.Array(Parameter),
1918
- "default_parameters": /*#__PURE__*/S.NullOr(DefaultParameters)
3098
+ "default_parameters": /*#__PURE__*/S.NullOr(DefaultParameters),
3099
+ /**
3100
+ * The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration.
3101
+ */
3102
+ "expiration_date": /*#__PURE__*/S.optionalWith(S.String, {
3103
+ nullable: true
3104
+ })
1919
3105
  }) {}
1920
3106
  /**
1921
3107
  * List of available models
@@ -2074,7 +3260,11 @@ class GetGeneration200 extends /*#__PURE__*/S.Struct({
2074
3260
  /**
2075
3261
  * Type of API used for the generation
2076
3262
  */
2077
- "api_type": /*#__PURE__*/S.NullOr(GetGeneration200DataApiType)
3263
+ "api_type": /*#__PURE__*/S.NullOr(GetGeneration200DataApiType),
3264
+ /**
3265
+ * Router used for the request (e.g., openrouter/auto)
3266
+ */
3267
+ "router": /*#__PURE__*/S.NullOr(S.String)
2078
3268
  })
2079
3269
  }) {}
2080
3270
  /**
@@ -2092,9 +3282,17 @@ class ModelsCountResponse extends /*#__PURE__*/S.Class("ModelsCountResponse")({
2092
3282
  "count": S.Number
2093
3283
  })
2094
3284
  }) {}
3285
+ /**
3286
+ * Filter models by use case category
3287
+ */
2095
3288
  exports.ModelsCountResponse = ModelsCountResponse;
3289
+ class GetModelsParamsCategory extends /*#__PURE__*/S.Literal("programming", "roleplay", "marketing", "marketing/seo", "technology", "science", "translation", "legal", "finance", "health", "trivia", "academia") {}
3290
+ exports.GetModelsParamsCategory = GetModelsParamsCategory;
2096
3291
  class GetModelsParams extends /*#__PURE__*/S.Struct({
2097
- "category": /*#__PURE__*/S.optionalWith(S.String, {
3292
+ /**
3293
+ * Filter models by use case category
3294
+ */
3295
+ "category": /*#__PURE__*/S.optionalWith(GetModelsParamsCategory, {
2098
3296
  nullable: true
2099
3297
  }),
2100
3298
  "supported_parameters": /*#__PURE__*/S.optionalWith(S.String, {
@@ -2113,34 +3311,82 @@ exports.ListEndpointsResponseArchitectureEnumInstructType = ListEndpointsRespons
2113
3311
  class ListEndpointsResponseArchitecture extends /*#__PURE__*/S.Struct({
2114
3312
  "tokenizer": ModelGroup,
2115
3313
  /**
2116
- * Instruction format type
3314
+ * Instruction format type
3315
+ */
3316
+ "instruct_type": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Literal("none", "airoboros", "alpaca", "alpaca-modif", "chatml", "claude", "code-llama", "gemma", "llama2", "llama3", "mistral", "nemotron", "neural", "openchat", "phi3", "rwkv", "vicuna", "zephyr", "deepseek-r1", "deepseek-v3.1", "qwq", "qwen3")),
3317
+ /**
3318
+ * Primary modality of the model
3319
+ */
3320
+ "modality": /*#__PURE__*/S.NullOr(S.String),
3321
+ /**
3322
+ * Supported input modalities
3323
+ */
3324
+ "input_modalities": /*#__PURE__*/S.Array(InputModality),
3325
+ /**
3326
+ * Supported output modalities
3327
+ */
3328
+ "output_modalities": /*#__PURE__*/S.Array(OutputModality)
3329
+ }) {}
3330
+ exports.ListEndpointsResponseArchitecture = ListEndpointsResponseArchitecture;
3331
+ class PublicEndpointQuantizationEnum extends /*#__PURE__*/S.Literal("int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown") {}
3332
+ exports.PublicEndpointQuantizationEnum = PublicEndpointQuantizationEnum;
3333
+ class PublicEndpointQuantization extends PublicEndpointQuantizationEnum {}
3334
+ exports.PublicEndpointQuantization = PublicEndpointQuantization;
3335
+ class EndpointStatus extends /*#__PURE__*/S.Literal(0, -1, -2, -3, -5, -10) {}
3336
+ /**
3337
+ * Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
3338
+ */
3339
+ exports.EndpointStatus = EndpointStatus;
3340
+ class PercentileStats extends /*#__PURE__*/S.Class("PercentileStats")({
3341
+ /**
3342
+ * Median (50th percentile)
3343
+ */
3344
+ "p50": S.Number,
3345
+ /**
3346
+ * 75th percentile
3347
+ */
3348
+ "p75": S.Number,
3349
+ /**
3350
+ * 90th percentile
3351
+ */
3352
+ "p90": S.Number,
3353
+ /**
3354
+ * 99th percentile
3355
+ */
3356
+ "p99": S.Number
3357
+ }) {}
3358
+ /**
3359
+ * Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
3360
+ */
3361
+ exports.PercentileStats = PercentileStats;
3362
+ class PublicEndpointThroughputLast30M extends /*#__PURE__*/S.Struct({
3363
+ /**
3364
+ * Median (50th percentile)
2117
3365
  */
2118
- "instruct_type": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Literal("none", "airoboros", "alpaca", "alpaca-modif", "chatml", "claude", "code-llama", "gemma", "llama2", "llama3", "mistral", "nemotron", "neural", "openchat", "phi3", "rwkv", "vicuna", "zephyr", "deepseek-r1", "deepseek-v3.1", "qwq", "qwen3")),
3366
+ "p50": S.Number,
2119
3367
  /**
2120
- * Primary modality of the model
3368
+ * 75th percentile
2121
3369
  */
2122
- "modality": /*#__PURE__*/S.NullOr(S.String),
3370
+ "p75": S.Number,
2123
3371
  /**
2124
- * Supported input modalities
3372
+ * 90th percentile
2125
3373
  */
2126
- "input_modalities": /*#__PURE__*/S.Array(InputModality),
3374
+ "p90": S.Number,
2127
3375
  /**
2128
- * Supported output modalities
3376
+ * 99th percentile
2129
3377
  */
2130
- "output_modalities": /*#__PURE__*/S.Array(OutputModality)
3378
+ "p99": S.Number
2131
3379
  }) {}
2132
- exports.ListEndpointsResponseArchitecture = ListEndpointsResponseArchitecture;
2133
- class PublicEndpointQuantizationEnum extends /*#__PURE__*/S.Literal("int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown") {}
2134
- exports.PublicEndpointQuantizationEnum = PublicEndpointQuantizationEnum;
2135
- class PublicEndpointQuantization extends PublicEndpointQuantizationEnum {}
2136
- exports.PublicEndpointQuantization = PublicEndpointQuantization;
2137
- class EndpointStatus extends /*#__PURE__*/S.Literal(0, -1, -2, -3, -5, -10) {}
2138
3380
  /**
2139
3381
  * Information about a specific model endpoint
2140
3382
  */
2141
- exports.EndpointStatus = EndpointStatus;
3383
+ exports.PublicEndpointThroughputLast30M = PublicEndpointThroughputLast30M;
2142
3384
  class PublicEndpoint extends /*#__PURE__*/S.Class("PublicEndpoint")({
2143
3385
  "name": S.String,
3386
+ /**
3387
+ * The unique identifier for the model (permaslug)
3388
+ */
3389
+ "model_id": S.String,
2144
3390
  "model_name": S.String,
2145
3391
  "context_length": S.Number,
2146
3392
  "pricing": /*#__PURE__*/S.Struct({
@@ -2161,6 +3407,9 @@ class PublicEndpoint extends /*#__PURE__*/S.Class("PublicEndpoint")({
2161
3407
  "audio": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2162
3408
  nullable: true
2163
3409
  }),
3410
+ "audio_output": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
3411
+ nullable: true
3412
+ }),
2164
3413
  "input_audio_cache": /*#__PURE__*/S.optionalWith(BigNumberUnion, {
2165
3414
  nullable: true
2166
3415
  }),
@@ -2190,7 +3439,9 @@ class PublicEndpoint extends /*#__PURE__*/S.Class("PublicEndpoint")({
2190
3439
  nullable: true
2191
3440
  }),
2192
3441
  "uptime_last_30m": /*#__PURE__*/S.NullOr(S.Number),
2193
- "supports_implicit_caching": S.Boolean
3442
+ "supports_implicit_caching": S.Boolean,
3443
+ "latency_last_30m": /*#__PURE__*/S.NullOr(PercentileStats),
3444
+ "throughput_last_30m": PublicEndpointThroughputLast30M
2194
3445
  }) {}
2195
3446
  /**
2196
3447
  * List of available endpoints for a model
@@ -2228,30 +3479,6 @@ class ListEndpointsZdr200 extends /*#__PURE__*/S.Struct({
2228
3479
  "data": /*#__PURE__*/S.Array(PublicEndpoint)
2229
3480
  }) {}
2230
3481
  exports.ListEndpointsZdr200 = ListEndpointsZdr200;
2231
- 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") {}
2232
- exports.GetParametersParamsProvider = GetParametersParamsProvider;
2233
- class GetParametersParams extends /*#__PURE__*/S.Struct({
2234
- "provider": /*#__PURE__*/S.optionalWith(GetParametersParamsProvider, {
2235
- nullable: true
2236
- })
2237
- }) {}
2238
- exports.GetParametersParams = GetParametersParams;
2239
- class GetParameters200 extends /*#__PURE__*/S.Struct({
2240
- /**
2241
- * Parameter analytics data
2242
- */
2243
- "data": /*#__PURE__*/S.Struct({
2244
- /**
2245
- * Model identifier
2246
- */
2247
- "model": S.String,
2248
- /**
2249
- * List of parameters supported by this model
2250
- */
2251
- "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"))
2252
- })
2253
- }) {}
2254
- exports.GetParameters200 = GetParameters200;
2255
3482
  class ListProviders200 extends /*#__PURE__*/S.Struct({
2256
3483
  "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2257
3484
  /**
@@ -2278,29 +3505,241 @@ class ListProviders200 extends /*#__PURE__*/S.Struct({
2278
3505
  "status_page_url": /*#__PURE__*/S.optionalWith(S.String, {
2279
3506
  nullable: true
2280
3507
  })
2281
- }))
2282
- }) {}
2283
- exports.ListProviders200 = ListProviders200;
2284
- class ListParams extends /*#__PURE__*/S.Struct({
2285
- /**
2286
- * Whether to include disabled API keys in the response
2287
- */
2288
- "include_disabled": /*#__PURE__*/S.optionalWith(S.String, {
2289
- nullable: true
3508
+ }))
3509
+ }) {}
3510
+ exports.ListProviders200 = ListProviders200;
3511
+ class ListParams extends /*#__PURE__*/S.Struct({
3512
+ /**
3513
+ * Whether to include disabled API keys in the response
3514
+ */
3515
+ "include_disabled": /*#__PURE__*/S.optionalWith(S.String, {
3516
+ nullable: true
3517
+ }),
3518
+ /**
3519
+ * Number of API keys to skip for pagination
3520
+ */
3521
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
3522
+ nullable: true
3523
+ })
3524
+ }) {}
3525
+ exports.ListParams = ListParams;
3526
+ class List200 extends /*#__PURE__*/S.Struct({
3527
+ /**
3528
+ * List of API keys
3529
+ */
3530
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
3531
+ /**
3532
+ * Unique hash identifier for the API key
3533
+ */
3534
+ "hash": S.String,
3535
+ /**
3536
+ * Name of the API key
3537
+ */
3538
+ "name": S.String,
3539
+ /**
3540
+ * Human-readable label for the API key
3541
+ */
3542
+ "label": S.String,
3543
+ /**
3544
+ * Whether the API key is disabled
3545
+ */
3546
+ "disabled": S.Boolean,
3547
+ /**
3548
+ * Spending limit for the API key in USD
3549
+ */
3550
+ "limit": /*#__PURE__*/S.NullOr(S.Number),
3551
+ /**
3552
+ * Remaining spending limit in USD
3553
+ */
3554
+ "limit_remaining": /*#__PURE__*/S.NullOr(S.Number),
3555
+ /**
3556
+ * Type of limit reset for the API key
3557
+ */
3558
+ "limit_reset": /*#__PURE__*/S.NullOr(S.String),
3559
+ /**
3560
+ * Whether to include external BYOK usage in the credit limit
3561
+ */
3562
+ "include_byok_in_limit": S.Boolean,
3563
+ /**
3564
+ * Total OpenRouter credit usage (in USD) for the API key
3565
+ */
3566
+ "usage": S.Number,
3567
+ /**
3568
+ * OpenRouter credit usage (in USD) for the current UTC day
3569
+ */
3570
+ "usage_daily": S.Number,
3571
+ /**
3572
+ * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
3573
+ */
3574
+ "usage_weekly": S.Number,
3575
+ /**
3576
+ * OpenRouter credit usage (in USD) for the current UTC month
3577
+ */
3578
+ "usage_monthly": S.Number,
3579
+ /**
3580
+ * Total external BYOK usage (in USD) for the API key
3581
+ */
3582
+ "byok_usage": S.Number,
3583
+ /**
3584
+ * External BYOK usage (in USD) for the current UTC day
3585
+ */
3586
+ "byok_usage_daily": S.Number,
3587
+ /**
3588
+ * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
3589
+ */
3590
+ "byok_usage_weekly": S.Number,
3591
+ /**
3592
+ * External BYOK usage (in USD) for current UTC month
3593
+ */
3594
+ "byok_usage_monthly": S.Number,
3595
+ /**
3596
+ * ISO 8601 timestamp of when the API key was created
3597
+ */
3598
+ "created_at": S.String,
3599
+ /**
3600
+ * ISO 8601 timestamp of when the API key was last updated
3601
+ */
3602
+ "updated_at": /*#__PURE__*/S.NullOr(S.String),
3603
+ /**
3604
+ * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
3605
+ */
3606
+ "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
3607
+ nullable: true
3608
+ })
3609
+ }))
3610
+ }) {}
3611
+ /**
3612
+ * Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
3613
+ */
3614
+ exports.List200 = List200;
3615
+ class CreateKeysRequestLimitReset extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
3616
+ exports.CreateKeysRequestLimitReset = CreateKeysRequestLimitReset;
3617
+ class CreateKeysRequest extends /*#__PURE__*/S.Class("CreateKeysRequest")({
3618
+ /**
3619
+ * Name for the new API key
3620
+ */
3621
+ "name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
3622
+ /**
3623
+ * Optional spending limit for the API key in USD
3624
+ */
3625
+ "limit": /*#__PURE__*/S.optionalWith(S.Number, {
3626
+ nullable: true
3627
+ }),
3628
+ /**
3629
+ * Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
3630
+ */
3631
+ "limit_reset": /*#__PURE__*/S.optionalWith(CreateKeysRequestLimitReset, {
3632
+ nullable: true
3633
+ }),
3634
+ /**
3635
+ * Whether to include BYOK usage in the limit
3636
+ */
3637
+ "include_byok_in_limit": /*#__PURE__*/S.optionalWith(S.Boolean, {
3638
+ nullable: true
3639
+ }),
3640
+ /**
3641
+ * Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
3642
+ */
3643
+ "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
3644
+ nullable: true
3645
+ })
3646
+ }) {}
3647
+ exports.CreateKeysRequest = CreateKeysRequest;
3648
+ class CreateKeys201 extends /*#__PURE__*/S.Struct({
3649
+ /**
3650
+ * The created API key information
3651
+ */
3652
+ "data": /*#__PURE__*/S.Struct({
3653
+ /**
3654
+ * Unique hash identifier for the API key
3655
+ */
3656
+ "hash": S.String,
3657
+ /**
3658
+ * Name of the API key
3659
+ */
3660
+ "name": S.String,
3661
+ /**
3662
+ * Human-readable label for the API key
3663
+ */
3664
+ "label": S.String,
3665
+ /**
3666
+ * Whether the API key is disabled
3667
+ */
3668
+ "disabled": S.Boolean,
3669
+ /**
3670
+ * Spending limit for the API key in USD
3671
+ */
3672
+ "limit": /*#__PURE__*/S.NullOr(S.Number),
3673
+ /**
3674
+ * Remaining spending limit in USD
3675
+ */
3676
+ "limit_remaining": /*#__PURE__*/S.NullOr(S.Number),
3677
+ /**
3678
+ * Type of limit reset for the API key
3679
+ */
3680
+ "limit_reset": /*#__PURE__*/S.NullOr(S.String),
3681
+ /**
3682
+ * Whether to include external BYOK usage in the credit limit
3683
+ */
3684
+ "include_byok_in_limit": S.Boolean,
3685
+ /**
3686
+ * Total OpenRouter credit usage (in USD) for the API key
3687
+ */
3688
+ "usage": S.Number,
3689
+ /**
3690
+ * OpenRouter credit usage (in USD) for the current UTC day
3691
+ */
3692
+ "usage_daily": S.Number,
3693
+ /**
3694
+ * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
3695
+ */
3696
+ "usage_weekly": S.Number,
3697
+ /**
3698
+ * OpenRouter credit usage (in USD) for the current UTC month
3699
+ */
3700
+ "usage_monthly": S.Number,
3701
+ /**
3702
+ * Total external BYOK usage (in USD) for the API key
3703
+ */
3704
+ "byok_usage": S.Number,
3705
+ /**
3706
+ * External BYOK usage (in USD) for the current UTC day
3707
+ */
3708
+ "byok_usage_daily": S.Number,
3709
+ /**
3710
+ * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
3711
+ */
3712
+ "byok_usage_weekly": S.Number,
3713
+ /**
3714
+ * External BYOK usage (in USD) for current UTC month
3715
+ */
3716
+ "byok_usage_monthly": S.Number,
3717
+ /**
3718
+ * ISO 8601 timestamp of when the API key was created
3719
+ */
3720
+ "created_at": S.String,
3721
+ /**
3722
+ * ISO 8601 timestamp of when the API key was last updated
3723
+ */
3724
+ "updated_at": /*#__PURE__*/S.NullOr(S.String),
3725
+ /**
3726
+ * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
3727
+ */
3728
+ "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
3729
+ nullable: true
3730
+ })
2290
3731
  }),
2291
3732
  /**
2292
- * Number of API keys to skip for pagination
3733
+ * The actual API key string (only shown once)
2293
3734
  */
2294
- "offset": /*#__PURE__*/S.optionalWith(S.String, {
2295
- nullable: true
2296
- })
3735
+ "key": S.String
2297
3736
  }) {}
2298
- exports.ListParams = ListParams;
2299
- class List200 extends /*#__PURE__*/S.Struct({
3737
+ exports.CreateKeys201 = CreateKeys201;
3738
+ class GetKey200 extends /*#__PURE__*/S.Struct({
2300
3739
  /**
2301
- * List of API keys
3740
+ * The API key information
2302
3741
  */
2303
- "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
3742
+ "data": /*#__PURE__*/S.Struct({
2304
3743
  /**
2305
3744
  * Unique hash identifier for the API key
2306
3745
  */
@@ -2379,48 +3818,57 @@ class List200 extends /*#__PURE__*/S.Struct({
2379
3818
  "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
2380
3819
  nullable: true
2381
3820
  })
2382
- }))
3821
+ })
3822
+ }) {}
3823
+ exports.GetKey200 = GetKey200;
3824
+ class DeleteKeys200 extends /*#__PURE__*/S.Struct({
3825
+ /**
3826
+ * Confirmation that the API key was deleted
3827
+ */
3828
+ "deleted": /*#__PURE__*/S.Literal(true)
2383
3829
  }) {}
2384
3830
  /**
2385
- * Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
3831
+ * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
2386
3832
  */
2387
- exports.List200 = List200;
2388
- class CreateKeysRequestLimitReset extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
2389
- exports.CreateKeysRequestLimitReset = CreateKeysRequestLimitReset;
2390
- class CreateKeysRequest extends /*#__PURE__*/S.Class("CreateKeysRequest")({
3833
+ exports.DeleteKeys200 = DeleteKeys200;
3834
+ class UpdateKeysRequestLimitReset extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
3835
+ exports.UpdateKeysRequestLimitReset = UpdateKeysRequestLimitReset;
3836
+ class UpdateKeysRequest extends /*#__PURE__*/S.Class("UpdateKeysRequest")({
2391
3837
  /**
2392
- * Name for the new API key
3838
+ * New name for the API key
2393
3839
  */
2394
- "name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
3840
+ "name": /*#__PURE__*/S.optionalWith(S.String, {
3841
+ nullable: true
3842
+ }),
2395
3843
  /**
2396
- * Optional spending limit for the API key in USD
3844
+ * Whether to disable the API key
2397
3845
  */
2398
- "limit": /*#__PURE__*/S.optionalWith(S.Number, {
3846
+ "disabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2399
3847
  nullable: true
2400
3848
  }),
2401
3849
  /**
2402
- * Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
3850
+ * New spending limit for the API key in USD
2403
3851
  */
2404
- "limit_reset": /*#__PURE__*/S.optionalWith(CreateKeysRequestLimitReset, {
3852
+ "limit": /*#__PURE__*/S.optionalWith(S.Number, {
2405
3853
  nullable: true
2406
3854
  }),
2407
3855
  /**
2408
- * Whether to include BYOK usage in the limit
3856
+ * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
2409
3857
  */
2410
- "include_byok_in_limit": /*#__PURE__*/S.optionalWith(S.Boolean, {
3858
+ "limit_reset": /*#__PURE__*/S.optionalWith(UpdateKeysRequestLimitReset, {
2411
3859
  nullable: true
2412
3860
  }),
2413
3861
  /**
2414
- * Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
3862
+ * Whether to include BYOK usage in the limit
2415
3863
  */
2416
- "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
3864
+ "include_byok_in_limit": /*#__PURE__*/S.optionalWith(S.Boolean, {
2417
3865
  nullable: true
2418
3866
  })
2419
3867
  }) {}
2420
- exports.CreateKeysRequest = CreateKeysRequest;
2421
- class CreateKeys201 extends /*#__PURE__*/S.Struct({
3868
+ exports.UpdateKeysRequest = UpdateKeysRequest;
3869
+ class UpdateKeys200 extends /*#__PURE__*/S.Struct({
2422
3870
  /**
2423
- * The created API key information
3871
+ * The updated API key information
2424
3872
  */
2425
3873
  "data": /*#__PURE__*/S.Struct({
2426
3874
  /**
@@ -2501,230 +3949,664 @@ class CreateKeys201 extends /*#__PURE__*/S.Struct({
2501
3949
  "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
2502
3950
  nullable: true
2503
3951
  })
3952
+ })
3953
+ }) {}
3954
+ exports.UpdateKeys200 = UpdateKeys200;
3955
+ class ListGuardrailsParams extends /*#__PURE__*/S.Struct({
3956
+ /**
3957
+ * Number of records to skip for pagination
3958
+ */
3959
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
3960
+ nullable: true
3961
+ }),
3962
+ /**
3963
+ * Maximum number of records to return (max 100)
3964
+ */
3965
+ "limit": /*#__PURE__*/S.optionalWith(S.String, {
3966
+ nullable: true
3967
+ })
3968
+ }) {}
3969
+ exports.ListGuardrailsParams = ListGuardrailsParams;
3970
+ class ListGuardrails200 extends /*#__PURE__*/S.Struct({
3971
+ /**
3972
+ * List of guardrails
3973
+ */
3974
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
3975
+ /**
3976
+ * Unique identifier for the guardrail
3977
+ */
3978
+ "id": S.String,
3979
+ /**
3980
+ * Name of the guardrail
3981
+ */
3982
+ "name": S.String,
3983
+ /**
3984
+ * Description of the guardrail
3985
+ */
3986
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
3987
+ nullable: true
3988
+ }),
3989
+ /**
3990
+ * Spending limit in USD
3991
+ */
3992
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
3993
+ nullable: true
3994
+ }),
3995
+ /**
3996
+ * Interval at which the limit resets (daily, weekly, monthly)
3997
+ */
3998
+ "reset_interval": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("daily", "weekly", "monthly"), {
3999
+ nullable: true
4000
+ }),
4001
+ /**
4002
+ * List of allowed provider IDs
4003
+ */
4004
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4005
+ nullable: true
4006
+ }),
4007
+ /**
4008
+ * Array of model canonical_slugs (immutable identifiers)
4009
+ */
4010
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4011
+ nullable: true
4012
+ }),
4013
+ /**
4014
+ * Whether to enforce zero data retention
4015
+ */
4016
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4017
+ nullable: true
4018
+ }),
4019
+ /**
4020
+ * ISO 8601 timestamp of when the guardrail was created
4021
+ */
4022
+ "created_at": S.String,
4023
+ /**
4024
+ * ISO 8601 timestamp of when the guardrail was last updated
4025
+ */
4026
+ "updated_at": /*#__PURE__*/S.optionalWith(S.String, {
4027
+ nullable: true
4028
+ })
4029
+ })),
4030
+ /**
4031
+ * Total number of guardrails
4032
+ */
4033
+ "total_count": S.Number
4034
+ }) {}
4035
+ /**
4036
+ * Interval at which the limit resets (daily, weekly, monthly)
4037
+ */
4038
+ exports.ListGuardrails200 = ListGuardrails200;
4039
+ class CreateGuardrailRequestResetInterval extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
4040
+ exports.CreateGuardrailRequestResetInterval = CreateGuardrailRequestResetInterval;
4041
+ class CreateGuardrailRequest extends /*#__PURE__*/S.Class("CreateGuardrailRequest")({
4042
+ /**
4043
+ * Name for the new guardrail
4044
+ */
4045
+ "name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(200)),
4046
+ /**
4047
+ * Description of the guardrail
4048
+ */
4049
+ "description": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(1000)), {
4050
+ nullable: true
4051
+ }),
4052
+ /**
4053
+ * Spending limit in USD
4054
+ */
4055
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
4056
+ nullable: true
4057
+ }),
4058
+ /**
4059
+ * Interval at which the limit resets (daily, weekly, monthly)
4060
+ */
4061
+ "reset_interval": /*#__PURE__*/S.optionalWith(CreateGuardrailRequestResetInterval, {
4062
+ nullable: true
4063
+ }),
4064
+ /**
4065
+ * List of allowed provider IDs
4066
+ */
4067
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NonEmptyArray(S.String).pipe(/*#__PURE__*/S.minItems(1)), {
4068
+ nullable: true
4069
+ }),
4070
+ /**
4071
+ * Array of model identifiers (slug or canonical_slug accepted)
4072
+ */
4073
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NonEmptyArray(S.String).pipe(/*#__PURE__*/S.minItems(1)), {
4074
+ nullable: true
4075
+ }),
4076
+ /**
4077
+ * Whether to enforce zero data retention
4078
+ */
4079
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4080
+ nullable: true
4081
+ })
4082
+ }) {}
4083
+ /**
4084
+ * Interval at which the limit resets (daily, weekly, monthly)
4085
+ */
4086
+ exports.CreateGuardrailRequest = CreateGuardrailRequest;
4087
+ class CreateGuardrail201DataResetInterval extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
4088
+ exports.CreateGuardrail201DataResetInterval = CreateGuardrail201DataResetInterval;
4089
+ class CreateGuardrail201 extends /*#__PURE__*/S.Struct({
4090
+ /**
4091
+ * The created guardrail
4092
+ */
4093
+ "data": /*#__PURE__*/S.Struct({
4094
+ /**
4095
+ * Unique identifier for the guardrail
4096
+ */
4097
+ "id": S.String,
4098
+ /**
4099
+ * Name of the guardrail
4100
+ */
4101
+ "name": S.String,
4102
+ /**
4103
+ * Description of the guardrail
4104
+ */
4105
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
4106
+ nullable: true
4107
+ }),
4108
+ /**
4109
+ * Spending limit in USD
4110
+ */
4111
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
4112
+ nullable: true
4113
+ }),
4114
+ /**
4115
+ * Interval at which the limit resets (daily, weekly, monthly)
4116
+ */
4117
+ "reset_interval": /*#__PURE__*/S.optionalWith(CreateGuardrail201DataResetInterval, {
4118
+ nullable: true
4119
+ }),
4120
+ /**
4121
+ * List of allowed provider IDs
4122
+ */
4123
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4124
+ nullable: true
4125
+ }),
4126
+ /**
4127
+ * Array of model canonical_slugs (immutable identifiers)
4128
+ */
4129
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4130
+ nullable: true
4131
+ }),
4132
+ /**
4133
+ * Whether to enforce zero data retention
4134
+ */
4135
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4136
+ nullable: true
4137
+ }),
4138
+ /**
4139
+ * ISO 8601 timestamp of when the guardrail was created
4140
+ */
4141
+ "created_at": S.String,
4142
+ /**
4143
+ * ISO 8601 timestamp of when the guardrail was last updated
4144
+ */
4145
+ "updated_at": /*#__PURE__*/S.optionalWith(S.String, {
4146
+ nullable: true
4147
+ })
4148
+ })
4149
+ }) {}
4150
+ /**
4151
+ * Interval at which the limit resets (daily, weekly, monthly)
4152
+ */
4153
+ exports.CreateGuardrail201 = CreateGuardrail201;
4154
+ class GetGuardrail200DataResetInterval extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
4155
+ exports.GetGuardrail200DataResetInterval = GetGuardrail200DataResetInterval;
4156
+ class GetGuardrail200 extends /*#__PURE__*/S.Struct({
4157
+ /**
4158
+ * The guardrail
4159
+ */
4160
+ "data": /*#__PURE__*/S.Struct({
4161
+ /**
4162
+ * Unique identifier for the guardrail
4163
+ */
4164
+ "id": S.String,
4165
+ /**
4166
+ * Name of the guardrail
4167
+ */
4168
+ "name": S.String,
4169
+ /**
4170
+ * Description of the guardrail
4171
+ */
4172
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
4173
+ nullable: true
4174
+ }),
4175
+ /**
4176
+ * Spending limit in USD
4177
+ */
4178
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
4179
+ nullable: true
4180
+ }),
4181
+ /**
4182
+ * Interval at which the limit resets (daily, weekly, monthly)
4183
+ */
4184
+ "reset_interval": /*#__PURE__*/S.optionalWith(GetGuardrail200DataResetInterval, {
4185
+ nullable: true
4186
+ }),
4187
+ /**
4188
+ * List of allowed provider IDs
4189
+ */
4190
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4191
+ nullable: true
4192
+ }),
4193
+ /**
4194
+ * Array of model canonical_slugs (immutable identifiers)
4195
+ */
4196
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4197
+ nullable: true
4198
+ }),
4199
+ /**
4200
+ * Whether to enforce zero data retention
4201
+ */
4202
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4203
+ nullable: true
4204
+ }),
4205
+ /**
4206
+ * ISO 8601 timestamp of when the guardrail was created
4207
+ */
4208
+ "created_at": S.String,
4209
+ /**
4210
+ * ISO 8601 timestamp of when the guardrail was last updated
4211
+ */
4212
+ "updated_at": /*#__PURE__*/S.optionalWith(S.String, {
4213
+ nullable: true
4214
+ })
4215
+ })
4216
+ }) {}
4217
+ exports.GetGuardrail200 = GetGuardrail200;
4218
+ class DeleteGuardrail200 extends /*#__PURE__*/S.Struct({
4219
+ /**
4220
+ * Confirmation that the guardrail was deleted
4221
+ */
4222
+ "deleted": /*#__PURE__*/S.Literal(true)
4223
+ }) {}
4224
+ /**
4225
+ * Interval at which the limit resets (daily, weekly, monthly)
4226
+ */
4227
+ exports.DeleteGuardrail200 = DeleteGuardrail200;
4228
+ class UpdateGuardrailRequestResetInterval extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
4229
+ exports.UpdateGuardrailRequestResetInterval = UpdateGuardrailRequestResetInterval;
4230
+ class UpdateGuardrailRequest extends /*#__PURE__*/S.Class("UpdateGuardrailRequest")({
4231
+ /**
4232
+ * New name for the guardrail
4233
+ */
4234
+ "name": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(200)), {
4235
+ nullable: true
2504
4236
  }),
2505
4237
  /**
2506
- * The actual API key string (only shown once)
4238
+ * New description for the guardrail
2507
4239
  */
2508
- "key": S.String
4240
+ "description": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(1000)), {
4241
+ nullable: true
4242
+ }),
4243
+ /**
4244
+ * New spending limit in USD
4245
+ */
4246
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
4247
+ nullable: true
4248
+ }),
4249
+ /**
4250
+ * Interval at which the limit resets (daily, weekly, monthly)
4251
+ */
4252
+ "reset_interval": /*#__PURE__*/S.optionalWith(UpdateGuardrailRequestResetInterval, {
4253
+ nullable: true
4254
+ }),
4255
+ /**
4256
+ * New list of allowed provider IDs
4257
+ */
4258
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NonEmptyArray(S.String).pipe(/*#__PURE__*/S.minItems(1)), {
4259
+ nullable: true
4260
+ }),
4261
+ /**
4262
+ * Array of model identifiers (slug or canonical_slug accepted)
4263
+ */
4264
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NonEmptyArray(S.String).pipe(/*#__PURE__*/S.minItems(1)), {
4265
+ nullable: true
4266
+ }),
4267
+ /**
4268
+ * Whether to enforce zero data retention
4269
+ */
4270
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4271
+ nullable: true
4272
+ })
2509
4273
  }) {}
2510
- exports.CreateKeys201 = CreateKeys201;
2511
- class GetKey200 extends /*#__PURE__*/S.Struct({
4274
+ /**
4275
+ * Interval at which the limit resets (daily, weekly, monthly)
4276
+ */
4277
+ exports.UpdateGuardrailRequest = UpdateGuardrailRequest;
4278
+ class UpdateGuardrail200DataResetInterval extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
4279
+ exports.UpdateGuardrail200DataResetInterval = UpdateGuardrail200DataResetInterval;
4280
+ class UpdateGuardrail200 extends /*#__PURE__*/S.Struct({
2512
4281
  /**
2513
- * The API key information
4282
+ * The updated guardrail
2514
4283
  */
2515
4284
  "data": /*#__PURE__*/S.Struct({
2516
4285
  /**
2517
- * Unique hash identifier for the API key
4286
+ * Unique identifier for the guardrail
2518
4287
  */
2519
- "hash": S.String,
4288
+ "id": S.String,
2520
4289
  /**
2521
- * Name of the API key
4290
+ * Name of the guardrail
2522
4291
  */
2523
4292
  "name": S.String,
2524
4293
  /**
2525
- * Human-readable label for the API key
2526
- */
2527
- "label": S.String,
2528
- /**
2529
- * Whether the API key is disabled
2530
- */
2531
- "disabled": S.Boolean,
2532
- /**
2533
- * Spending limit for the API key in USD
4294
+ * Description of the guardrail
2534
4295
  */
2535
- "limit": /*#__PURE__*/S.NullOr(S.Number),
4296
+ "description": /*#__PURE__*/S.optionalWith(S.String, {
4297
+ nullable: true
4298
+ }),
2536
4299
  /**
2537
- * Remaining spending limit in USD
4300
+ * Spending limit in USD
2538
4301
  */
2539
- "limit_remaining": /*#__PURE__*/S.NullOr(S.Number),
4302
+ "limit_usd": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThan(0)), {
4303
+ nullable: true
4304
+ }),
2540
4305
  /**
2541
- * Type of limit reset for the API key
4306
+ * Interval at which the limit resets (daily, weekly, monthly)
2542
4307
  */
2543
- "limit_reset": /*#__PURE__*/S.NullOr(S.String),
4308
+ "reset_interval": /*#__PURE__*/S.optionalWith(UpdateGuardrail200DataResetInterval, {
4309
+ nullable: true
4310
+ }),
2544
4311
  /**
2545
- * Whether to include external BYOK usage in the credit limit
4312
+ * List of allowed provider IDs
2546
4313
  */
2547
- "include_byok_in_limit": S.Boolean,
4314
+ "allowed_providers": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4315
+ nullable: true
4316
+ }),
2548
4317
  /**
2549
- * Total OpenRouter credit usage (in USD) for the API key
4318
+ * Array of model canonical_slugs (immutable identifiers)
2550
4319
  */
2551
- "usage": S.Number,
4320
+ "allowed_models": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
4321
+ nullable: true
4322
+ }),
2552
4323
  /**
2553
- * OpenRouter credit usage (in USD) for the current UTC day
4324
+ * Whether to enforce zero data retention
2554
4325
  */
2555
- "usage_daily": S.Number,
4326
+ "enforce_zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
4327
+ nullable: true
4328
+ }),
2556
4329
  /**
2557
- * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
4330
+ * ISO 8601 timestamp of when the guardrail was created
2558
4331
  */
2559
- "usage_weekly": S.Number,
4332
+ "created_at": S.String,
2560
4333
  /**
2561
- * OpenRouter credit usage (in USD) for the current UTC month
4334
+ * ISO 8601 timestamp of when the guardrail was last updated
2562
4335
  */
2563
- "usage_monthly": S.Number,
4336
+ "updated_at": /*#__PURE__*/S.optionalWith(S.String, {
4337
+ nullable: true
4338
+ })
4339
+ })
4340
+ }) {}
4341
+ exports.UpdateGuardrail200 = UpdateGuardrail200;
4342
+ class ListKeyAssignmentsParams extends /*#__PURE__*/S.Struct({
4343
+ /**
4344
+ * Number of records to skip for pagination
4345
+ */
4346
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
4347
+ nullable: true
4348
+ }),
4349
+ /**
4350
+ * Maximum number of records to return (max 100)
4351
+ */
4352
+ "limit": /*#__PURE__*/S.optionalWith(S.String, {
4353
+ nullable: true
4354
+ })
4355
+ }) {}
4356
+ exports.ListKeyAssignmentsParams = ListKeyAssignmentsParams;
4357
+ class ListKeyAssignments200 extends /*#__PURE__*/S.Struct({
4358
+ /**
4359
+ * List of key assignments
4360
+ */
4361
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2564
4362
  /**
2565
- * Total external BYOK usage (in USD) for the API key
4363
+ * Unique identifier for the assignment
2566
4364
  */
2567
- "byok_usage": S.Number,
4365
+ "id": S.String,
2568
4366
  /**
2569
- * External BYOK usage (in USD) for the current UTC day
4367
+ * Hash of the assigned API key
2570
4368
  */
2571
- "byok_usage_daily": S.Number,
4369
+ "key_hash": S.String,
2572
4370
  /**
2573
- * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
4371
+ * ID of the guardrail
2574
4372
  */
2575
- "byok_usage_weekly": S.Number,
4373
+ "guardrail_id": S.String,
2576
4374
  /**
2577
- * External BYOK usage (in USD) for current UTC month
4375
+ * Name of the API key
2578
4376
  */
2579
- "byok_usage_monthly": S.Number,
4377
+ "key_name": S.String,
2580
4378
  /**
2581
- * ISO 8601 timestamp of when the API key was created
4379
+ * Label of the API key
2582
4380
  */
2583
- "created_at": S.String,
4381
+ "key_label": S.String,
2584
4382
  /**
2585
- * ISO 8601 timestamp of when the API key was last updated
4383
+ * User ID of who made the assignment
2586
4384
  */
2587
- "updated_at": /*#__PURE__*/S.NullOr(S.String),
4385
+ "assigned_by": /*#__PURE__*/S.NullOr(S.String),
2588
4386
  /**
2589
- * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
4387
+ * ISO 8601 timestamp of when the assignment was created
2590
4388
  */
2591
- "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
2592
- nullable: true
2593
- })
2594
- })
2595
- }) {}
2596
- exports.GetKey200 = GetKey200;
2597
- class DeleteKeys200 extends /*#__PURE__*/S.Struct({
4389
+ "created_at": S.String
4390
+ })),
2598
4391
  /**
2599
- * Confirmation that the API key was deleted
4392
+ * Total number of key assignments for this guardrail
2600
4393
  */
2601
- "deleted": /*#__PURE__*/S.Literal(true)
4394
+ "total_count": S.Number
2602
4395
  }) {}
2603
- /**
2604
- * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
2605
- */
2606
- exports.DeleteKeys200 = DeleteKeys200;
2607
- class UpdateKeysRequestLimitReset extends /*#__PURE__*/S.Literal("daily", "weekly", "monthly") {}
2608
- exports.UpdateKeysRequestLimitReset = UpdateKeysRequestLimitReset;
2609
- class UpdateKeysRequest extends /*#__PURE__*/S.Class("UpdateKeysRequest")({
2610
- /**
2611
- * New name for the API key
2612
- */
2613
- "name": /*#__PURE__*/S.optionalWith(S.String, {
2614
- nullable: true
2615
- }),
2616
- /**
2617
- * Whether to disable the API key
2618
- */
2619
- "disabled": /*#__PURE__*/S.optionalWith(S.Boolean, {
2620
- nullable: true
2621
- }),
2622
- /**
2623
- * New spending limit for the API key in USD
2624
- */
2625
- "limit": /*#__PURE__*/S.optionalWith(S.Number, {
2626
- nullable: true
2627
- }),
4396
+ exports.ListKeyAssignments200 = ListKeyAssignments200;
4397
+ class ListMemberAssignmentsParams extends /*#__PURE__*/S.Struct({
2628
4398
  /**
2629
- * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
4399
+ * Number of records to skip for pagination
2630
4400
  */
2631
- "limit_reset": /*#__PURE__*/S.optionalWith(UpdateKeysRequestLimitReset, {
4401
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
2632
4402
  nullable: true
2633
4403
  }),
2634
4404
  /**
2635
- * Whether to include BYOK usage in the limit
4405
+ * Maximum number of records to return (max 100)
2636
4406
  */
2637
- "include_byok_in_limit": /*#__PURE__*/S.optionalWith(S.Boolean, {
4407
+ "limit": /*#__PURE__*/S.optionalWith(S.String, {
2638
4408
  nullable: true
2639
4409
  })
2640
4410
  }) {}
2641
- exports.UpdateKeysRequest = UpdateKeysRequest;
2642
- class UpdateKeys200 extends /*#__PURE__*/S.Struct({
4411
+ exports.ListMemberAssignmentsParams = ListMemberAssignmentsParams;
4412
+ class ListMemberAssignments200 extends /*#__PURE__*/S.Struct({
2643
4413
  /**
2644
- * The updated API key information
4414
+ * List of member assignments
2645
4415
  */
2646
- "data": /*#__PURE__*/S.Struct({
4416
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2647
4417
  /**
2648
- * Unique hash identifier for the API key
4418
+ * Unique identifier for the assignment
2649
4419
  */
2650
- "hash": S.String,
4420
+ "id": S.String,
2651
4421
  /**
2652
- * Name of the API key
4422
+ * Clerk user ID of the assigned member
2653
4423
  */
2654
- "name": S.String,
4424
+ "user_id": S.String,
2655
4425
  /**
2656
- * Human-readable label for the API key
4426
+ * Organization ID
2657
4427
  */
2658
- "label": S.String,
4428
+ "organization_id": S.String,
2659
4429
  /**
2660
- * Whether the API key is disabled
4430
+ * ID of the guardrail
2661
4431
  */
2662
- "disabled": S.Boolean,
4432
+ "guardrail_id": S.String,
2663
4433
  /**
2664
- * Spending limit for the API key in USD
4434
+ * User ID of who made the assignment
2665
4435
  */
2666
- "limit": /*#__PURE__*/S.NullOr(S.Number),
4436
+ "assigned_by": /*#__PURE__*/S.NullOr(S.String),
2667
4437
  /**
2668
- * Remaining spending limit in USD
4438
+ * ISO 8601 timestamp of when the assignment was created
2669
4439
  */
2670
- "limit_remaining": /*#__PURE__*/S.NullOr(S.Number),
4440
+ "created_at": S.String
4441
+ })),
4442
+ /**
4443
+ * Total number of member assignments
4444
+ */
4445
+ "total_count": S.Number
4446
+ }) {}
4447
+ exports.ListMemberAssignments200 = ListMemberAssignments200;
4448
+ class ListGuardrailKeyAssignmentsParams extends /*#__PURE__*/S.Struct({
4449
+ /**
4450
+ * Number of records to skip for pagination
4451
+ */
4452
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
4453
+ nullable: true
4454
+ }),
4455
+ /**
4456
+ * Maximum number of records to return (max 100)
4457
+ */
4458
+ "limit": /*#__PURE__*/S.optionalWith(S.String, {
4459
+ nullable: true
4460
+ })
4461
+ }) {}
4462
+ exports.ListGuardrailKeyAssignmentsParams = ListGuardrailKeyAssignmentsParams;
4463
+ class ListGuardrailKeyAssignments200 extends /*#__PURE__*/S.Struct({
4464
+ /**
4465
+ * List of key assignments
4466
+ */
4467
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2671
4468
  /**
2672
- * Type of limit reset for the API key
4469
+ * Unique identifier for the assignment
2673
4470
  */
2674
- "limit_reset": /*#__PURE__*/S.NullOr(S.String),
4471
+ "id": S.String,
2675
4472
  /**
2676
- * Whether to include external BYOK usage in the credit limit
4473
+ * Hash of the assigned API key
2677
4474
  */
2678
- "include_byok_in_limit": S.Boolean,
4475
+ "key_hash": S.String,
2679
4476
  /**
2680
- * Total OpenRouter credit usage (in USD) for the API key
4477
+ * ID of the guardrail
2681
4478
  */
2682
- "usage": S.Number,
4479
+ "guardrail_id": S.String,
2683
4480
  /**
2684
- * OpenRouter credit usage (in USD) for the current UTC day
4481
+ * Name of the API key
2685
4482
  */
2686
- "usage_daily": S.Number,
4483
+ "key_name": S.String,
2687
4484
  /**
2688
- * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
4485
+ * Label of the API key
2689
4486
  */
2690
- "usage_weekly": S.Number,
4487
+ "key_label": S.String,
2691
4488
  /**
2692
- * OpenRouter credit usage (in USD) for the current UTC month
4489
+ * User ID of who made the assignment
2693
4490
  */
2694
- "usage_monthly": S.Number,
4491
+ "assigned_by": /*#__PURE__*/S.NullOr(S.String),
2695
4492
  /**
2696
- * Total external BYOK usage (in USD) for the API key
4493
+ * ISO 8601 timestamp of when the assignment was created
2697
4494
  */
2698
- "byok_usage": S.Number,
4495
+ "created_at": S.String
4496
+ })),
4497
+ /**
4498
+ * Total number of key assignments for this guardrail
4499
+ */
4500
+ "total_count": S.Number
4501
+ }) {}
4502
+ exports.ListGuardrailKeyAssignments200 = ListGuardrailKeyAssignments200;
4503
+ class BulkAssignKeysToGuardrailRequest extends /*#__PURE__*/S.Class("BulkAssignKeysToGuardrailRequest")({
4504
+ /**
4505
+ * Array of API key hashes to assign to the guardrail
4506
+ */
4507
+ "key_hashes": /*#__PURE__*/S.NonEmptyArray(S.String.pipe(S.minLength(1))).pipe(/*#__PURE__*/S.minItems(1))
4508
+ }) {}
4509
+ exports.BulkAssignKeysToGuardrailRequest = BulkAssignKeysToGuardrailRequest;
4510
+ class BulkAssignKeysToGuardrail200 extends /*#__PURE__*/S.Struct({
4511
+ /**
4512
+ * Number of keys successfully assigned
4513
+ */
4514
+ "assigned_count": S.Number
4515
+ }) {}
4516
+ exports.BulkAssignKeysToGuardrail200 = BulkAssignKeysToGuardrail200;
4517
+ class ListGuardrailMemberAssignmentsParams extends /*#__PURE__*/S.Struct({
4518
+ /**
4519
+ * Number of records to skip for pagination
4520
+ */
4521
+ "offset": /*#__PURE__*/S.optionalWith(S.String, {
4522
+ nullable: true
4523
+ }),
4524
+ /**
4525
+ * Maximum number of records to return (max 100)
4526
+ */
4527
+ "limit": /*#__PURE__*/S.optionalWith(S.String, {
4528
+ nullable: true
4529
+ })
4530
+ }) {}
4531
+ exports.ListGuardrailMemberAssignmentsParams = ListGuardrailMemberAssignmentsParams;
4532
+ class ListGuardrailMemberAssignments200 extends /*#__PURE__*/S.Struct({
4533
+ /**
4534
+ * List of member assignments
4535
+ */
4536
+ "data": /*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
2699
4537
  /**
2700
- * External BYOK usage (in USD) for the current UTC day
4538
+ * Unique identifier for the assignment
2701
4539
  */
2702
- "byok_usage_daily": S.Number,
4540
+ "id": S.String,
2703
4541
  /**
2704
- * External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
4542
+ * Clerk user ID of the assigned member
2705
4543
  */
2706
- "byok_usage_weekly": S.Number,
4544
+ "user_id": S.String,
2707
4545
  /**
2708
- * External BYOK usage (in USD) for current UTC month
4546
+ * Organization ID
2709
4547
  */
2710
- "byok_usage_monthly": S.Number,
4548
+ "organization_id": S.String,
2711
4549
  /**
2712
- * ISO 8601 timestamp of when the API key was created
4550
+ * ID of the guardrail
2713
4551
  */
2714
- "created_at": S.String,
4552
+ "guardrail_id": S.String,
2715
4553
  /**
2716
- * ISO 8601 timestamp of when the API key was last updated
4554
+ * User ID of who made the assignment
2717
4555
  */
2718
- "updated_at": /*#__PURE__*/S.NullOr(S.String),
4556
+ "assigned_by": /*#__PURE__*/S.NullOr(S.String),
2719
4557
  /**
2720
- * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
4558
+ * ISO 8601 timestamp of when the assignment was created
2721
4559
  */
2722
- "expires_at": /*#__PURE__*/S.optionalWith(S.String, {
2723
- nullable: true
2724
- })
2725
- })
4560
+ "created_at": S.String
4561
+ })),
4562
+ /**
4563
+ * Total number of member assignments
4564
+ */
4565
+ "total_count": S.Number
4566
+ }) {}
4567
+ exports.ListGuardrailMemberAssignments200 = ListGuardrailMemberAssignments200;
4568
+ class BulkAssignMembersToGuardrailRequest extends /*#__PURE__*/S.Class("BulkAssignMembersToGuardrailRequest")({
4569
+ /**
4570
+ * Array of member user IDs to assign to the guardrail
4571
+ */
4572
+ "member_user_ids": /*#__PURE__*/S.NonEmptyArray(S.String.pipe(S.minLength(1))).pipe(/*#__PURE__*/S.minItems(1))
4573
+ }) {}
4574
+ exports.BulkAssignMembersToGuardrailRequest = BulkAssignMembersToGuardrailRequest;
4575
+ class BulkAssignMembersToGuardrail200 extends /*#__PURE__*/S.Struct({
4576
+ /**
4577
+ * Number of members successfully assigned
4578
+ */
4579
+ "assigned_count": S.Number
4580
+ }) {}
4581
+ exports.BulkAssignMembersToGuardrail200 = BulkAssignMembersToGuardrail200;
4582
+ class BulkUnassignKeysFromGuardrailRequest extends /*#__PURE__*/S.Class("BulkUnassignKeysFromGuardrailRequest")({
4583
+ /**
4584
+ * Array of API key hashes to unassign from the guardrail
4585
+ */
4586
+ "key_hashes": /*#__PURE__*/S.NonEmptyArray(S.String.pipe(S.minLength(1))).pipe(/*#__PURE__*/S.minItems(1))
4587
+ }) {}
4588
+ exports.BulkUnassignKeysFromGuardrailRequest = BulkUnassignKeysFromGuardrailRequest;
4589
+ class BulkUnassignKeysFromGuardrail200 extends /*#__PURE__*/S.Struct({
4590
+ /**
4591
+ * Number of keys successfully unassigned
4592
+ */
4593
+ "unassigned_count": S.Number
4594
+ }) {}
4595
+ exports.BulkUnassignKeysFromGuardrail200 = BulkUnassignKeysFromGuardrail200;
4596
+ class BulkUnassignMembersFromGuardrailRequest extends /*#__PURE__*/S.Class("BulkUnassignMembersFromGuardrailRequest")({
4597
+ /**
4598
+ * Array of member user IDs to unassign from the guardrail
4599
+ */
4600
+ "member_user_ids": /*#__PURE__*/S.NonEmptyArray(S.String.pipe(S.minLength(1))).pipe(/*#__PURE__*/S.minItems(1))
4601
+ }) {}
4602
+ exports.BulkUnassignMembersFromGuardrailRequest = BulkUnassignMembersFromGuardrailRequest;
4603
+ class BulkUnassignMembersFromGuardrail200 extends /*#__PURE__*/S.Struct({
4604
+ /**
4605
+ * Number of members successfully unassigned
4606
+ */
4607
+ "unassigned_count": S.Number
2726
4608
  }) {}
2727
- exports.UpdateKeys200 = UpdateKeys200;
4609
+ exports.BulkUnassignMembersFromGuardrail200 = BulkUnassignMembersFromGuardrail200;
2728
4610
  class GetCurrentKey200 extends /*#__PURE__*/S.Struct({
2729
4611
  /**
2730
4612
  * Current API key information
@@ -2907,9 +4789,31 @@ class CreateAuthKeysCode200 extends /*#__PURE__*/S.Struct({
2907
4789
  })
2908
4790
  }) {}
2909
4791
  exports.CreateAuthKeysCode200 = CreateAuthKeysCode200;
4792
+ class ChatGenerationParamsProviderEnumDataCollectionEnum extends /*#__PURE__*/S.Literal("deny", "allow") {}
4793
+ exports.ChatGenerationParamsProviderEnumDataCollectionEnum = ChatGenerationParamsProviderEnumDataCollectionEnum;
4794
+ 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", "Google", "Google AI Studio", "Groq", "Hyperbolic", "Inception", "Inceptron", "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", "Seed", "SiliconFlow", "Sourceful", "Stealth", "StreamLake", "Switchpoint", "Together", "Upstage", "Venice", "WandB", "Xiaomi", "xAI", "Z.AI", "FakeProvider"), S.String)) {}
4795
+ exports.Schema0 = Schema0;
4796
+ class ProviderSortUnion extends /*#__PURE__*/S.Union(ProviderSort, ProviderSortConfig) {}
4797
+ exports.ProviderSortUnion = ProviderSortUnion;
4798
+ class Schema1 extends /*#__PURE__*/S.Union(S.Number, S.String, S.Number) {}
4799
+ exports.Schema1 = Schema1;
4800
+ class ChatGenerationParamsRouteEnum extends /*#__PURE__*/S.Literal("fallback", "sort") {}
4801
+ exports.ChatGenerationParamsRouteEnum = ChatGenerationParamsRouteEnum;
4802
+ class ChatMessageContentItemCacheControlTtl extends /*#__PURE__*/S.Literal("5m", "1h") {}
4803
+ exports.ChatMessageContentItemCacheControlTtl = ChatMessageContentItemCacheControlTtl;
4804
+ class ChatMessageContentItemCacheControl extends /*#__PURE__*/S.Class("ChatMessageContentItemCacheControl")({
4805
+ "type": /*#__PURE__*/S.Literal("ephemeral"),
4806
+ "ttl": /*#__PURE__*/S.optionalWith(ChatMessageContentItemCacheControlTtl, {
4807
+ nullable: true
4808
+ })
4809
+ }) {}
4810
+ exports.ChatMessageContentItemCacheControl = ChatMessageContentItemCacheControl;
2910
4811
  class ChatMessageContentItemText extends /*#__PURE__*/S.Class("ChatMessageContentItemText")({
2911
4812
  "type": /*#__PURE__*/S.Literal("text"),
2912
- "text": S.String
4813
+ "text": S.String,
4814
+ "cache_control": /*#__PURE__*/S.optionalWith(ChatMessageContentItemCacheControl, {
4815
+ nullable: true
4816
+ })
2913
4817
  }) {}
2914
4818
  exports.ChatMessageContentItemText = ChatMessageContentItemText;
2915
4819
  class SystemMessage extends /*#__PURE__*/S.Class("SystemMessage")({
@@ -2932,38 +4836,19 @@ class ChatMessageContentItemImage extends /*#__PURE__*/S.Class("ChatMessageConte
2932
4836
  })
2933
4837
  }) {}
2934
4838
  exports.ChatMessageContentItemImage = ChatMessageContentItemImage;
2935
- class ChatMessageContentItemAudioInputAudioFormat extends /*#__PURE__*/S.Literal("wav", "mp3", "flac", "m4a", "ogg", "pcm16", "pcm24") {}
2936
- exports.ChatMessageContentItemAudioInputAudioFormat = ChatMessageContentItemAudioInputAudioFormat;
2937
4839
  class ChatMessageContentItemAudio extends /*#__PURE__*/S.Class("ChatMessageContentItemAudio")({
2938
4840
  "type": /*#__PURE__*/S.Literal("input_audio"),
2939
4841
  "input_audio": /*#__PURE__*/S.Struct({
2940
4842
  "data": S.String,
2941
- "format": ChatMessageContentItemAudioInputAudioFormat
4843
+ "format": S.String
2942
4844
  })
2943
4845
  }) {}
2944
4846
  exports.ChatMessageContentItemAudio = ChatMessageContentItemAudio;
2945
- class VideoURL extends /*#__PURE__*/S.Class("VideoURL")({
2946
- "url": S.String
2947
- }) {}
2948
- exports.VideoURL = VideoURL;
2949
4847
  class ChatMessageContentItemVideo extends /*#__PURE__*/S.Record({
2950
4848
  key: S.String,
2951
4849
  value: S.Unknown
2952
4850
  }) {}
2953
4851
  exports.ChatMessageContentItemVideo = ChatMessageContentItemVideo;
2954
- class ChatMessageContentItemFile extends /*#__PURE__*/S.Class("ChatMessageContentItemFile")({
2955
- "type": /*#__PURE__*/S.Literal("file"),
2956
- "file": /*#__PURE__*/S.Struct({
2957
- "file_data": S.String,
2958
- "file_id": /*#__PURE__*/S.optionalWith(S.String, {
2959
- nullable: true
2960
- }),
2961
- "filename": /*#__PURE__*/S.optionalWith(S.String, {
2962
- nullable: true
2963
- })
2964
- })
2965
- }) {}
2966
- exports.ChatMessageContentItemFile = ChatMessageContentItemFile;
2967
4852
  class ChatMessageContentItem extends /*#__PURE__*/S.Record({
2968
4853
  key: S.String,
2969
4854
  value: S.Unknown
@@ -2986,6 +4871,19 @@ class ChatMessageToolCall extends /*#__PURE__*/S.Class("ChatMessageToolCall")({
2986
4871
  })
2987
4872
  }) {}
2988
4873
  exports.ChatMessageToolCall = ChatMessageToolCall;
4874
+ class Schema3 extends /*#__PURE__*/S.Union(S.String, S.Null) {}
4875
+ exports.Schema3 = Schema3;
4876
+ class Schema4Enum extends /*#__PURE__*/S.Literal("unknown", "openai-responses-v1", "azure-openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") {}
4877
+ exports.Schema4Enum = Schema4Enum;
4878
+ class Schema4 extends /*#__PURE__*/S.Union(Schema4Enum, S.Null) {}
4879
+ exports.Schema4 = Schema4;
4880
+ class Schema5 extends S.Number {}
4881
+ exports.Schema5 = Schema5;
4882
+ class Schema2 extends /*#__PURE__*/S.Record({
4883
+ key: S.String,
4884
+ value: S.Unknown
4885
+ }) {}
4886
+ exports.Schema2 = Schema2;
2989
4887
  class AssistantMessage extends /*#__PURE__*/S.Class("AssistantMessage")({
2990
4888
  "role": /*#__PURE__*/S.Literal("assistant"),
2991
4889
  "content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(ChatMessageContentItem)), {
@@ -3006,7 +4904,11 @@ class AssistantMessage extends /*#__PURE__*/S.Class("AssistantMessage")({
3006
4904
  "reasoning_details": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ReasoningDetail), {
3007
4905
  nullable: true
3008
4906
  }),
3009
- "images": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(ChatMessageContentItemImage), {
4907
+ "images": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Struct({
4908
+ "image_url": /*#__PURE__*/S.Struct({
4909
+ "url": S.String
4910
+ })
4911
+ })), {
3010
4912
  nullable: true
3011
4913
  }),
3012
4914
  "annotations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(AnnotationDetail), {
@@ -3027,7 +4929,7 @@ class Message extends /*#__PURE__*/S.Record({
3027
4929
  exports.Message = Message;
3028
4930
  class ModelName extends S.String {}
3029
4931
  exports.ModelName = ModelName;
3030
- class ChatGenerationParamsReasoningEffortEnum extends /*#__PURE__*/S.Literal("none", "minimal", "low", "medium", "high") {}
4932
+ class ChatGenerationParamsReasoningEffortEnum extends /*#__PURE__*/S.Literal("xhigh", "high", "medium", "low", "minimal", "none") {}
3031
4933
  exports.ChatGenerationParamsReasoningEffortEnum = ChatGenerationParamsReasoningEffortEnum;
3032
4934
  class JSONSchemaConfig extends /*#__PURE__*/S.Class("JSONSchemaConfig")({
3033
4935
  "name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(64)),
@@ -3090,6 +4992,153 @@ class ToolDefinitionJson extends /*#__PURE__*/S.Class("ToolDefinitionJson")({
3090
4992
  }) {}
3091
4993
  exports.ToolDefinitionJson = ToolDefinitionJson;
3092
4994
  class ChatGenerationParams extends /*#__PURE__*/S.Class("ChatGenerationParams")({
4995
+ /**
4996
+ * When multiple model providers are available, optionally indicate your routing preference.
4997
+ */
4998
+ "provider": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
4999
+ /**
5000
+ * Whether to allow backup providers to serve requests
5001
+ * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
5002
+ * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
5003
+ */
5004
+ "allow_fallbacks": /*#__PURE__*/S.optionalWith(S.Boolean, {
5005
+ nullable: true
5006
+ }),
5007
+ /**
5008
+ * 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.
5009
+ */
5010
+ "require_parameters": /*#__PURE__*/S.optionalWith(S.Boolean, {
5011
+ nullable: true
5012
+ }),
5013
+ /**
5014
+ * Data collection setting. If no available model provider meets the requirement, your request will return an error.
5015
+ * - allow: (default) allow providers which store user data non-transiently and may train on it
5016
+ *
5017
+ * - deny: use only providers which do not collect user data.
5018
+ */
5019
+ "data_collection": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Literal("deny", "allow"), {
5020
+ nullable: true
5021
+ }),
5022
+ "zdr": /*#__PURE__*/S.optionalWith(S.Boolean, {
5023
+ nullable: true
5024
+ }),
5025
+ "enforce_distillable_text": /*#__PURE__*/S.optionalWith(S.Boolean, {
5026
+ nullable: true
5027
+ }),
5028
+ /**
5029
+ * 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.
5030
+ */
5031
+ "order": /*#__PURE__*/S.optionalWith(Schema0, {
5032
+ nullable: true
5033
+ }),
5034
+ /**
5035
+ * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
5036
+ */
5037
+ "only": /*#__PURE__*/S.optionalWith(Schema0, {
5038
+ nullable: true
5039
+ }),
5040
+ /**
5041
+ * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
5042
+ */
5043
+ "ignore": /*#__PURE__*/S.optionalWith(Schema0, {
5044
+ nullable: true
5045
+ }),
5046
+ /**
5047
+ * A list of quantization levels to filter the provider by.
5048
+ */
5049
+ "quantizations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Literal("int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown")), {
5050
+ nullable: true
5051
+ }),
5052
+ /**
5053
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
5054
+ */
5055
+ "sort": /*#__PURE__*/S.optionalWith(ProviderSortUnion, {
5056
+ nullable: true
5057
+ }),
5058
+ /**
5059
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
5060
+ */
5061
+ "max_price": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
5062
+ "prompt": /*#__PURE__*/S.optionalWith(Schema1, {
5063
+ nullable: true
5064
+ }),
5065
+ "completion": /*#__PURE__*/S.optionalWith(Schema1, {
5066
+ nullable: true
5067
+ }),
5068
+ "image": /*#__PURE__*/S.optionalWith(Schema1, {
5069
+ nullable: true
5070
+ }),
5071
+ "audio": /*#__PURE__*/S.optionalWith(Schema1, {
5072
+ nullable: true
5073
+ }),
5074
+ "request": /*#__PURE__*/S.optionalWith(Schema1, {
5075
+ nullable: true
5076
+ })
5077
+ }), {
5078
+ nullable: true
5079
+ }),
5080
+ /**
5081
+ * Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) 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.
5082
+ */
5083
+ "preferred_min_throughput": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.Number, /*#__PURE__*/S.Struct({
5084
+ "p50": /*#__PURE__*/S.optionalWith(S.Number, {
5085
+ nullable: true
5086
+ }),
5087
+ "p75": /*#__PURE__*/S.optionalWith(S.Number, {
5088
+ nullable: true
5089
+ }),
5090
+ "p90": /*#__PURE__*/S.optionalWith(S.Number, {
5091
+ nullable: true
5092
+ }),
5093
+ "p99": /*#__PURE__*/S.optionalWith(S.Number, {
5094
+ nullable: true
5095
+ })
5096
+ })), {
5097
+ nullable: true
5098
+ }),
5099
+ /**
5100
+ * Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) 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.
5101
+ */
5102
+ "preferred_max_latency": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.Number, /*#__PURE__*/S.Struct({
5103
+ "p50": /*#__PURE__*/S.optionalWith(S.Number, {
5104
+ nullable: true
5105
+ }),
5106
+ "p75": /*#__PURE__*/S.optionalWith(S.Number, {
5107
+ nullable: true
5108
+ }),
5109
+ "p90": /*#__PURE__*/S.optionalWith(S.Number, {
5110
+ nullable: true
5111
+ }),
5112
+ "p99": /*#__PURE__*/S.optionalWith(S.Number, {
5113
+ nullable: true
5114
+ })
5115
+ })), {
5116
+ nullable: true
5117
+ })
5118
+ }), {
5119
+ nullable: true
5120
+ }),
5121
+ /**
5122
+ * Plugins you want to enable for this request, including their settings.
5123
+ */
5124
+ "plugins": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Record({
5125
+ key: S.String,
5126
+ value: S.Unknown
5127
+ })), {
5128
+ nullable: true
5129
+ }),
5130
+ "route": /*#__PURE__*/S.optionalWith(ChatGenerationParamsRouteEnum, {
5131
+ nullable: true
5132
+ }),
5133
+ "user": /*#__PURE__*/S.optionalWith(S.String, {
5134
+ nullable: true
5135
+ }),
5136
+ /**
5137
+ * 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.
5138
+ */
5139
+ "session_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(128)), {
5140
+ nullable: true
5141
+ }),
3093
5142
  "messages": /*#__PURE__*/S.NonEmptyArray(Message).pipe(/*#__PURE__*/S.minItems(1)),
3094
5143
  "model": /*#__PURE__*/S.optionalWith(ModelName, {
3095
5144
  nullable: true
@@ -3170,15 +5219,28 @@ class ChatGenerationParams extends /*#__PURE__*/S.Class("ChatGenerationParams")(
3170
5219
  nullable: true,
3171
5220
  default: () => 1
3172
5221
  }),
3173
- "user": /*#__PURE__*/S.optionalWith(S.String, {
5222
+ "debug": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
5223
+ "echo_upstream_body": /*#__PURE__*/S.optionalWith(S.Boolean, {
5224
+ nullable: true
5225
+ })
5226
+ }), {
5227
+ nullable: true
5228
+ }),
5229
+ "image_config": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Record({
5230
+ key: S.String,
5231
+ value: S.Unknown
5232
+ }), {
5233
+ nullable: true
5234
+ }),
5235
+ "modalities": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Literal("text", "image")), {
3174
5236
  nullable: true
3175
5237
  })
3176
5238
  }) {}
3177
5239
  exports.ChatGenerationParams = ChatGenerationParams;
3178
- class ChatCompletionFinishReasonEnum extends /*#__PURE__*/S.Literal("tool_calls", "stop", "length", "content_filter", "error") {}
3179
- exports.ChatCompletionFinishReasonEnum = ChatCompletionFinishReasonEnum;
3180
- class ChatCompletionFinishReason extends /*#__PURE__*/S.Union(ChatCompletionFinishReasonEnum, S.Null) {}
5240
+ class ChatCompletionFinishReason extends /*#__PURE__*/S.Literal("tool_calls", "stop", "length", "content_filter", "error") {}
3181
5241
  exports.ChatCompletionFinishReason = ChatCompletionFinishReason;
5242
+ class Schema6 extends /*#__PURE__*/S.Union(ChatCompletionFinishReason, S.Null) {}
5243
+ exports.Schema6 = Schema6;
3182
5244
  class ChatMessageTokenLogprob extends /*#__PURE__*/S.Class("ChatMessageTokenLogprob")({
3183
5245
  "token": S.String,
3184
5246
  "logprob": S.Number,
@@ -3200,7 +5262,7 @@ class ChatMessageTokenLogprobs extends /*#__PURE__*/S.Class("ChatMessageTokenLog
3200
5262
  }) {}
3201
5263
  exports.ChatMessageTokenLogprobs = ChatMessageTokenLogprobs;
3202
5264
  class ChatResponseChoice extends /*#__PURE__*/S.Class("ChatResponseChoice")({
3203
- "finish_reason": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Literal("tool_calls", "stop", "length", "content_filter", "error")),
5265
+ "finish_reason": /*#__PURE__*/S.NullOr(ChatCompletionFinishReason),
3204
5266
  "index": S.Number,
3205
5267
  "message": AssistantMessage,
3206
5268
  "logprobs": /*#__PURE__*/S.optionalWith(ChatMessageTokenLogprobs, {
@@ -3212,16 +5274,6 @@ class ChatGenerationTokenUsage extends /*#__PURE__*/S.Class("ChatGenerationToken
3212
5274
  "completion_tokens": S.Number,
3213
5275
  "prompt_tokens": S.Number,
3214
5276
  "total_tokens": S.Number,
3215
- "cost": /*#__PURE__*/S.optionalWith(S.Number, {
3216
- nullable: true
3217
- }),
3218
- "cost_details": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
3219
- upstream_inference_cost: /*#__PURE__*/S.optionalWith(S.Number, {
3220
- nullable: true
3221
- })
3222
- }), {
3223
- nullable: true
3224
- }),
3225
5277
  "completion_tokens_details": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
3226
5278
  "reasoning_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
3227
5279
  nullable: true
@@ -3242,6 +5294,9 @@ class ChatGenerationTokenUsage extends /*#__PURE__*/S.Class("ChatGenerationToken
3242
5294
  "cached_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
3243
5295
  nullable: true
3244
5296
  }),
5297
+ "cache_write_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
5298
+ nullable: true
5299
+ }),
3245
5300
  "audio_tokens": /*#__PURE__*/S.optionalWith(S.Number, {
3246
5301
  nullable: true
3247
5302
  }),
@@ -3250,6 +5305,16 @@ class ChatGenerationTokenUsage extends /*#__PURE__*/S.Class("ChatGenerationToken
3250
5305
  })
3251
5306
  }), {
3252
5307
  nullable: true
5308
+ }),
5309
+ "cost": /*#__PURE__*/S.optionalWith(S.Number, {
5310
+ nullable: true
5311
+ }),
5312
+ "cost_details": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Struct({
5313
+ upstream_inference_cost: /*#__PURE__*/S.optionalWith(S.Number, {
5314
+ nullable: true
5315
+ })
5316
+ }), {
5317
+ nullable: true
3253
5318
  })
3254
5319
  }) {}
3255
5320
  exports.ChatGenerationTokenUsage = ChatGenerationTokenUsage;
@@ -3379,7 +5444,13 @@ class CompletionChoice extends /*#__PURE__*/S.Class("CompletionChoice")({
3379
5444
  "text": S.String,
3380
5445
  "index": S.Number,
3381
5446
  "logprobs": /*#__PURE__*/S.NullOr(CompletionLogprobs),
3382
- "finish_reason": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Literal("stop", "length", "content_filter"))
5447
+ "finish_reason": /*#__PURE__*/S.NullOr(/*#__PURE__*/S.Literal("stop", "length", "content_filter")),
5448
+ "native_finish_reason": /*#__PURE__*/S.optionalWith(S.String, {
5449
+ nullable: true
5450
+ }),
5451
+ "reasoning": /*#__PURE__*/S.optionalWith(S.String, {
5452
+ nullable: true
5453
+ })
3383
5454
  }) {}
3384
5455
  exports.CompletionChoice = CompletionChoice;
3385
5456
  class CompletionUsage extends /*#__PURE__*/S.Class("CompletionUsage")({
@@ -3393,6 +5464,9 @@ class CompletionResponse extends /*#__PURE__*/S.Class("CompletionResponse")({
3393
5464
  "object": /*#__PURE__*/S.Literal("text_completion"),
3394
5465
  "created": S.Number,
3395
5466
  "model": S.String,
5467
+ "provider": /*#__PURE__*/S.optionalWith(S.String, {
5468
+ nullable: true
5469
+ }),
3396
5470
  "system_fingerprint": /*#__PURE__*/S.optionalWith(S.String, {
3397
5471
  nullable: true
3398
5472
  }),
@@ -3431,6 +5505,18 @@ const make = (httpClient, options = {}) => {
3431
5505
  "529": decodeError("ProviderOverloadedResponse", ProviderOverloadedResponse),
3432
5506
  orElse: unexpectedStatus
3433
5507
  }))),
5508
+ "createMessages": options => HttpClientRequest.post(`/messages`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5509
+ "2xx": decodeSuccess(AnthropicMessagesResponse),
5510
+ "400": decodeError("CreateMessages400", CreateMessages400),
5511
+ "401": decodeError("CreateMessages401", CreateMessages401),
5512
+ "403": decodeError("CreateMessages403", CreateMessages403),
5513
+ "404": decodeError("CreateMessages404", CreateMessages404),
5514
+ "429": decodeError("CreateMessages429", CreateMessages429),
5515
+ "500": decodeError("CreateMessages500", CreateMessages500),
5516
+ "503": decodeError("CreateMessages503", CreateMessages503),
5517
+ "529": decodeError("CreateMessages529", CreateMessages529),
5518
+ orElse: unexpectedStatus
5519
+ }))),
3434
5520
  "getUserActivity": options => HttpClientRequest.get(`/activity`).pipe(HttpClientRequest.setUrlParams({
3435
5521
  "date": options?.["date"]
3436
5522
  }), withResponse(HttpClientResponse.matchStatus({
@@ -3521,15 +5607,6 @@ const make = (httpClient, options = {}) => {
3521
5607
  "500": decodeError("InternalServerResponse", InternalServerResponse),
3522
5608
  orElse: unexpectedStatus
3523
5609
  }))),
3524
- "getParameters": (author, slug, options) => HttpClientRequest.get(`/parameters/${author}/${slug}`).pipe(HttpClientRequest.setUrlParams({
3525
- "provider": options?.["provider"]
3526
- }), withResponse(HttpClientResponse.matchStatus({
3527
- "2xx": decodeSuccess(GetParameters200),
3528
- "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
3529
- "404": decodeError("NotFoundResponse", NotFoundResponse),
3530
- "500": decodeError("InternalServerResponse", InternalServerResponse),
3531
- orElse: unexpectedStatus
3532
- }))),
3533
5610
  "listProviders": () => HttpClientRequest.get(`/providers`).pipe(withResponse(HttpClientResponse.matchStatus({
3534
5611
  "2xx": decodeSuccess(ListProviders200),
3535
5612
  "500": decodeError("InternalServerResponse", InternalServerResponse),
@@ -3578,6 +5655,114 @@ const make = (httpClient, options = {}) => {
3578
5655
  "500": decodeError("InternalServerResponse", InternalServerResponse),
3579
5656
  orElse: unexpectedStatus
3580
5657
  }))),
5658
+ "listGuardrails": options => HttpClientRequest.get(`/guardrails`).pipe(HttpClientRequest.setUrlParams({
5659
+ "offset": options?.["offset"],
5660
+ "limit": options?.["limit"]
5661
+ }), withResponse(HttpClientResponse.matchStatus({
5662
+ "2xx": decodeSuccess(ListGuardrails200),
5663
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5664
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5665
+ orElse: unexpectedStatus
5666
+ }))),
5667
+ "createGuardrail": options => HttpClientRequest.post(`/guardrails`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5668
+ "2xx": decodeSuccess(CreateGuardrail201),
5669
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5670
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5671
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5672
+ orElse: unexpectedStatus
5673
+ }))),
5674
+ "getGuardrail": id => HttpClientRequest.get(`/guardrails/${id}`).pipe(withResponse(HttpClientResponse.matchStatus({
5675
+ "2xx": decodeSuccess(GetGuardrail200),
5676
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5677
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5678
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5679
+ orElse: unexpectedStatus
5680
+ }))),
5681
+ "deleteGuardrail": id => HttpClientRequest.del(`/guardrails/${id}`).pipe(withResponse(HttpClientResponse.matchStatus({
5682
+ "2xx": decodeSuccess(DeleteGuardrail200),
5683
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5684
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5685
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5686
+ orElse: unexpectedStatus
5687
+ }))),
5688
+ "updateGuardrail": (id, options) => HttpClientRequest.patch(`/guardrails/${id}`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5689
+ "2xx": decodeSuccess(UpdateGuardrail200),
5690
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5691
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5692
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5693
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5694
+ orElse: unexpectedStatus
5695
+ }))),
5696
+ "listKeyAssignments": options => HttpClientRequest.get(`/guardrails/assignments/keys`).pipe(HttpClientRequest.setUrlParams({
5697
+ "offset": options?.["offset"],
5698
+ "limit": options?.["limit"]
5699
+ }), withResponse(HttpClientResponse.matchStatus({
5700
+ "2xx": decodeSuccess(ListKeyAssignments200),
5701
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5702
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5703
+ orElse: unexpectedStatus
5704
+ }))),
5705
+ "listMemberAssignments": options => HttpClientRequest.get(`/guardrails/assignments/members`).pipe(HttpClientRequest.setUrlParams({
5706
+ "offset": options?.["offset"],
5707
+ "limit": options?.["limit"]
5708
+ }), withResponse(HttpClientResponse.matchStatus({
5709
+ "2xx": decodeSuccess(ListMemberAssignments200),
5710
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5711
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5712
+ orElse: unexpectedStatus
5713
+ }))),
5714
+ "listGuardrailKeyAssignments": (id, options) => HttpClientRequest.get(`/guardrails/${id}/assignments/keys`).pipe(HttpClientRequest.setUrlParams({
5715
+ "offset": options?.["offset"],
5716
+ "limit": options?.["limit"]
5717
+ }), withResponse(HttpClientResponse.matchStatus({
5718
+ "2xx": decodeSuccess(ListGuardrailKeyAssignments200),
5719
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5720
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5721
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5722
+ orElse: unexpectedStatus
5723
+ }))),
5724
+ "bulkAssignKeysToGuardrail": (id, options) => HttpClientRequest.post(`/guardrails/${id}/assignments/keys`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5725
+ "2xx": decodeSuccess(BulkAssignKeysToGuardrail200),
5726
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5727
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5728
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5729
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5730
+ orElse: unexpectedStatus
5731
+ }))),
5732
+ "listGuardrailMemberAssignments": (id, options) => HttpClientRequest.get(`/guardrails/${id}/assignments/members`).pipe(HttpClientRequest.setUrlParams({
5733
+ "offset": options?.["offset"],
5734
+ "limit": options?.["limit"]
5735
+ }), withResponse(HttpClientResponse.matchStatus({
5736
+ "2xx": decodeSuccess(ListGuardrailMemberAssignments200),
5737
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5738
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5739
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5740
+ orElse: unexpectedStatus
5741
+ }))),
5742
+ "bulkAssignMembersToGuardrail": (id, options) => HttpClientRequest.post(`/guardrails/${id}/assignments/members`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5743
+ "2xx": decodeSuccess(BulkAssignMembersToGuardrail200),
5744
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5745
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5746
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5747
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5748
+ orElse: unexpectedStatus
5749
+ }))),
5750
+ "bulkUnassignKeysFromGuardrail": (id, options) => HttpClientRequest.post(`/guardrails/${id}/assignments/keys/remove`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5751
+ "2xx": decodeSuccess(BulkUnassignKeysFromGuardrail200),
5752
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5753
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5754
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5755
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5756
+ orElse: unexpectedStatus
5757
+ }))),
5758
+ "bulkUnassignMembersFromGuardrail": (id, options) => HttpClientRequest.post(`/guardrails/${id}/assignments/members/remove`).pipe(HttpClientRequest.bodyUnsafeJson(options), withResponse(HttpClientResponse.matchStatus({
5759
+ "2xx": decodeSuccess(BulkUnassignMembersFromGuardrail200),
5760
+ "400": decodeError("BadRequestResponse", BadRequestResponse),
5761
+ "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),
5762
+ "404": decodeError("NotFoundResponse", NotFoundResponse),
5763
+ "500": decodeError("InternalServerResponse", InternalServerResponse),
5764
+ orElse: unexpectedStatus
5765
+ }))),
3581
5766
  "getCurrentKey": () => HttpClientRequest.get(`/key`).pipe(withResponse(HttpClientResponse.matchStatus({
3582
5767
  "2xx": decodeSuccess(GetCurrentKey200),
3583
5768
  "401": decodeError("UnauthorizedResponse", UnauthorizedResponse),