!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a090e3-17c4-77e0-a9df-6f88b6339ac6")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,421773,e=>{"use strict";let t={Temperature:"temperature",TopP:"top_p",TopK:"top_k",MinP:"min_p",TopA:"top_a",FrequencyPenalty:"frequency_penalty",PresencePenalty:"presence_penalty",RepetitionPenalty:"repetition_penalty",MaxTokens:"max_tokens",MaxCompletionTokens:"max_completion_tokens",LogitBias:"logit_bias",Logprobs:"logprobs",TopLogprobs:"top_logprobs",Prediction:"prediction",Seed:"seed",ResponseFormat:"response_format",StructuredOutputs:"structured_outputs",Stop:"stop",Tools:"tools",ToolChoice:"tool_choice",ParallelToolCalls:"parallel_tool_calls",IncludeReasoning:"include_reasoning",Reasoning:"reasoning",ReasoningEffort:"reasoning_effort",WebSearchOptions:"web_search_options",Verbosity:"verbosity"};t.MaxTokens,t.Temperature,t.TopP,t.Stop,t.FrequencyPenalty,t.PresencePenalty,t.Tools,t.ToolChoice;let a=new Set([t.StructuredOutputs,t.IncludeReasoning]);e.s(["INTERNAL_PARAMETERS",0,a,"Parameter",0,t])},206210,e=>{"use strict";e.s(["ReasoningEffortValue",0,{Max:"max",XHigh:"xhigh",High:"high",Medium:"medium",Low:"low",Minimal:"minimal",None:"none"},"ReasoningReturnMechanism",0,{ContentString:"content-string",ReasoningContent:"reasoning-content",Reasoning:"reasoning",None:"none"}])},60628,e=>{"use strict";e.i(204067);var t=e.i(796805),a=e.i(69362);t.z.enum([a.ApiSkin.Responses,a.ApiSkin.ChatCompletions,a.ApiSkin.AnthropicMessages]);let n="openrouter:advisor",o="openrouter:apply_patch",r="openrouter:bash",i="openrouter:datetime",s="openrouter:files",l="openrouter:fusion",u="openrouter:image_generation",p="openrouter:experimental__search_models",d="openrouter:shell",c="openrouter:subagent",m="openrouter:tool_search",h="openrouter:web_fetch",g="openrouter:web_search",f=[n,o,r,i,s,l,u,p,d,c,m,h,g],b=t.z.enum(f);e.s(["DISABLABLE_SERVER_TOOL_NAMES",0,f,"MAX_SANDBOX_COMMANDS",0,100,"OPENROUTER_TOOL_PREFIX",0,"openrouter:","OpenRouterServerToolType",0,{OpenRouterAdvisor:n,OpenRouterApplyPatch:o,OpenRouterBash:r,OpenRouterDatetime:i,OpenRouterFiles:s,OpenRouterFusion:l,OpenRouterImageGeneration:u,OpenRouterSearchModels:p,OpenRouterShell:d,OpenRouterSubagent:c,OpenRouterToolSearch:m,OpenRouterWebFetch:h,OpenRouterWebSearch:g},"ServerToolDisablableNameSchema",0,b,"TOOL_SEARCH_MAX_RESULTS_DEFAULT",0,5,"TOOL_SEARCH_MAX_RESULTS_MAX",0,50,"WEB_SEARCH_MAX_CHARACTERS_MAX",0,1e5,"WEB_SEARCH_MAX_RESULTS_MAX",0,25])},704985,e=>{"use strict";var t=e.i(204067),a=e.i(796805);let n=a.z.object({type:a.z.literal("container_file_citation"),container_id:a.z.string(),file_id:a.z.string(),filename:a.z.string(),start_index:(0,t.zInt)(),end_index:(0,t.zInt)()});e.s(["ContainerFileCitationSchema",0,n])},591444,e=>{"use strict";function t(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}e.s(["isDeepEqual",0,function e(a,n){if(Object.is(a,n))return!0;if(Array.isArray(a)||Array.isArray(n))return Array.isArray(a)&&Array.isArray(n)&&a.length===n.length&&a.every((t,a)=>e(t,n[a]));if(!t(a)||!t(n))return!1;let o=Object.keys(a);return o.length===Object.keys(n).length&&o.every(t=>t in n&&e(a[t],n[t]))},"isPlainObject",0,t])},317913,e=>{"use strict";var t=e.i(723409);e.i(723914),e.i(572952),e.i(562659);let a=[t.AdapterName.AnthropicMessageAdapter,t.AdapterName.AzureAnthropicAdapter,t.AdapterName.ClaudeOnAwsAdapter,t.AdapterName.DatabricksAnthropicAdapter,t.AdapterName.FireworksAnthropicAdapter,t.AdapterName.GoogleVertexAnthropicAdapter,t.AdapterName.InternalStreamAnthropicMessageAdapter,t.AdapterName.InternalStreamAzureAnthropicAdapter,t.AdapterName.InternalStreamClaudeOnAwsAdapter,t.AdapterName.InternalStreamGoogleVertexAnthropicAdapter],n=new Set([...a,...(0,t.batchAdaptersDelegatingTo)(new Set(a))]);e.i(586404),e.i(336422),e.i(693697),e.i(204067);var o=e.i(796805);let r={FiveMinutes:"5m",OneHour:"1h"};r.FiveMinutes;let i=o.z.enum(r).openapi("AnthropicCacheControlTtl",{example:"5m"}),s=o.z.object({type:o.z.literal("ephemeral"),ttl:i.optional()}).openapi("AnthropicCacheControlDirective",{description:"Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.",example:{type:"ephemeral"}}),l=o.z.object({cache_control:s.optional()}),u=[t.AdapterName.AlibabaAdapter,t.AdapterName.AmazonBedrockInvokeAnthropicAdapter,t.AdapterName.InternalStreamAmazonBedrockInvokeAnthropicAdapter,t.AdapterName.GoogleAIStudioGeminiAdapter,t.AdapterName.GoogleVertexGeminiAdapter,t.AdapterName.InternalStreamGoogleAIStudioInteractionsAdapter,t.AdapterName.InternalStreamGoogleVertexInteractionsAdapter];[...n,...u,...(0,t.batchAdaptersDelegatingTo)(new Set(u))],e.s(["AnthropicCacheControlDirectiveSchema",0,s,"AnthropicCacheControlSchema",0,l],317913)},723914,366699,341051,e=>{"use strict";var t=e.i(204067),a=e.i(796805);e.s(["ANTHROPIC_V1_MESSAGES_PASSTHROUGH_CONTENT_TYPE",0,"anthropic-v1-messages:passthrough","ChatMessageRole",0,{User:"user",Assistant:"assistant",System:"system",Developer:"developer",Tool:"tool"},"FinishReason",0,{ToolCalls:"tool_calls",Stop:"stop",Length:"length",ContentFilter:"content_filter",Error:"error"},"NEWLINE_DELIMITER",0,"\n\n","OPENAI_RESPONSES_PASSTHROUGH_CONTENT_TYPE",0,"openai-responses:passthrough"],366699);let n=(0,t.buildZodGuard)(a.z.object({prompt:a.z.string().min(1)}));e.s(["isValidPromptInput",0,function(e){return n(e)}],341051);let o=["in_progress","completed","incomplete"],r=a.z.object({type:a.z.literal("function"),id:a.z.string(),function:a.z.object({name:a.z.string(),arguments:a.z.string()}),namespace:a.z.string().optional(),tool_kind:a.z.enum({Function:"function",Custom:"custom"}).optional(),responses_item_id:a.z.string().optional(),responses_item_status:a.z.enum(o).optional().catch(void 0)});(0,t.buildZodGuard)(r),(0,t.buildZodGuard)(a.z.union([a.z.object({tool_calls:a.z.array(a.z.unknown()).min(1)}),a.z.object({tool_call_id:a.z.string().min(1)}),a.z.object({reasoning:a.z.string().min(1)}),a.z.object({reasoning_details:a.z.array(a.z.unknown()).min(1)}),a.z.object({images:a.z.array(a.z.unknown()).min(1)})])),(0,t.buildZodGuard)(a.z.object({role:a.z.string(),content:a.z.unknown()})),e.s(["RESPONSES_ITEM_STATUSES",0,o],723914)},572952,562659,e=>{"use strict";e.s(["isMessagesInput",0,function(e){return"messages"in e&&Array.isArray(e.messages)&&e.messages.length>0}],572952);var t=e.i(707283);e.s(["isMultipartMessage",0,function(e){return(0,t.isRecord)(e)&&Array.isArray(e.content)}],562659)},477020,483498,e=>{"use strict";var t=e.i(421773),a=e.i(206210),n=e.i(442427),o=e.i(204067),r=e.i(796805);let i=r.z.object({min:r.z.number().optional(),max:r.z.number().optional(),exclusiveMin:r.z.boolean().optional(),exclusiveMax:r.z.boolean().optional()});(0,o.buildZodGuard)(r.z.object({value:r.z.union([r.z.number(),r.z.undefined()]),range:i}));var s=e.i(693697),l=e.i(112272);class u{metadata;constructor(e){this.metadata=e}get description(){return"string"==typeof this.metadata?this.metadata:this.metadata.description}get video(){return"string"==typeof this.metadata?void 0:this.metadata.video}get name(){return this.metadata.name}get displayName(){return(0,l.capitalCase)(this.name)}toMarkdown(e){let t=[e?.includeName&&[`## ${this.displayName}`],e?.includeKey&&[`- Key: \`${this.name}\``],e?.includeExtra&&[...this.getExtraMarkdown(),!!this.video&&`- Explainer Video: [Watch](${this.video})`],[this.description]];return e?.isReverse&&(t=t.toReversed()),(0,n.truthyValues)(t.flat()).join("\n\n")}}class p extends u{metadata;get default(){return this.metadata.defaultValue}parseValue(e){return"number"==typeof e?e:this.metadata.defaultValue}constructor(e){super(e),this.metadata=e}getExtraMarkdown(){return(0,n.truthyValues)([`- Optional, **${this.metadata.type}**`,null!==this.metadata.defaultValue&&`- Default: **${this.metadata.defaultValue}**`])}}class d extends u{metadata;constructor(e){super(e),this.metadata=e}parseValue(e,t={withoutDefault:!1}){let a=function(e,t,{ignoredValues:a}={ignoredValues:new Set}){let n=Object.keys(e)[0],o=e[n];if(null==o||a.has(o))return;if("number"!=typeof o||Number.isNaN(o))throw TypeError(`Expected ${n} to be a number, received ${JSON.stringify(o)}`);let{min:r,max:i,exclusiveMin:s=!1,exclusiveMax:l=!1}=t;if(void 0!==r&&(s?!(o>r):!(o>=r)))throw Error(`Expected ${n} to be ${s?"more than":"at least"} ${r}`);if(void 0!==i&&(l?!(on)throw Error(`Min cannot be greater than max. Received ${a} > ${n}`);let i=void 0!==a?Math.max(a,e):e;return{value:void 0!==n?Math.min(n,i):i,range:t}}(e,{...this.metadata.range,...t})}get min(){return this.metadata.range.min}get max(){return this.metadata.range.max}get default(){return this.parseValue(this.metadata.defaultValue)}getExtraMarkdown(){let e="integer"===this.metadata.type;return[(0,n.truthyValues)([`- Optional, **${this.metadata.type}**, ${function(e,t=!1){let{min:a,max:n}=e,o=t?a?.toFixed(0):a?.toFixed(1),r=t?n?.toFixed(0):n?.toFixed(1);return void 0!==a&&void 0!==n?`${o} to ${r}`:void 0!==a?`${o} or above`:void 0!==n?`${r} or below`:"any"}(this.metadata.range,e)}`,null!==this.metadata.defaultValue&&`- Default: ${e?this.metadata.defaultValue.toFixed(0):this.metadata.defaultValue.toFixed(1)}`]).join("\n\n")]}}class c extends u{metadata;get default(){return this.metadata.defaultValue}constructor(e){super(e),this.metadata=e}getExtraMarkdown(){return(0,n.truthyValues)([`- Optional, **${this.type}**`])}}class m extends c{type="map";parseValue(e){if(this.metadata.schema){let t=(0,o.parseSchema)(this.metadata.schema,e);if((0,s.isOk)(t))return t.data}return e??this.metadata.defaultValue}}class h extends c{type="array";parseValue(e){return"object"!=typeof e&&void 0!==e?[e]:Array.isArray(e)?e:this.metadata.defaultValue}}class g extends u{metadata;get default(){return this.metadata.defaultValue}parseValue(e){return"string"!=typeof e&&("object"!=typeof e||null===e||Array.isArray(e))?this.metadata.defaultValue:e}constructor(e){super(e),this.metadata=e}getExtraMarkdown(){return["- Optional, **string or object**"]}}class f extends u{metadata;get default(){return this.metadata.defaultValue}parseValue(e){return"boolean"==typeof e?e:this.metadata.defaultValue}constructor(e){super(e),this.metadata=e}getExtraMarkdown(){return(0,n.truthyValues)(["- Optional, **boolean**",null!==this.metadata.defaultValue&&`- Default: **${this.metadata.defaultValue}**`])}}class b extends u{metadata;get default(){return this.metadata.defaultValue}parseValue(e){return"string"==typeof e&&this.metadata.enumValues.includes(e)?e:this.metadata.defaultValue}constructor(e){super(e),this.metadata=e}getExtraMarkdown(){return(0,n.truthyValues)([`- Optional, **enum** (${this.metadata.enumValues.join(", ")})`,null!==this.metadata.defaultValue&&`- Default: **${this.metadata.defaultValue}**`])}}e.s(["ArrayPD",0,h,"BooleanPD",0,f,"EnumPD",0,b,"MapPD",0,m,"NumberPD",0,p,"NumberRangePD",0,d,"StringOrObjectPD",0,g],483498);let y=new d({name:t.Parameter.MaxTokens,type:"integer",range:{min:1},defaultValue:null,ignoredValues:new Set([-1,0]),description:"This sets the upper limit for the number of tokens the model can generate in response. It won't produce more than this limit. The maximum value is the context length minus the prompt length."}),A=new d({name:t.Parameter.MaxCompletionTokens,type:"integer",range:{min:1},defaultValue:null,ignoredValues:new Set([-1,0]),description:"This sets the upper limit for the number of tokens the model can generate in response. It won't produce more than this limit. The maximum value is the context length minus the prompt length."}),_=new d({name:t.Parameter.Temperature,type:"float",range:{min:0,max:2},defaultValue:1,description:"This setting influences the variety in the model's responses. Lower values lead to more predictable and typical responses, while higher values encourage more diverse and less common responses. At 0, the model always gives the same response for a given input.",video:"https://youtu.be/ezgqHnWvua8"}),v=new d({name:t.Parameter.TopP,type:"float",range:{min:0,max:1,exclusiveMin:!0},ignoredValues:new Set([0]),defaultValue:1,description:"This setting limits the model's choices to a percentage of likely tokens: only the top tokens whose probabilities add up to P. A lower value makes the model's responses more predictable, while the default setting allows for a full range of token choices. Think of it like a dynamic Top-K.",video:"https://youtu.be/wQP-im_HInk"}),x=new d({name:t.Parameter.TopK,type:"integer",range:{min:0},ignoredValues:new Set([-1]),defaultValue:0,description:"This limits the model's choice of tokens at each step, making it choose from a smaller set. A value of 1 means the model will always pick the most likely next token, leading to predictable results. By default this setting is disabled, making the model to consider all choices.",video:"https://youtu.be/EbZv6-N8Xlk"}),w=new d({name:t.Parameter.MinP,type:"float",range:{min:0,max:1},defaultValue:0,ignoredValues:new Set([0]),description:`Represents the minimum probability for a token to be considered, relative to the probability of the most likely token. (The value changes depending on the confidence level of the most probable token.) If your Min-P is set to 0.1, that means it will only allow for tokens that are at least 1/10th as probable as the best possible option.`}),z=new d({name:t.Parameter.TopA,type:"float",range:{min:0,max:1},defaultValue:0,ignoredValues:new Set([0]),description:'Consider only the top tokens with "sufficiently high" probabilities based on the probability of the most likely token. Think of it like a dynamic Top-P. A lower Top-A value focuses the choices based on the highest probability token but with a narrower scope. A higher Top-A value does not necessarily affect the creativity of the output, but rather refines the filtering process based on the maximum probability.'}),k=new d({name:t.Parameter.PresencePenalty,type:"float",range:{min:-2,max:2},defaultValue:0,description:"Adjusts how often the model repeats specific tokens already used in the input. Higher values make such repetition less likely, while negative values do the opposite. Token penalty does not scale with the number of occurrences. Negative values will encourage token reuse.",video:"https://youtu.be/MwHG5HL-P74"}),S=new d({name:t.Parameter.FrequencyPenalty,type:"float",range:{min:-2,max:2},defaultValue:0,description:"This setting aims to control the repetition of tokens based on how often they appear in the input. It tries to use less frequently those tokens that appear more in the input, proportional to how frequently they occur. Token penalty scales with the number of occurrences. Negative values will encourage token reuse.",video:"https://youtu.be/p4gl6fqI0_w"}),T=new d({name:t.Parameter.RepetitionPenalty,type:"float",range:{min:0,max:2,exclusiveMin:!0},defaultValue:1,ignoredValues:new Set([0]),description:"Helps to reduce the repetition of tokens from the input. A higher value makes the model less likely to repeat tokens, but too high a value can make the output less coherent (often with run-on sentences that lack small words). Token penalty scales based on original token's probability.",video:"https://youtu.be/LHjGAnLm3DM"}),E=new p({name:t.Parameter.Seed,type:"integer",defaultValue:null,description:"If specified, the inferencing will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for some models."}),O=new m({name:t.Parameter.LogitBias,defaultValue:null,description:"Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token."}),P=new f({name:t.Parameter.Logprobs,defaultValue:null,description:"Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned."}),R=new p({name:t.Parameter.TopLogprobs,type:"integer",defaultValue:null,description:"An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used."}),N=new m({name:t.Parameter.Prediction,defaultValue:null,description:"Provides expected output content that capable models can use to reduce response latency when much of the completion is known in advance."}),V=new m({name:t.Parameter.ResponseFormat,defaultValue:null,description:'Forces the model to produce specific output format. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.\n\n **Note**: when using JSON mode, you should also instruct the model to produce JSON yourself via a system or user message.'}),I=new h({name:t.Parameter.Stop,defaultValue:null,description:"Stop generation immediately if the model encounter any token specified in the stop array."}),M=new h({name:t.Parameter.Tools,defaultValue:null,description:"Tool calling parameter, following OpenAI's tool calling request shape. For non-OpenAI providers, it will be transformed accordingly. [Click here to learn more about tool calling](/docs/guides/features/tool-calling)"}),C=new g({name:t.Parameter.ToolChoice,defaultValue:null,description:'Controls which (if any) tool is called by the model. \'none\' means the model will not call any tool and instead generates a message. \'auto\' means the model can pick between generating a message or calling one or more tools. \'required\' means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.'}),D=new f({name:t.Parameter.StructuredOutputs,defaultValue:null,description:"If the model can return structured outputs using response_format json_schema."}),j=new f({name:t.Parameter.IncludeReasoning,defaultValue:null,description:"Deprecated alias for reasoning.exclude. When true, reasoning tokens are returned in the response when supported by the model."}),L=new m({name:t.Parameter.Reasoning,defaultValue:null,description:"Controls reasoning behavior for models that support thinking tokens, including whether reasoning is enabled, the reasoning effort, maximum reasoning tokens, and whether reasoning is excluded from the response."}),F=new b({name:t.Parameter.ReasoningEffort,enumValues:Object.values(a.ReasoningEffortValue),defaultValue:null,description:"OpenAI-style reasoning effort setting. Higher values allow the model to spend more tokens on internal reasoning when supported."}),$=new m({name:t.Parameter.WebSearchOptions,defaultValue:null,description:"Configures native web search options for models and providers that support web-connected answers."}),q=new f({name:t.Parameter.ParallelToolCalls,defaultValue:!0,description:"Whether to enable parallel function calling during tool use. If true, the model can call multiple functions simultaneously. If false, functions will be called sequentially. Only applies when tools are provided."}),H=new b({name:t.Parameter.Verbosity,enumValues:["low","medium","high","xhigh","max"],defaultValue:null,description:"Constrains the verbosity of the model's response. Lower values produce more concise responses, while higher values produce more detailed and comprehensive responses. Introduced by OpenAI for the Responses API.\n\nFor Anthropic models, this parameter maps to `output_config.effort`. The 'xhigh' level is supported by Anthropic Claude 4.7 Opus and later models. The 'max' level is supported by Anthropic Claude 4.6 Opus and later models."}),G=[_,v,x,S,k,T,w,z],B=Object.fromEntries([...G,E,y,A,O,P,R,N,V,D,I,M,C,q,j,L,F,$,H].map(e=>[e.name,e]));_.parseOptionalValue(void 0),v.parseOptionalValue(void 0),x.parseOptionalValue(void 0),w.parseOptionalValue(void 0),z.parseOptionalValue(void 0),k.parseOptionalValue(void 0),S.parseOptionalValue(void 0),T.parseOptionalValue(void 0),E.default,O.default,P.default,R.default,V.default,y.default,I.default,e.s(["analyzedSamplingParameters",0,G,"frequencyPenaltyDetail",0,S,"maxTokensDetail",0,y,"parametersMap",0,B,"presencePenaltyDetail",0,k,"temperatureDetail",0,_,"topPDetail",0,v,"verbosityDetail",0,H],477020)},80125,412665,e=>{"use strict";var t=e.i(206210);e.i(483951);var a=e.i(586404),n=e.i(204067),o=e.i(796805),r=e.i(634723),i=e.i(159341),s=e.i(707283);function l(e){return"system"===e||"developer"===e}e.s(["isSystemLikeMessage",0,function(e){return l(e.role)},"isSystemLikeRole",0,l],412665);var u=e.i(555618),p=e.i(609266);let d=o.z.object({stream_options:o.z.object({include_usage:o.z.boolean().default(!0).openapi({description:"Deprecated: This field has no effect. Full usage details are always included.",deprecated:!0})})}),c=o.z.object({usage:o.z.object({include:o.z.boolean().openapi({description:"Deprecated: This field has no effect. Full usage details are always included.",deprecated:!0})})});p.SortPartitionSchema.nullish().describe('Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.');let m=o.z.enum(["fallback","sort"]).openapi("DeprecatedRoute",{deprecated:!0,description:'**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").',example:"fallback","x-speakeasy-deprecation-message":"Use providers.sort.partition instead.","x-speakeasy-ignore":!0,"x-fern-ignore":!0}).nullish(),h=t.ReasoningEffortValue;h.Max,h.XHigh,h.High,h.Medium,h.Low,h.Minimal,h.None;let g=h.Medium,f={Auto:"auto",AllTurns:"all_turns",CurrentTurn:"current_turn"},b="Controls which reasoning is available to the model. `auto` uses the model default (same as omitting); `all_turns` includes reasoning from earlier turns passed in input; `current_turn` limits to the current turn only. Only supported by OpenAI GPT-5.6 and newer.",y={Standard:"standard",Pro:"pro"},A=o.z.enum(h).describe("OpenAI-style reasoning effort setting"),_=o.z.object({enabled:o.z.boolean().optional().describe("Enables reasoning with default settings. Only work for some models."),effort:A.nullish(),max_tokens:(0,n.zInt)().nullish().describe("non-OpenAI-style reasoning effort setting"),exclude:o.z.boolean().optional().default(!1),context:o.z.enum(f).nullish().describe(b),mode:o.z.enum(y).nullish().describe("Selects the reasoning mode. `standard` is the default; `pro` engages deeper reasoning on models that support it, billed at standard token rates. Only supported by OpenAI GPT-5.6 and newer.")}),v=o.z.object({content:o.z.union([o.z.array(o.z.unknown()),o.z.string()]).nullish()}),x=v.passthrough(),w=o.z.object({provider:p.ProviderPreferencesSchema.strict().nullish().openapi("ProviderPreferences",{example:{allow_fallbacks:!0}}).describe("When multiple model providers are available, optionally indicate your routing preference."),plugins:i.PluginPreferencesSchema.optional().describe("Plugins you want to enable for this request, including their settings."),route:m,user:o.z.string().max(256).optional().describe("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 256 characters."),session_id:o.z.string().max(256).optional().openapi({description:"A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."}),trace:o.z.object({trace_id:o.z.string().optional(),trace_name:o.z.string().optional(),span_name:o.z.string().optional(),generation_name:o.z.string().optional(),parent_span_id:o.z.string().optional()}).passthrough().openapi("TraceConfig",{example:{trace_id:"trace-abc123",trace_name:"my-app-trace"}}).optional().describe("Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.")}),z=o.z.object({echo_upstream_body:o.z.boolean().describe("If true, includes the transformed upstream request body in a debug chunk at the start of the stream.").default(!1)});(0,n.buildZodGuard)(z);let k=o.z.object({type:o.z.literal("content"),content:o.z.union([o.z.string(),o.z.array(r.OpenAIChatCompletionsContentPartTextSchema)])}).openapi("Prediction",{description:"Static predicted output content. Supported models can use this to reduce latency when much of the response is known in advance.",example:{type:"content",content:"Expected response"}});o.z.object({temperature:(0,n.zDouble)().nullish(),top_p:(0,n.zDouble)().nullish(),prediction:k.nullish(),stream:n.BooleanOrStringifiedBooleanSchema.optional().default(!1),include_reasoning:o.z.boolean().optional().openapi("IncludeReasoning",{deprecated:!0,description:'**DEPRECATED** Whether to include reasoning (thinking tokens) in the response. Defaults to false. Text will appear in the "reasoning" field on each message prior to those containing "content".',"x-speakeasy-deprecation-message":"Use reasoning.enabled instead.",example:!1}),max_price:u.PublicPricingInputSchema.nullish().openapi("MaxPrice",{deprecated:!0,description:"The object specifying the maximum price you want to pay for this request.","x-speakeasy-deprecation-message":"Use provider.max_price instead.",example:{prompt:"0.001",completion:"0.002"}}),reasoning_effort:A.nullish(),reasoning:_.nullish(),messages:o.z.array(v.strict()).nullish(),shadow_models:o.z.array(o.z.string()).max(10).nullish(),debug:z.optional()}).extend(d.partial().shape).extend(w.partial().shape).extend(c.partial().shape).extend({messages:o.z.array(x).superRefine(function(e,t){Array.isArray(e)&&e.forEach((e,n)=>{!(0,s.isRecord)(e)||!(0,a.isDefinedAndNotNull)(e.configuration_update)||"string"==typeof e.role&&l(e.role)||t.addIssue({code:o.z.ZodIssueCode.custom,path:[n,"configuration_update"],message:`configuration_update is only supported on system and developer messages (found on message ${n} with role ${JSON.stringify(e.role)})`})})}).nullish()}).loose().superRefine(function(e,t){if(e.reasoning?.mode!==y.Pro)return;let n=e.messages?.findIndex(e=>(0,a.isDefinedAndNotNull)(e.configuration_update))??-1;-1!==n&&t.addIssue({code:o.z.ZodIssueCode.custom,path:["reasoning","mode"],message:`configuration_update is not supported with reasoning.mode "${y.Pro}" (found on message ${n})`})}).transform(({include_reasoning:e,reasoning_effort:n,reasoning:r,...i},s)=>{if((0,a.isDefinedAndNotNull)(n)&&(0,a.isDefinedAndNotNull)(r)&&(0,a.isDefinedAndNotNull)(r.effort)&&n!==r.effort)return s.addIssue({code:o.z.ZodIssueCode.custom,message:'"reasoning_effort" and "reasoning.effort" are both provided with conflicting values'}),o.z.NEVER;let l=n??r?.effort??null,u=r?.max_tokens??null,p=(0,a.isDefinedAndNotNull)(l),d=(0,a.isDefinedAndNotNull)(u);if(p&&d)return s.addIssue({code:o.z.ZodIssueCode.custom,message:'Only one of "reasoning.effort" and "reasoning.max_tokens" can be specified'}),o.z.NEVER;let c=(0,a.isDefinedAndNotNull)(r?.context)?{context:r.context}:{},m=(0,a.isDefinedAndNotNull)(r?.mode)?{mode:r.mode}:{},h=r?.enabled,g=("boolean"==typeof e?!e:r?.exclude??null)??!1;return!1===h?{...i,reasoning:{enabled:!1,effort:l===t.ReasoningEffortValue.None?null:l??null,max_tokens:null,exclude:g,...c,...m}}:l===t.ReasoningEffortValue.None?{...i,reasoning:{enabled:!1,effort:t.ReasoningEffortValue.None,max_tokens:null,exclude:g,...c,...m}}:!0===h||p||d?{...i,reasoning:{enabled:!0,effort:d?null:l,max_tokens:u,exclude:g,...c,...m}}:{...i,reasoning:{enabled:h,effort:l,max_tokens:u,exclude:g,...c,...m}}});let S=o.z.object({name:o.z.string(),strict:o.z.boolean().optional(),schema:o.z.record(o.z.string(),o.z.any()),description:o.z.string().optional()}).openapi("OpenResponsesJSONSchemaConfig",{example:{name:"my_schema",strict:!0,schema:{type:"object",properties:{answer:{type:"string"}}}}});o.z.discriminatedUnion("type",[o.z.object({type:o.z.literal("json_schema"),json_schema:S}).openapi("OpenResponsesResponseFormatJSONSchema",{example:{type:"json_schema",json_schema:{name:"my_schema",strict:!0,schema:{type:"object",properties:{answer:{type:"string"}}}}}}),o.z.object({type:o.z.literal("json_object")}).openapi("OpenResponsesResponseFormatJSONObject",{example:{type:"json_object"}}),o.z.object({type:o.z.literal("text")}).openapi("OpenResponsesResponseFormatText",{example:{type:"text"}})]);let T="server-tools";o.z.object({"x-grok-req-id":o.z.string().optional(),"x-grok-conv-id":o.z.string().optional(),"x-stripe-customer-id":o.z.string().optional(),"x-stripe-metering-metadata":o.z.string().optional(),"x-orb-customer-id":o.z.string().optional(),"x-orb-metering-metadata":o.z.string().optional(),"cf-ray":o.z.string().optional(),"cf-connecting-ipv6":o.z.string().optional(),"cf-connecting-ip":o.z.string().optional(),"cf-worker":o.z.string().optional(),"or-client-forwarded-ip":o.z.string().optional(),"sec-or-proxy-psk":o.z.string().optional(),"x-anthropic-beta":o.z.string().optional(),"anthropic-beta":o.z.string().optional(),"x-vertex-ai-llm-request-type":o.z.string().optional(),"x-session-id":o.z.string().optional(),"user-agent":o.z.string().optional(),referer:o.z.string().optional(),"x-openrouter-callmodel":o.z.string().optional(),"x-simulate-mid-stream-error":o.z.string().optional(),"x-per-chunk-delay-ms":o.z.string().optional(),"x-initial-delay-ms":o.z.string().optional(),"x-is-upstream-sse":o.z.string().optional(),"x-text-generation-mode":o.z.string().optional(),"x-custom-text":o.z.string().optional(),"x-completion-tokens":o.z.string().optional(),"x-reasoning-tokens":o.z.string().optional(),"x-or-experiments-internal":o.z.string().optional(),"x-or-endpoint-id":o.z.string().optional(),"x-openrouter-web-search-engine":o.z.string().optional(),"x-openrouter-web-search-mode":o.z.string().optional(),"x-openrouter-web-fetch-engine":o.z.string().optional(),"x-openrouter-shadow-request":o.z.string().optional(),"x-openrouter-skip-classification":o.z.string().optional(),"x-openrouter-exp-provider-sort":o.z.string().optional(),"content-length":o.z.string().optional()}),e.s(["CompletionRequestReasoningContext",0,f,"CompletionRequestReasoningEffort",0,h,"CompletionRequestReasoningEffortSchema",0,A,"CompletionRequestReasoningMode",0,y,"CompletionRequestReasoningSchema",0,_,"DEFAULT_REASONING_EFFORT",0,g,"DeprecatedRouteSchema",0,m,"REASONING_CONTEXT_DESCRIPTION",0,b,"SPAWNED_BY_FUSION",0,"openrouter:fusion","SPAWNED_BY_SERVER_TOOLS",0,T,"isSpawnedByServerTools",0,function(e){return e===T||e?.startsWith(`${T}:`)===!0}],80125)},838275,e=>{"use strict";e.s(["CACHE_TTL_DEFAULT_SECONDS",0,300,"CACHE_TTL_MAX_SECONDS",0,86400,"CACHE_TTL_MIN_SECONDS",0,1,"FREQUENCY_PENALTY_MAX",0,2,"FREQUENCY_PENALTY_MIN",0,-2,"MAX_TOKENS_MIN",0,0,"PRESET_DELIMITER",0,"@","PRESET_PATH_PREFIX",0,"preset/","REPETITION_PENALTY_MAX",0,2,"REPETITION_PENALTY_MIN",0,0,"TEMPERATURE_MAX",0,2,"TEMPERATURE_MIN",0,0,"TOP_K_MIN",0,0,"TOP_LOGPROBS_MAX",0,20,"TOP_LOGPROBS_MIN",0,0,"TOP_P_MAX",0,1,"TOP_P_MIN",0,0])},28158,e=>{"use strict";e.s(["resolveWebSearchModeEngine",0,function(e){if(void 0!==e)return"auto"===e||"native"===e?"exa":e}])}]); //# sourceMappingURL=0i_jb4-962xyd.js.map //# chunkId=01a090e3-17c4-77e0-a9df-6f88b6339ac6