@ax-llm/ax 25.4.0 → 25.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +2 -1
- package/index.d.ts +2 -1
- package/index.global.js +1 -1
- package/index.global.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/ax-agent-context.md +1 -1
- package/skills/ax-agent-memory-skills.md +1 -1
- package/skills/ax-agent-observability.md +1 -1
- package/skills/ax-agent-optimize.md +1 -1
- package/skills/ax-agent-rlm.md +1 -1
- package/skills/ax-agent.md +1 -1
- package/skills/ax-ai.md +1 -1
- package/skills/ax-audio.md +1 -1
- package/skills/ax-flow.md +1 -1
- package/skills/ax-gen.md +1 -1
- package/skills/ax-gepa.md +1 -1
- package/skills/ax-llm.md +1 -1
- package/skills/ax-mcp.md +1 -1
- package/skills/ax-playbook.md +1 -1
- package/skills/ax-refine.md +1 -1
- package/skills/ax-signature.md +1 -1
- package/skills/ax-typesafe.md +5 -5
package/index.d.cts
CHANGED
|
@@ -15964,6 +15964,7 @@ export declare const axAIProviderProfiles: {
|
|
|
15964
15964
|
readonly requiresStructuredOutput: true;
|
|
15965
15965
|
readonly thinking: false;
|
|
15966
15966
|
readonly multiTurn: false;
|
|
15967
|
+
readonly images: true;
|
|
15967
15968
|
readonly serviceTiers: readonly [];
|
|
15968
15969
|
};
|
|
15969
15970
|
readonly operations: {
|
|
@@ -15974,7 +15975,7 @@ export declare const axAIProviderProfiles: {
|
|
|
15974
15975
|
};
|
|
15975
15976
|
readonly modelRules: readonly [];
|
|
15976
15977
|
readonly sources: readonly ["https://github.com/typesafe-ai/typesafe-sdk-js", "https://docs.typesafe.ai/sdk/javascript"];
|
|
15977
|
-
readonly reviewedAt: "2026-
|
|
15978
|
+
readonly reviewedAt: "2026-10-15";
|
|
15978
15979
|
};
|
|
15979
15980
|
readonly "openai-decisions": {
|
|
15980
15981
|
readonly id: "openai-decisions";
|
package/index.d.ts
CHANGED
|
@@ -15964,6 +15964,7 @@ export declare const axAIProviderProfiles: {
|
|
|
15964
15964
|
readonly requiresStructuredOutput: true;
|
|
15965
15965
|
readonly thinking: false;
|
|
15966
15966
|
readonly multiTurn: false;
|
|
15967
|
+
readonly images: true;
|
|
15967
15968
|
readonly serviceTiers: readonly [];
|
|
15968
15969
|
};
|
|
15969
15970
|
readonly operations: {
|
|
@@ -15974,7 +15975,7 @@ export declare const axAIProviderProfiles: {
|
|
|
15974
15975
|
};
|
|
15975
15976
|
readonly modelRules: readonly [];
|
|
15976
15977
|
readonly sources: readonly ["https://github.com/typesafe-ai/typesafe-sdk-js", "https://docs.typesafe.ai/sdk/javascript"];
|
|
15977
|
-
readonly reviewedAt: "2026-
|
|
15978
|
+
readonly reviewedAt: "2026-10-15";
|
|
15978
15979
|
};
|
|
15979
15980
|
readonly "openai-decisions": {
|
|
15980
15981
|
readonly id: "openai-decisions";
|
package/index.global.js
CHANGED
|
@@ -855,7 +855,7 @@ UPDATE an existing bullet if one already covers this failure mode.`}}async funct
|
|
|
855
855
|
`),encryptedContent:n.item.encrypted_content??void 0}]);break}}break;case`response.completed`:this.tokensUsed=Bw(n.response.usage,n.response.service_tier_used??n.response.service_tier),a=n.response.id,i.id=`${n.response.id}_completed`,i.finishReason=`stop`,`meta_session_id`in n.response&&typeof n.response.meta_session_id==`string`&&(r.remoteSessionId=n.response.meta_session_id);break;case`response.failed`:throw new ac(n.response.error?.message||`Responses stream failed`,``,void 0,{response:n.response});case`response.incomplete`:this.tokensUsed=Bw(n.response.usage,n.response.service_tier_used??n.response.service_tier),a=n.response.id,i.id=`${n.response.id}_incomplete`,i.finishReason=tT(n.response.incomplete_details);break;case`error`:throw new ac(n.message||`Responses stream failed`,``,void 0,{event:n});default:i.id=`unknown`}return a?r.remoteId=a:a=r.remoteId,{results:[i],remoteId:a,remoteSessionId:r.remoteSessionId}};createEmbedReq(e){let t=e.embedModel;if(!t)throw Error(`Embed model not set`);if(!e.texts||e.texts.length===0)throw Error(`Embed texts is empty`);return[{name:`/embeddings`},{model:t,input:e.texts,dimensions:this.config.dimensions}]}};let rT=e=>{if(typeof e.content==`string`)return e.content;if(Array.isArray(e.content)){let t=e.content.map(e=>e.text).join(``);if(t)return t}return e.summary?.map(e=>e.text).join(`
|
|
856
856
|
`)??``},iT=e=>`image/${e??`png`}`,aT=(e,t,n)=>{if(/^(?:https?:|data:)/.test(t)){if(t.startsWith(`data:`)){let n=/^data:([^;,]+);base64,(.*)$/s.exec(t);if(n)return{id:e,mimeType:n[1],data:n[2]}}return{id:e,url:t,mimeType:iT(n)}}return{id:e,data:t,mimeType:iT(n)}},oT=(e,t)=>{let n=e.filter(e=>e.type===`refusal`);if(n.length>0)throw new uc(n.map(e=>e.refusal).join(`
|
|
857
857
|
`),void 0,t);return e.filter(e=>e.type===`output_text`).map(e=>e.text).join(`
|
|
858
|
-
`)};function sT(e){let t=[];for(let n of e??[])if(n?.type===`output_text`&&Array.isArray(n.annotations))for(let e of n.annotations)e&&e.type===`url_citation`&&typeof e.url==`string`&&t.push({url:e.url,title:e.title,description:e.description});return t.length?t:void 0}let cT=()=>({model:`gpt-4o`,embedModel:`text-embedding-ada-002`,temperature:.7,topP:1,stream:!0}),lT=()=>({...cT(),model:`gpt-4o`,temperature:.5}),uT=()=>({...cT(),model:`gpt-4o`,temperature:.9});var dT=class extends Vb{constructor({apiKey:e,credentialProvider:t,credentialProfile:n,config:r,options:i,apiURL:a,modelInfo:o=[],models:s,responsesReqUpdater:c,supportFor:l={functions:!0,streaming:!0,media:{images:{supported:!1,formats:[]},audio:{supported:!1,formats:[]},files:{supported:!1,formats:[],uploadMethod:`none`},urls:{supported:!1,webSearch:!1,contextFetching:!1}},caching:{supported:!1,types:[]},thinking:!1,multiTurn:!0},realtime:u}){if((!e||e===``)&&!t)throw Error(`OpenAI API key not set`);let d=new nT(r,i?.streamingUsage??!0,i,c,l,u,e),f=s?.map(e=>{let t=e,n=t?.config;if(!n)return e;let r={};n.maxTokens!==void 0&&(r.maxTokens=n.maxTokens),n.temperature!==void 0&&(r.temperature=n.temperature),n.topP!==void 0&&(r.topP=n.topP),n.presencePenalty!==void 0&&(r.presencePenalty=n.presencePenalty),n.frequencyPenalty!==void 0&&(r.frequencyPenalty=n.frequencyPenalty);let i=n.stopSequences??n.stop;i!==void 0&&(r.stopSequences=i),n.n!==void 0&&(r.n=n.n),n.stream!==void 0&&(r.stream=n.stream);let a={...t};Object.keys(r).length>0&&(a.modelConfig={...t.modelConfig??{},...r});let o=n?.thinking?.thinkingTokenBudget;if(typeof o==`number`){let e=[[`minimal`,200],[`low`,800],[`medium`,5e3],[`high`,1e4],[`highest`,24500]],t=`minimal`,n=1/0;for(let[r,i]of e){let e=Math.abs(o-i);e<n&&(n=e,t=r)}a.thinkingTokenBudget=t}return n?.thinking?.includeThoughts!==void 0&&(a.showThoughts=!!n.thinking.includeThoughts),n.serviceTier!==void 0&&(a.serviceTier=mw(n.serviceTier)),a});super(d,{name:`OpenAI`,apiURL:a||`https://api.openai.com/v1`,headers:async()=>e?{Authorization:`Bearer ${e}`}:{},profile:n,credentialProvider:t,modelInfo:o,defaults:{model:r.model??`gpt-4o`,embedModel:r.embedModel??`text-embedding-ada-002`},options:i,supportFor:l,models:f??s}),this.setChatCredentialOperation(`responses`)}},fT=class extends dT{constructor({apiKey:e,credentialProvider:t,apiURL:n,config:r,options:i,models:a,modelInfo:o}){if((!e||e===``)&&!t)throw Error(`OpenAI API key not set`);o=[...jC,...o??[]];let s=e=>{let t=rb({model:e,modelInfo:o,models:a}),n=t?.supported?.structuredOutputs??!0,r=t?.supported?.structuredOutputModes??(n?[`native`,`function`,`json_object`]:[`function`,`json_object`]);return{functions:!0,streaming:!0,hasThinkingBudget:t?.supported?.thinkingBudget??!1,hasShowThoughts:t?.supported?.showThoughts??!1,structuredOutputs:r.includes(`native`),structuredOutputModes:r,media:{images:{supported:xC(e),formats:xC(e)?[`image/jpeg`,`image/png`,`image/gif`,`image/webp`]:[]},audio:{supported:!1,formats:[]},files:{supported:!1,formats:[],uploadMethod:`none`},urls:{supported:!1,webSearch:!1,contextFetching:!1}},caching:{supported:xC(e),types:xC(e)?[`ephemeral`]:[]},thinking:xC(e),multiTurn:!0,serviceTiers:t?.supported?.serviceTiers??[`standard`,`flex`,`priority`]}};super({apiKey:e,credentialProvider:t,credentialProfile:`openai-responses`,apiURL:n,config:{...cT(),...r},options:i,modelInfo:o,models:a,supportFor:s}),this.setExplicitModelConfigKeys(r)}};let pT={openai:{id:`openai`,name:`OpenAI`,aliases:[`openai`],transport:`openai-chat`,baseURL:`https://api.openai.com/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`gpt-5-mini`,embedModel:`text-embedding-3-small`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,audioOutput:!0,structuredOutputModes:[`native`,`function`,`json_object`],files:{uploadMethod:`upload`},serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`},transcribe:{path:`/audio/transcriptions`,dialect:`openai-transcription`},speak:{path:`/audio/speech`,dialect:`openai-speech`},realtime:{path:`/realtime`,dialect:`openai-realtime`,modelMatch:{prefix:[`gpt-realtime`]},url:`wss://api.openai.com/v1/realtime`,grammar:`openai_realtime_compatible`,audio:{input:{formats:[`pcm16`,`pcm`],sampleRate:24e3},output:{formats:[`pcm16`,`pcm`],sampleRate:24e3,voices:[`alloy`,`ash`,`ballad`,`coral`,`echo`,`sage`,`shimmer`,`verse`],defaultVoice:`alloy`}},validation:{structuredOutputWithAudio:!1}}},modelRules:[{match:{prefix:[`gpt-6-astra`]},request:{unsupportedThinkingLevels:{none:`GPT-6 Astra requires reasoning; use low or higher`}},capabilities:{audio:!1,audioOutput:!1,functions:!0,structuredOutputModes:[`native`,`json_object`]}},{match:{prefix:[`gpt-6.1-sol`]},request:{unsupportedThinkingLevels:{none:`GPT-6.1 Sol requires reasoning; use low or higher`}},capabilities:{audio:!1,audioOutput:!1,functions:!0,structuredOutputModes:[`native`,`json_object`]}},{match:{prefix:[`gpt-6-sol`,`gpt-6-luna`]},capabilities:{audio:!1,audioOutput:!1,functions:!0,structuredOutputModes:[`native`,`json_object`]}}],sources:[`https://platform.openai.com/docs/api-reference/chat`],reviewedAt:`2026-09-23`,request:{serviceTierMap:{auto:`auto`,standard:`default`,flex:`flex`,priority:`priority`}}},"openai-compatible":{id:`openai-compatible`,name:`OpenAI Compatible`,aliases:[`openai-compatible`,`openai_compatible`,`compatible`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`}},modelRules:[],sources:[`https://platform.openai.com/docs/api-reference/chat`],reviewedAt:`2026-08-17`},"openai-responses":{id:`openai-responses`,name:`OpenAI Responses`,aliases:[`openai-responses`,`openai_responses`,`responses`],transport:`openai-responses`,baseURL:`https://api.openai.com/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`gpt-5-mini`,embedModel:`text-embedding-3-small`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,audioOutput:!0,structuredOutputModes:[`native`,`function`,`json_object`],files:{uploadMethod:`upload`},serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/responses`,dialect:`openai-responses`},embed:{path:`/embeddings`,dialect:`openai-embeddings`},transcribe:{path:`/audio/transcriptions`,dialect:`openai-transcription`},speak:{path:`/audio/speech`,dialect:`openai-speech`},realtime:{path:`/realtime`,dialect:`openai-realtime`,modelMatch:{prefix:[`gpt-realtime`]},url:`wss://api.openai.com/v1/realtime`,grammar:`openai_realtime_compatible`,audio:{input:{formats:[`pcm16`,`pcm`],sampleRate:24e3},output:{formats:[`pcm16`,`pcm`],sampleRate:24e3,voices:[`alloy`,`ash`,`ballad`,`coral`,`echo`,`sage`,`shimmer`,`verse`],defaultVoice:`alloy`}},validation:{structuredOutputWithAudio:!1}}},modelRules:[{match:{prefix:[`gpt-6-astra`]},request:{unsupportedThinkingLevels:{none:`GPT-6 Astra requires reasoning; use low or higher`}},capabilities:{audio:!1,audioOutput:!1}},{match:{prefix:[`gpt-6.1-sol`]},request:{unsupportedThinkingLevels:{none:`GPT-6.1 Sol requires reasoning; use low or higher`}},capabilities:{audio:!1,audioOutput:!1}},{match:{prefix:[`gpt-6-sol`,`gpt-6-luna`]},capabilities:{audio:!1,audioOutput:!1}}],sources:[`https://platform.openai.com/docs/api-reference/responses`],reviewedAt:`2026-09-23`,request:{serviceTierMap:{auto:`auto`,standard:`default`,flex:`flex`,priority:`priority`}}},anthropic:{id:`anthropic`,name:`Anthropic`,aliases:[`anthropic`,`claude`],transport:`anthropic-messages`,baseURL:`https://api.anthropic.com`,requiresApiURL:!1,auth:{type:`x-api-key`,required:!0},headers:{"anthropic-version":`2023-06-01`,"anthropic-beta":`structured-outputs-2025-11-13, web-search-2025-03-05`},defaults:{model:`claude-sonnet-5`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!0,multiTurn:!0,images:!0,caching:{types:[`ephemeral`],cacheBreakpoints:!0},structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/v1/messages`,dialect:`anthropic-messages`}},modelRules:[{match:{contains:[`claude-opus-5-5`,`claude-fable-5-1`,`claude-sonnet-5-5`]},request:{toolChoice:`unforced`},capabilities:{structuredOutputs:!0,structuredOutputModes:[`native`]}}],sources:[`https://docs.anthropic.com/en/api/messages`],reviewedAt:`2026-09-23`},"google-gemini":{id:`google-gemini`,name:`Google Gemini`,aliases:[`google-gemini`,`google_gemini`,`gemini`],transport:`gemini-generate-content`,baseURL:`https://generativelanguage.googleapis.com/v1beta`,requiresApiURL:!1,auth:{type:`api-key-header`,header:`x-goog-api-key`,required:!0},defaults:{model:`gemini-3.6-flash`,embedModel:`gemini-embedding-2`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,audioOutput:!0,files:{uploadMethod:`cloud`},caching:{types:[`persistent`]},structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/models/{model}:generateContent`,dialect:`gemini-generate-content`},stream_chat:{path:`/models/{model}:streamGenerateContent?alt=sse`,dialect:`gemini-generate-content`},embed:{path:`/models/{model}:batchEmbedContents`,dialect:`gemini-generate-content`},transcribe:{path:`/models/{model}:generateContent`,dialect:`gemini-generate-content`,defaultModel:`gemini-3.5-transcribe`,body:`json`},speak:{path:`/models/{model}:generateContent`,dialect:`gemini-generate-content`,defaultModel:`gemini-3.8-flash-tts`,response:`json`},realtime:{path:`/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent`,dialect:`gemini-live-bidi`,modelMatch:{exact:[`gemini-3.8-live`,`gemini-3.8-live-extended-thinking`],prefix:[`gemini-live`],contains:[`native-audio`,`-live-`]},url:`wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent`,grammar:`gemini_live_bidi`,defaultModel:`gemini-3.8-live`,audio:{input:{formats:[`pcm16`,`pcm`],sampleRate:16e3},output:{formats:[`pcm16`,`pcm`],sampleRate:24e3,voices:[`Kore`,`Puck`,`Charon`,`Fenrir`,`Aoede`],defaultVoice:`Kore`}},validation:{pcmInputOnly:!0,rejectStructuredOutputWithAudio:!0}}},modelRules:[],sources:[`https://ai.google.dev/api/generate-content`,`https://ai.google.dev/gemini-api/docs/optimization`],reviewedAt:`2026-09-23`,request:{serviceTierMap:{auto:null,standard:`standard`,flex:`flex`,priority:`priority`}}},webllm:{id:`webllm`,name:`WebLLM`,aliases:[`webllm`],transport:`webllm`,baseURL:null,requiresApiURL:!1,auth:{type:`none`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:``,dialect:`webllm`}},modelRules:[],sources:[`https://webllm.mlc.ai/docs/`],reviewedAt:`2026-08-17`},"azure-openai":{id:`azure-openai`,name:`Azure OpenAI`,aliases:[`azure-openai`,`azure_openai`,`azure`],transport:`openai-chat`,baseURL:null,requiresApiURL:!1,auth:{type:`api-key-header`,header:`api-key`,required:!0},defaults:{model:`gpt-5-mini`,embedModel:`text-embedding-3-small`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`}},endpoint:{scheme:`https`,hostField:`resourceName`,hostSuffix:`.openai.azure.com`,path:`/openai/deployments/{deploymentName}`,fields:{resourceName:[`resource_name`,`resourceName`],deploymentName:[`deployment_name`,`deploymentName`],version:[`api_version`,`apiVersion`,`version`]},required:[`resourceName`,`deploymentName`],defaults:{version:`2024-02-15-preview`},normalizers:{version:`api-version`},apiVersionField:`version`},capabilityGates:{structuredOutputs:{option:`version`,min:`2024-08-01`}},modelRules:[],sources:[`https://learn.microsoft.com/en-us/azure/ai-services/openai/reference`,`https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/priority-processing`],reviewedAt:`2026-08-17`,request:{serviceTierMap:{auto:`auto`,standard:`default`,flex:`flex`,priority:`priority`}}},deepseek:{id:`deepseek`,name:`DeepSeek`,aliases:[`deepseek`],transport:`openai-chat`,baseURL:`https://api.deepseek.com`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`deepseek-v4-flash`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`,`json_object`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{exact:[`deepseek-v4-flash`,`deepseek-v4-pro`]},capabilities:{thinking:!0,thinkingBudget:!0,showThoughts:!0,structuredOutputs:!1,structuredOutputModes:[`function`]},request:{reasoning:`thinking-object`,toolChoice:`unforced`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`max`,xhigh:`max`,max:`max`},dropWhenThinking:[`temperature`,`top_p`,`presence_penalty`,`frequency_penalty`],defaultThinkingLevel:`max`},response:{reasoningFields:[`reasoning_content`,`reasoning`]},replay:{assistantReasoningField:`reasoning_content`}},{match:{exact:[`deepseek-reasoner`]},capabilities:{thinking:!0,thinkingBudget:!1,showThoughts:!0,structuredOutputs:!1,structuredOutputModes:[`function`]},request:{toolChoice:`unforced`},response:{reasoningFields:[`reasoning_content`,`reasoning`]},replay:{assistantReasoningField:`reasoning_content`}}],sources:[`https://api-docs.deepseek.com/guides/thinking_mode/`],reviewedAt:`2026-08-18`},"deepseek-responses":{id:`deepseek-responses`,name:`DeepSeek Responses`,aliases:[`deepseek-responses`,`deepseek_responses`],transport:`openai-responses`,baseURL:`https://api.deepseek.com`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`deepseek-v4-flash`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!0,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/responses`,dialect:`openai-responses`}},request:{dropFields:[`include`,`previous_response_id`,`store`,`parallel_tool_calls`],reasoningObjectFields:[`effort`]},modelRules:[],sources:[`https://api-docs.deepseek.com/api/create-chat-completion`],reviewedAt:`2026-08-17`},meta:{id:`meta`,name:`Meta Model API`,aliases:[`meta`,`meta-responses`,`meta_responses`],transport:`openai-responses`,baseURL:`https://api.meta.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`muse-spark-1.3`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,files:{uploadMethod:`inline`},caching:{types:[`ephemeral`],cacheBreakpoints:!1},structuredOutputModes:[`native`,`function`,`json_object`],serviceTiers:[]},operations:{chat:{path:`/responses`,dialect:`openai-responses`},transcribe:{path:`/asr/transcribe`,dialect:`meta-transcription`},realtime:{path:`/asr/realtime`,dialect:`meta-realtime`,modelMatch:{exact:[`muse-voice-transcribe-1.0`]},url:`wss://api.meta.ai/v1/asr/realtime`,grammar:`meta_asr_realtime`,defaultModel:`muse-voice-transcribe-1.0`,audio:{input:{formats:[`pcm16`,`pcm`],sampleRate:24e3}}}},request:{toolChoice:`no-named`,reasoningObjectFields:[`effort`,`summary`],unsupportedThinkingLevels:{none:`Meta Muse Spark does not support reasoning level none`}},modelRules:[{match:{exact:[`muse-image-1.0`]},capabilities:{functions:!1,functionEmulation:!1,structuredOutputs:!1,thinking:!1,audio:!1,structuredOutputModes:[]}},{match:{exact:[`muse-voice-transcribe-1.0`]},capabilities:{functions:!1,functionEmulation:!1,structuredOutputs:!1,thinking:!1,images:!1,structuredOutputModes:[]}}],sources:[`https://dev.meta.ai/docs/protocols/responses`],reviewedAt:`2026-09-03`},"meta-chat":{id:`meta-chat`,name:`Meta Model API Chat Completions`,aliases:[`meta-chat`,`meta_chat`],transport:`openai-chat`,baseURL:`https://api.meta.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`muse-spark-1.3`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,files:{uploadMethod:`inline`},caching:{types:[`ephemeral`],cacheBreakpoints:!1},structuredOutputModes:[`native`,`function`,`json_object`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},request:{toolChoice:`no-named`,effortMap:{minimal:`minimal`,low:`low`,medium:`medium`,high:`high`,highest:`xhigh`},unsupportedThinkingLevels:{none:`Meta Muse Spark does not support reasoning level none`}},modelRules:[],sources:[`https://dev.meta.ai/docs/protocols/chat-completions`],reviewedAt:`2026-09-03`},"meta-messages":{id:`meta-messages`,name:`Meta Model API Messages`,aliases:[`meta-messages`,`meta_messages`],transport:`anthropic-messages`,baseURL:`https://api.meta.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`muse-spark-1.3`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,files:{uploadMethod:`inline`},structuredOutputModes:[`native`,`function`],serviceTiers:[]},operations:{chat:{path:`/messages`,dialect:`anthropic-messages`}},request:{toolChoice:`no-named`,unsupportedThinkingLevels:{none:`Meta Muse Spark does not support reasoning level none`}},modelRules:[],sources:[`https://dev.meta.ai/docs/protocols/messages`],reviewedAt:`2026-09-03`},mistral:{id:`mistral`,name:`Mistral AI`,aliases:[`mistral`],transport:`openai-chat`,baseURL:`https://api.mistral.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`mistral-small-latest`,embedModel:`mistral-embed`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,images:!0,audio:!0,audioOutput:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`},transcribe:{path:`/audio/transcriptions`,dialect:`openai-transcription`},speak:{path:`/audio/speech`,dialect:`mistral-speech`}},request:{renameFields:{max_completion_tokens:`max_tokens`},imageURLShape:`object`,serviceTierMap:{auto:`auto`,standard:`standard_only`,priority:`auto`}},modelRules:[],sources:[`https://docs.mistral.ai/api/`,`https://docs.mistral.ai/inference/priority-tier`],reviewedAt:`2026-08-17`},cohere:{id:`cohere`,name:`Cohere`,aliases:[`cohere`],transport:`openai-chat`,baseURL:`https://api.cohere.ai/compatibility/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`command-r-plus`,embedModel:`embed-english-v3.0`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`}},modelRules:[],sources:[`https://docs.cohere.com/reference/compatibility-api`],reviewedAt:`2026-08-17`},grok:{id:`grok`,name:`xAI Grok`,aliases:[`grok`,`xai`,`x-grok`,`x_grok`],transport:`openai-chat`,baseURL:`https://api.x.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`grok-4.6`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,images:!0,audio:!0,audioOutput:!0,webSearch:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},transcribe:{path:`/stt`,dialect:`xai-transcription`},speak:{path:`/tts`,dialect:`xai-speech`},realtime:{path:`/realtime`,dialect:`xai-realtime`,modelMatch:{prefix:[`grok-voice`]},url:`wss://api.x.ai/v1/realtime`,grammar:`openai_realtime_compatible`,defaultModel:`grok-voice-think-fast-1.0`,audio:{input:{formats:[`pcm16`,`pcm`],sampleRate:24e3},output:{formats:[`pcm16`,`pcm`],sampleRate:24e3,voices:[`eve`,`ara`,`rex`,`sal`,`leo`],defaultVoice:`eve`}},validation:{structuredOutputWithAudio:!1}}},request:{optionDialect:`search-parameters`,serviceTierMap:{auto:null,standard:`default`,priority:`priority`}},modelRules:[{match:{exact:[`grok-4.6`]},capabilities:{thinking:!0,thinkingBudget:!0,structuredOutputs:!0,structuredOutputModes:[`native`,`function`]},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`xhigh`,xhigh:`xhigh`,max:`xhigh`},unsupportedThinkingLevels:{none:`xAI Grok 4.6 reasoning cannot be disabled`},dropFields:[`presence_penalty`,`frequency_penalty`,`stop`]}},{match:{exact:[`grok-4.5`,`grok-4.5-latest`,`grok-build-latest`]},capabilities:{thinking:!0,thinkingBudget:!0,structuredOutputs:!0,structuredOutputModes:[`native`,`function`]},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`high`,xhigh:`high`,max:`high`},unsupportedThinkingLevels:{none:`xAI Grok 4.5 reasoning cannot be disabled`},dropFields:[`presence_penalty`,`frequency_penalty`,`stop`]}},{match:{exact:[`grok-4.3`,`grok-4.3-latest`,`grok-latest`]},capabilities:{thinking:!0,thinkingBudget:!0,showThoughts:!0,structuredOutputs:!0,structuredOutputModes:[`native`,`function`]},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:`none`,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`high`,xhigh:`high`,max:`high`},dropFields:[`presence_penalty`,`frequency_penalty`,`stop`]}},{match:{exact:[`grok-3-mini`,`grok-3-mini-latest`,`grok-3-mini-beta`,`grok-3-mini-fast`,`grok-3-mini-fast-latest`,`grok-3-mini-fast-beta`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`low`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`high`,high:`high`,highest:`high`,xhigh:`high`,max:`high`},unsupportedThinkingLevels:{none:`xAI Grok 3 Mini reasoning cannot be disabled`}}}],sources:[`https://docs.x.ai/developers/model-capabilities/text/reasoning`,`https://docs.x.ai/developers/rest-api-reference/management/auth`,`https://docs.x.ai/developers/models/grok-4.5`,`https://docs.x.ai/developers/advanced-api-usage/priority-processing`],reviewedAt:`2026-08-30`},reka:{id:`reka`,name:`Reka`,aliases:[`reka`],transport:`openai-chat`,baseURL:`https://api.reka.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`reka-core`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.reka.ai/`],reviewedAt:`2026-08-17`},together:{id:`together`,name:`Together AI`,aliases:[`together`,`together-ai`,`together_ai`],transport:`openai-chat`,baseURL:`https://api.together.xyz/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,structuredOutputModes:[`native`,`function`,`json_object`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`}},modelRules:[{match:{prefix:[`deepseek-ai/DeepSeek-V4`]},capabilities:{thinking:!0,thinkingBudget:!0,showThoughts:!0,structuredOutputs:!1,structuredOutputModes:[`function`]},request:{reasoning:`effort`,toolChoice:`unforced`,effortMap:{none:null,minimal:`high`,low:`high`,medium:`high`,high:`max`,highest:`max`,xhigh:`max`,max:`max`},defaultThinkingLevel:`max`},response:{reasoningFields:[`reasoning`,`reasoning_content`]},replay:{assistantReasoningField:`reasoning`}}],sources:[`https://docs.together.ai/docs/inference/chat/reasoning`],reviewedAt:`2026-08-18`},openrouter:{id:`openrouter`,name:`OpenRouter`,aliases:[`openrouter`],transport:`openai-chat`,baseURL:`https://openrouter.ai/api/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{prefix:[`deepseek/`]},capabilities:{thinking:!0,thinkingBudget:!0,showThoughts:!0,structuredOutputs:!1,structuredOutputModes:[`function`]},request:{reasoning:`openrouter`,toolChoice:`unforced`,effortMap:{none:`none`,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`max`,xhigh:`xhigh`,max:`max`},defaultThinkingLevel:`max`},response:{reasoningFields:[`reasoning`,`reasoning_content`],reasoningDetailsFields:[`reasoning_details`]},replay:{assistantReasoningField:`reasoning`,assistantReasoningDetailsField:`reasoning_details`}}],sources:[`https://openrouter.ai/docs/guides/best-practices/reasoning-tokens`,`https://openrouter.ai/docs/guides/features/service-tiers`],reviewedAt:`2026-08-18`,request:{serviceTierMap:{auto:null,standard:null,flex:`flex`,priority:`priority`}}},orcarouter:{id:`orcarouter`,name:`OrcaRouter`,aliases:[`orcarouter`],transport:`openai-chat`,baseURL:`https://api.orcarouter.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`orcarouter/auto`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://www.orcarouter.ai`],reviewedAt:`2026-08-19`},fireworks:{id:`fireworks`,name:`Fireworks AI`,aliases:[`fireworks`,`fireworks-ai`],transport:`openai-chat`,baseURL:`https://api.fireworks.ai/inference/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`}},modelRules:[{match:{contains:[`deepseek-v4`]},capabilities:{thinking:!0,thinkingBudget:!0,showThoughts:!0,structuredOutputs:!1,structuredOutputModes:[`function`]},request:{reasoning:`effort`,toolChoice:`unforced`,effortMap:{none:`none`,minimal:`high`,low:`high`,medium:`high`,high:`high`,highest:`max`,xhigh:`max`,max:`max`},defaultThinkingLevel:`max`},response:{reasoningFields:[`reasoning_content`,`reasoning`]},replay:{assistantReasoningField:`reasoning_content`}}],sources:[`https://docs.fireworks.ai/api-reference/post-chatcompletions`,`https://docs.fireworks.ai/guides/reasoning`],reviewedAt:`2026-08-18`,request:{serviceTierMap:{auto:null,standard:`default`,priority:`priority`}}},"huggingface-router":{id:`huggingface-router`,name:`Hugging Face Router`,aliases:[`huggingface-router`,`huggingface`,`hf-router`],transport:`openai-chat`,baseURL:`https://router.huggingface.co/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://huggingface.co/docs/inference-providers/en/index`,`https://huggingface.co/docs/inference-providers/en/tasks/chat-completion`],reviewedAt:`2026-08-18`},"amazon-bedrock":{id:`amazon-bedrock`,name:`Amazon Bedrock`,aliases:[`amazon-bedrock`,`bedrock`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions-mantle.html`,`https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html`],reviewedAt:`2026-08-17`,request:{serviceTierMap:{auto:null,standard:`default`,flex:`flex`,priority:`priority`}}},"azure-foundry":{id:`azure-foundry`,name:`Azure AI Foundry`,aliases:[`azure-foundry`,`azure-ai-foundry`,`microsoft-foundry`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`api-key-header`,header:`api-key`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://learn.microsoft.com/en-us/rest/api/microsoft-foundry/azureopenai/chat`,`https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/priority-processing`],reviewedAt:`2026-08-17`,request:{serviceTierMap:{auto:`auto`,standard:`default`,flex:`flex`,priority:`priority`}}},"vertex-ai":{id:`vertex-ai`,name:`Vertex AI OpenAI Compatibility`,aliases:[`vertex-ai`,`vertex-openai`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{exact:[`google/gemma-4-26b-a4b-it-maas`]},capabilities:{structuredOutputs:!1,structuredOutputModes:[`json_object`,`function`],thinking:!0},request:{defaultThinkingLevel:`max`,thinkingBoolean:{path:[`chat_template_kwargs`,`enable_thinking`]}},response:{reasoningFields:[`reasoning_content`]},replay:{assistantReasoningField:`reasoning_content`}},{match:{prefix:[`google/gemini-`,`gemini-`]},capabilities:{structuredOutputs:!0,structuredOutputModes:[`native`,`function`,`json_object`]}}],sources:[`https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/call-vertex-using-openai-library`,`https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/maas/capabilities/structured-output`,`https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/maas/capabilities/thinking`],reviewedAt:`2026-08-18`},databricks:{id:`databricks`,name:`Databricks Model Serving`,aliases:[`databricks`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.databricks.com/aws/en/machine-learning/model-serving/query-chat-models`,`https://docs.databricks.com/aws/en/machine-learning/foundation-model-apis/priority-mode`],reviewedAt:`2026-08-17`,request:{serviceTierMap:{auto:null,standard:`default`,priority:`priority`}}},baseten:{id:`baseten`,name:`Baseten Model APIs`,aliases:[`baseten`],transport:`openai-chat`,baseURL:`https://inference.baseten.co/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.baseten.co/inference/model-apis/overview`],reviewedAt:`2026-08-17`},groq:{id:`groq`,name:`Groq`,aliases:[`groq`],transport:`openai-chat`,baseURL:`https://api.groq.com/openai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{exact:[`openai/gpt-oss-20b`,`openai/gpt-oss-120b`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`high`,xhigh:`high`,max:`high`},unsupportedThinkingLevels:{none:`Groq GPT-OSS reasoning does not support the none effort level`}}},{match:{exact:[`qwen/qwen3.6-27b`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:`none`,minimal:`default`,low:`default`,medium:`default`,high:`default`,highest:`default`,xhigh:`default`,max:`default`}}}],sources:[`https://console.groq.com/docs/reasoning`,`https://console.groq.com/docs/api-reference`,`https://console.groq.com/docs/service-tiers`],reviewedAt:`2026-08-18`,request:{serviceTierMap:{auto:`auto`,standard:`on_demand`,flex:`flex`,priority:`performance`}}},cerebras:{id:`cerebras`,name:`Cerebras Inference`,aliases:[`cerebras`],transport:`openai-chat`,baseURL:`https://api.cerebras.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{exact:[`gpt-oss-120b`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`high`,xhigh:`high`,max:`high`},unsupportedThinkingLevels:{none:`Cerebras GPT-OSS reasoning does not support the none effort level`}}},{match:{exact:[`gemma-4-31b`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:`none`,minimal:`high`,low:`high`,medium:`high`,high:`high`,highest:`high`,xhigh:`high`,max:`high`}}}],sources:[`https://inference-docs.cerebras.ai/capabilities/reasoning`,`https://inference-docs.cerebras.ai/api-reference/chat-completions`,`https://inference-docs.cerebras.ai/capabilities/service-tiers`],reviewedAt:`2026-08-18`,request:{serviceTierMap:{auto:`auto`,standard:`default`,flex:`flex`,priority:`priority`}}},deepinfra:{id:`deepinfra`,name:`DeepInfra`,aliases:[`deepinfra`],transport:`openai-chat`,baseURL:`https://api.deepinfra.com/v1/openai`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{prefix:[`deepseek-ai/DeepSeek-R1`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:`none`,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`high`,xhigh:`high`,max:`high`}}}],sources:[`https://docs.deepinfra.com/chat/reasoning`,`https://docs.deepinfra.com/api-reference/introduction`,`https://docs.deepinfra.com/chat/overview`],reviewedAt:`2026-08-18`,request:{serviceTierMap:{auto:null,standard:null,priority:`priority`}}},sambanova:{id:`sambanova`,name:`SambaNova Cloud`,aliases:[`sambanova`,`sambanova-cloud`],transport:`openai-chat`,baseURL:`https://api.sambanova.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.sambanova.ai/docs/en/api-reference/overview`],reviewedAt:`2026-08-17`},nebius:{id:`nebius`,name:`Nebius AI Studio`,aliases:[`nebius`],transport:`openai-chat`,baseURL:`https://api.tokenfactory.nebius.com/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://api.studio.nebius.com/docs`],reviewedAt:`2026-08-17`},novita:{id:`novita`,name:`Novita AI`,aliases:[`novita`,`novita-ai`],transport:`openai-chat`,baseURL:`https://api.novita.ai/v3/openai`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://novita.ai/docs/guides/llm-api`],reviewedAt:`2026-08-17`},hyperbolic:{id:`hyperbolic`,name:`Hyperbolic`,aliases:[`hyperbolic`],transport:`openai-chat`,baseURL:`https://api.hyperbolic.xyz/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.hyperbolic.xyz/docs/inference-api`],reviewedAt:`2026-08-17`},siliconflow:{id:`siliconflow`,name:`SiliconFlow`,aliases:[`siliconflow`],transport:`openai-chat`,baseURL:`https://api.siliconflow.com/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.siliconflow.com/en/userguide/quickstart`],reviewedAt:`2026-08-17`},friendli:{id:`friendli`,name:`FriendliAI`,aliases:[`friendli`,`friendli-ai`],transport:`openai-chat`,baseURL:`https://api.friendli.ai/serverless/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://friendli.ai/docs/guides/tool-calling`],reviewedAt:`2026-08-17`},"cloudflare-workers-ai":{id:`cloudflare-workers-ai`,name:`Cloudflare Workers AI`,aliases:[`cloudflare-workers-ai`,`workers-ai`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://developers.cloudflare.com/workers-ai/configuration/open-ai-compatibility/`],reviewedAt:`2026-08-17`},featherless:{id:`featherless`,name:`Featherless AI`,aliases:[`featherless`,`featherless-ai`],transport:`openai-chat`,baseURL:`https://api.featherless.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://featherless.ai/docs/quickstart-guide`],reviewedAt:`2026-08-17`},nscale:{id:`nscale`,name:`Nscale`,aliases:[`nscale`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.nscale.com/docs/use-cases/chat`],reviewedAt:`2026-08-17`},ovhcloud:{id:`ovhcloud`,name:`OVHcloud AI Endpoints`,aliases:[`ovhcloud`,`ovh`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.ovhcloud.com/en/guides/public-cloud/ai-machine-learning/ai-endpoints-capabilities`],reviewedAt:`2026-08-17`},scaleway:{id:`scaleway`,name:`Scaleway Generative APIs`,aliases:[`scaleway`],transport:`openai-chat`,baseURL:`https://api.scaleway.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://www.scaleway.com/en/developers/api/generative-apis`],reviewedAt:`2026-08-17`},"nvidia-nim":{id:`nvidia-nim`,name:`NVIDIA NIM`,aliases:[`nvidia-nim`,`nim`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html`],reviewedAt:`2026-08-17`},"runpod-vllm":{id:`runpod-vllm`,name:`RunPod vLLM`,aliases:[`runpod-vllm`,`runpod`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.runpod.io/serverless/vllm/openai-compatibility`],reviewedAt:`2026-08-17`},"sagemaker-vllm":{id:`sagemaker-vllm`,name:`SageMaker vLLM`,aliases:[`sagemaker-vllm`,`sagemaker`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-openai-compatible.html`],reviewedAt:`2026-08-17`},vllm:{id:`vllm`,name:`vLLM`,aliases:[`vllm`],transport:`openai-chat`,baseURL:`http://localhost:8000/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.vllm.ai/en/latest/serving/openai_compatible_server/`],reviewedAt:`2026-08-17`},ollama:{id:`ollama`,name:`Ollama`,aliases:[`ollama`],transport:`openai-chat`,baseURL:`http://localhost:11434/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.ollama.com/api/openai-compatibility`],reviewedAt:`2026-08-17`},"lm-studio":{id:`lm-studio`,name:`LM Studio`,aliases:[`lm-studio`,`lmstudio`],transport:`openai-chat`,baseURL:`http://localhost:1234/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://lmstudio.ai/docs/developer/openai-compat`],reviewedAt:`2026-08-17`},"llama-cpp":{id:`llama-cpp`,name:`llama.cpp Server`,aliases:[`llama-cpp`,`llama.cpp`],transport:`openai-chat`,baseURL:`http://localhost:8080/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md`],reviewedAt:`2026-08-17`},localai:{id:`localai`,name:`LocalAI`,aliases:[`localai`,`local-ai`],transport:`openai-chat`,baseURL:`http://localhost:8080/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://localai.io/features/openai-functions/`],reviewedAt:`2026-08-17`},"baseten-engine":{id:`baseten-engine`,name:`Baseten Inference Engine`,aliases:[`baseten-engine`,`truss`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.baseten.co/development/model/deployment/inference`],reviewedAt:`2026-08-17`},typesafe:{id:`typesafe`,name:`Typesafe`,aliases:[`typesafe`],transport:`typesafe-system-one`,baseURL:`https://api.typesafe.ai`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`jev-latest`},capabilities:{functions:!1,functionEmulation:!1,streaming:!1,structuredOutputs:!0,structuredOutputModes:[`native`],requiresStructuredOutput:!0,thinking:!1,multiTurn:!1,serviceTiers:[]},operations:{chat:{path:`/v1/systemone`,dialect:`typesafe-system-one`}},modelRules:[],sources:[`https://github.com/typesafe-ai/typesafe-sdk-js`,`https://docs.typesafe.ai/sdk/javascript`],reviewedAt:`2026-09-15`},"openai-decisions":{id:`openai-decisions`,name:`OpenAI Decisions`,aliases:[`openai-decisions`],transport:`openai-decisions`,baseURL:`https://api.openai.com/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`gpt-6-luna`},capabilities:{functions:!1,functionEmulation:!1,streaming:!1,structuredOutputs:!0,structuredOutputModes:[`native`],requiresStructuredOutput:!0,thinking:!1,multiTurn:!1,images:!0,serviceTiers:[]},operations:{chat:{path:`/decisions`,dialect:`openai-decisions`}},modelRules:[],sources:[`https://developers.openai.com/api/docs/guides/decisions`,`https://github.com/openai/openai-node/blob/master/src/resources/decisions.ts`],reviewedAt:`2026-10-07`}},mT={openai:`openai`,"openai-compatible":`openai-compatible`,openai_compatible:`openai-compatible`,compatible:`openai-compatible`,"openai-responses":`openai-responses`,openai_responses:`openai-responses`,responses:`openai-responses`,anthropic:`anthropic`,claude:`anthropic`,"google-gemini":`google-gemini`,google_gemini:`google-gemini`,gemini:`google-gemini`,webllm:`webllm`,"azure-openai":`azure-openai`,azure_openai:`azure-openai`,azure:`azure-openai`,deepseek:`deepseek`,"deepseek-responses":`deepseek-responses`,deepseek_responses:`deepseek-responses`,meta:`meta`,"meta-responses":`meta`,meta_responses:`meta`,"meta-chat":`meta-chat`,meta_chat:`meta-chat`,"meta-messages":`meta-messages`,meta_messages:`meta-messages`,mistral:`mistral`,cohere:`cohere`,grok:`grok`,xai:`grok`,"x-grok":`grok`,x_grok:`grok`,reka:`reka`,together:`together`,"together-ai":`together`,together_ai:`together`,openrouter:`openrouter`,orcarouter:`orcarouter`,fireworks:`fireworks`,"fireworks-ai":`fireworks`,"huggingface-router":`huggingface-router`,huggingface:`huggingface-router`,"hf-router":`huggingface-router`,"amazon-bedrock":`amazon-bedrock`,bedrock:`amazon-bedrock`,"azure-foundry":`azure-foundry`,"azure-ai-foundry":`azure-foundry`,"microsoft-foundry":`azure-foundry`,"vertex-ai":`vertex-ai`,"vertex-openai":`vertex-ai`,databricks:`databricks`,baseten:`baseten`,groq:`groq`,cerebras:`cerebras`,deepinfra:`deepinfra`,sambanova:`sambanova`,"sambanova-cloud":`sambanova`,nebius:`nebius`,novita:`novita`,"novita-ai":`novita`,hyperbolic:`hyperbolic`,siliconflow:`siliconflow`,friendli:`friendli`,"friendli-ai":`friendli`,"cloudflare-workers-ai":`cloudflare-workers-ai`,"workers-ai":`cloudflare-workers-ai`,featherless:`featherless`,"featherless-ai":`featherless`,nscale:`nscale`,ovhcloud:`ovhcloud`,ovh:`ovhcloud`,scaleway:`scaleway`,"nvidia-nim":`nvidia-nim`,nim:`nvidia-nim`,"runpod-vllm":`runpod-vllm`,runpod:`runpod-vllm`,"sagemaker-vllm":`sagemaker-vllm`,sagemaker:`sagemaker-vllm`,vllm:`vllm`,ollama:`ollama`,"lm-studio":`lm-studio`,lmstudio:`lm-studio`,"llama-cpp":`llama-cpp`,"llama.cpp":`llama-cpp`,localai:`localai`,"local-ai":`localai`,"baseten-engine":`baseten-engine`,truss:`baseten-engine`,typesafe:`typesafe`,"openai-decisions":`openai-decisions`},hT=/* @__PURE__ */ `openai.openai-compatible.openai-responses.anthropic.google-gemini.webllm.azure-openai.deepseek.deepseek-responses.meta.meta-chat.meta-messages.mistral.cohere.grok.reka.together.openrouter.orcarouter.fireworks.huggingface-router.amazon-bedrock.azure-foundry.vertex-ai.databricks.baseten.groq.cerebras.deepinfra.sambanova.nebius.novita.hyperbolic.siliconflow.friendli.cloudflare-workers-ai.featherless.nscale.ovhcloud.scaleway.nvidia-nim.runpod-vllm.sagemaker-vllm.vllm.ollama.lm-studio.llama-cpp.localai.baseten-engine.typesafe.openai-decisions`.split(`.`),gT=/* @__PURE__ */ function(e){return e.Grok46=`grok-4.6`,e.Grok45=`grok-4.5`,e.Grok45Latest=`grok-4.5-latest`,e.GrokBuildLatest=`grok-build-latest`,e.Grok43=`grok-4.3`,e.Grok43Latest=`grok-4.3-latest`,e.GrokLatest=`grok-latest`,e.Grok420Reasoning=`grok-4.20-reasoning`,e.Grok420Reasoning0309=`grok-4.20-0309-reasoning`,e.Grok420NonReasoning=`grok-4.20-non-reasoning`,e.Grok420NonReasoning0309=`grok-4.20-0309-non-reasoning`,e.Grok420MultiAgent=`grok-4.20-multi-agent`,e.Grok420MultiAgent0309=`grok-4.20-multi-agent-0309`,e.Grok41FastReasoning=`grok-4-1-fast-reasoning`,e.Grok41FastNonReasoning=`grok-4-1-fast-non-reasoning`,e.GrokVoiceThinkFast=`grok-voice-think-fast-1.0`,e.GrokVoiceFast=`grok-voice-fast-1.0`,e.Grok3=`grok-3`,e.Grok3Mini=`grok-3-mini`,e.Grok3Fast=`grok-3-fast`,e.Grok3MiniFast=`grok-3-mini-fast`,e}({}),_T=/* @__PURE__ */ function(e){return e.GrokEmbedSmall=`grok-embed-small`,e}({}),vT=()=>({input:{format:`pcm16`,mimeType:`audio/pcm`,sampleRate:24e3,channels:1},output:{enabled:!0,voice:`eve`,format:`pcm16`,mimeType:`audio/pcm`,sampleRate:24e3,channels:1,includeTranscript:!0},live:{turnTimeoutMs:3e4}}),yT=()=>structuredClone({model:`grok-4.6`,...Pb()}),bT=()=>structuredClone({...yT(),model:`grok-4.6`}),xT=()=>structuredClone({...Pb(),model:`grok-voice-think-fast-1.0`,audio:vT(),stream:!1}),ST=e=>e===`grok-voice-think-fast-1.0`||e===`grok-voice-fast-1.0`||e.startsWith(`grok-voice-`),CT=(e,t)=>Qx(Qx(vT(),e),t),wT=(e,t,n)=>ST(e)&&$x(CT(t,n)),TT=e=>BC({...e,apiName:`grok-realtime-audio`,providerName:`Grok Realtime`,wsURL:e=>`wss://api.x.ai/v1/realtime?model=${encodeURIComponent(e)}`,createSessionUpdate:({request:e,audio:t})=>{let n=e.messages.filter(e=>e.role===`system`).map(e=>e.content).join(`
|
|
858
|
+
`)};function sT(e){let t=[];for(let n of e??[])if(n?.type===`output_text`&&Array.isArray(n.annotations))for(let e of n.annotations)e&&e.type===`url_citation`&&typeof e.url==`string`&&t.push({url:e.url,title:e.title,description:e.description});return t.length?t:void 0}let cT=()=>({model:`gpt-4o`,embedModel:`text-embedding-ada-002`,temperature:.7,topP:1,stream:!0}),lT=()=>({...cT(),model:`gpt-4o`,temperature:.5}),uT=()=>({...cT(),model:`gpt-4o`,temperature:.9});var dT=class extends Vb{constructor({apiKey:e,credentialProvider:t,credentialProfile:n,config:r,options:i,apiURL:a,modelInfo:o=[],models:s,responsesReqUpdater:c,supportFor:l={functions:!0,streaming:!0,media:{images:{supported:!1,formats:[]},audio:{supported:!1,formats:[]},files:{supported:!1,formats:[],uploadMethod:`none`},urls:{supported:!1,webSearch:!1,contextFetching:!1}},caching:{supported:!1,types:[]},thinking:!1,multiTurn:!0},realtime:u}){if((!e||e===``)&&!t)throw Error(`OpenAI API key not set`);let d=new nT(r,i?.streamingUsage??!0,i,c,l,u,e),f=s?.map(e=>{let t=e,n=t?.config;if(!n)return e;let r={};n.maxTokens!==void 0&&(r.maxTokens=n.maxTokens),n.temperature!==void 0&&(r.temperature=n.temperature),n.topP!==void 0&&(r.topP=n.topP),n.presencePenalty!==void 0&&(r.presencePenalty=n.presencePenalty),n.frequencyPenalty!==void 0&&(r.frequencyPenalty=n.frequencyPenalty);let i=n.stopSequences??n.stop;i!==void 0&&(r.stopSequences=i),n.n!==void 0&&(r.n=n.n),n.stream!==void 0&&(r.stream=n.stream);let a={...t};Object.keys(r).length>0&&(a.modelConfig={...t.modelConfig??{},...r});let o=n?.thinking?.thinkingTokenBudget;if(typeof o==`number`){let e=[[`minimal`,200],[`low`,800],[`medium`,5e3],[`high`,1e4],[`highest`,24500]],t=`minimal`,n=1/0;for(let[r,i]of e){let e=Math.abs(o-i);e<n&&(n=e,t=r)}a.thinkingTokenBudget=t}return n?.thinking?.includeThoughts!==void 0&&(a.showThoughts=!!n.thinking.includeThoughts),n.serviceTier!==void 0&&(a.serviceTier=mw(n.serviceTier)),a});super(d,{name:`OpenAI`,apiURL:a||`https://api.openai.com/v1`,headers:async()=>e?{Authorization:`Bearer ${e}`}:{},profile:n,credentialProvider:t,modelInfo:o,defaults:{model:r.model??`gpt-4o`,embedModel:r.embedModel??`text-embedding-ada-002`},options:i,supportFor:l,models:f??s}),this.setChatCredentialOperation(`responses`)}},fT=class extends dT{constructor({apiKey:e,credentialProvider:t,apiURL:n,config:r,options:i,models:a,modelInfo:o}){if((!e||e===``)&&!t)throw Error(`OpenAI API key not set`);o=[...jC,...o??[]];let s=e=>{let t=rb({model:e,modelInfo:o,models:a}),n=t?.supported?.structuredOutputs??!0,r=t?.supported?.structuredOutputModes??(n?[`native`,`function`,`json_object`]:[`function`,`json_object`]);return{functions:!0,streaming:!0,hasThinkingBudget:t?.supported?.thinkingBudget??!1,hasShowThoughts:t?.supported?.showThoughts??!1,structuredOutputs:r.includes(`native`),structuredOutputModes:r,media:{images:{supported:xC(e),formats:xC(e)?[`image/jpeg`,`image/png`,`image/gif`,`image/webp`]:[]},audio:{supported:!1,formats:[]},files:{supported:!1,formats:[],uploadMethod:`none`},urls:{supported:!1,webSearch:!1,contextFetching:!1}},caching:{supported:xC(e),types:xC(e)?[`ephemeral`]:[]},thinking:xC(e),multiTurn:!0,serviceTiers:t?.supported?.serviceTiers??[`standard`,`flex`,`priority`]}};super({apiKey:e,credentialProvider:t,credentialProfile:`openai-responses`,apiURL:n,config:{...cT(),...r},options:i,modelInfo:o,models:a,supportFor:s}),this.setExplicitModelConfigKeys(r)}};let pT={openai:{id:`openai`,name:`OpenAI`,aliases:[`openai`],transport:`openai-chat`,baseURL:`https://api.openai.com/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`gpt-5-mini`,embedModel:`text-embedding-3-small`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,audioOutput:!0,structuredOutputModes:[`native`,`function`,`json_object`],files:{uploadMethod:`upload`},serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`},transcribe:{path:`/audio/transcriptions`,dialect:`openai-transcription`},speak:{path:`/audio/speech`,dialect:`openai-speech`},realtime:{path:`/realtime`,dialect:`openai-realtime`,modelMatch:{prefix:[`gpt-realtime`]},url:`wss://api.openai.com/v1/realtime`,grammar:`openai_realtime_compatible`,audio:{input:{formats:[`pcm16`,`pcm`],sampleRate:24e3},output:{formats:[`pcm16`,`pcm`],sampleRate:24e3,voices:[`alloy`,`ash`,`ballad`,`coral`,`echo`,`sage`,`shimmer`,`verse`],defaultVoice:`alloy`}},validation:{structuredOutputWithAudio:!1}}},modelRules:[{match:{prefix:[`gpt-6-astra`]},request:{unsupportedThinkingLevels:{none:`GPT-6 Astra requires reasoning; use low or higher`}},capabilities:{audio:!1,audioOutput:!1,functions:!0,structuredOutputModes:[`native`,`json_object`]}},{match:{prefix:[`gpt-6.1-sol`]},request:{unsupportedThinkingLevels:{none:`GPT-6.1 Sol requires reasoning; use low or higher`}},capabilities:{audio:!1,audioOutput:!1,functions:!0,structuredOutputModes:[`native`,`json_object`]}},{match:{prefix:[`gpt-6-sol`,`gpt-6-luna`]},capabilities:{audio:!1,audioOutput:!1,functions:!0,structuredOutputModes:[`native`,`json_object`]}}],sources:[`https://platform.openai.com/docs/api-reference/chat`],reviewedAt:`2026-09-23`,request:{serviceTierMap:{auto:`auto`,standard:`default`,flex:`flex`,priority:`priority`}}},"openai-compatible":{id:`openai-compatible`,name:`OpenAI Compatible`,aliases:[`openai-compatible`,`openai_compatible`,`compatible`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`}},modelRules:[],sources:[`https://platform.openai.com/docs/api-reference/chat`],reviewedAt:`2026-08-17`},"openai-responses":{id:`openai-responses`,name:`OpenAI Responses`,aliases:[`openai-responses`,`openai_responses`,`responses`],transport:`openai-responses`,baseURL:`https://api.openai.com/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`gpt-5-mini`,embedModel:`text-embedding-3-small`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,audioOutput:!0,structuredOutputModes:[`native`,`function`,`json_object`],files:{uploadMethod:`upload`},serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/responses`,dialect:`openai-responses`},embed:{path:`/embeddings`,dialect:`openai-embeddings`},transcribe:{path:`/audio/transcriptions`,dialect:`openai-transcription`},speak:{path:`/audio/speech`,dialect:`openai-speech`},realtime:{path:`/realtime`,dialect:`openai-realtime`,modelMatch:{prefix:[`gpt-realtime`]},url:`wss://api.openai.com/v1/realtime`,grammar:`openai_realtime_compatible`,audio:{input:{formats:[`pcm16`,`pcm`],sampleRate:24e3},output:{formats:[`pcm16`,`pcm`],sampleRate:24e3,voices:[`alloy`,`ash`,`ballad`,`coral`,`echo`,`sage`,`shimmer`,`verse`],defaultVoice:`alloy`}},validation:{structuredOutputWithAudio:!1}}},modelRules:[{match:{prefix:[`gpt-6-astra`]},request:{unsupportedThinkingLevels:{none:`GPT-6 Astra requires reasoning; use low or higher`}},capabilities:{audio:!1,audioOutput:!1}},{match:{prefix:[`gpt-6.1-sol`]},request:{unsupportedThinkingLevels:{none:`GPT-6.1 Sol requires reasoning; use low or higher`}},capabilities:{audio:!1,audioOutput:!1}},{match:{prefix:[`gpt-6-sol`,`gpt-6-luna`]},capabilities:{audio:!1,audioOutput:!1}}],sources:[`https://platform.openai.com/docs/api-reference/responses`],reviewedAt:`2026-09-23`,request:{serviceTierMap:{auto:`auto`,standard:`default`,flex:`flex`,priority:`priority`}}},anthropic:{id:`anthropic`,name:`Anthropic`,aliases:[`anthropic`,`claude`],transport:`anthropic-messages`,baseURL:`https://api.anthropic.com`,requiresApiURL:!1,auth:{type:`x-api-key`,required:!0},headers:{"anthropic-version":`2023-06-01`,"anthropic-beta":`structured-outputs-2025-11-13, web-search-2025-03-05`},defaults:{model:`claude-sonnet-5`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!0,multiTurn:!0,images:!0,caching:{types:[`ephemeral`],cacheBreakpoints:!0},structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/v1/messages`,dialect:`anthropic-messages`}},modelRules:[{match:{contains:[`claude-opus-5-5`,`claude-fable-5-1`,`claude-sonnet-5-5`]},request:{toolChoice:`unforced`},capabilities:{structuredOutputs:!0,structuredOutputModes:[`native`]}}],sources:[`https://docs.anthropic.com/en/api/messages`],reviewedAt:`2026-09-23`},"google-gemini":{id:`google-gemini`,name:`Google Gemini`,aliases:[`google-gemini`,`google_gemini`,`gemini`],transport:`gemini-generate-content`,baseURL:`https://generativelanguage.googleapis.com/v1beta`,requiresApiURL:!1,auth:{type:`api-key-header`,header:`x-goog-api-key`,required:!0},defaults:{model:`gemini-3.6-flash`,embedModel:`gemini-embedding-2`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,audioOutput:!0,files:{uploadMethod:`cloud`},caching:{types:[`persistent`]},structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/models/{model}:generateContent`,dialect:`gemini-generate-content`},stream_chat:{path:`/models/{model}:streamGenerateContent?alt=sse`,dialect:`gemini-generate-content`},embed:{path:`/models/{model}:batchEmbedContents`,dialect:`gemini-generate-content`},transcribe:{path:`/models/{model}:generateContent`,dialect:`gemini-generate-content`,defaultModel:`gemini-3.5-transcribe`,body:`json`},speak:{path:`/models/{model}:generateContent`,dialect:`gemini-generate-content`,defaultModel:`gemini-3.8-flash-tts`,response:`json`},realtime:{path:`/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent`,dialect:`gemini-live-bidi`,modelMatch:{exact:[`gemini-3.8-live`,`gemini-3.8-live-extended-thinking`],prefix:[`gemini-live`],contains:[`native-audio`,`-live-`]},url:`wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent`,grammar:`gemini_live_bidi`,defaultModel:`gemini-3.8-live`,audio:{input:{formats:[`pcm16`,`pcm`],sampleRate:16e3},output:{formats:[`pcm16`,`pcm`],sampleRate:24e3,voices:[`Kore`,`Puck`,`Charon`,`Fenrir`,`Aoede`],defaultVoice:`Kore`}},validation:{pcmInputOnly:!0,rejectStructuredOutputWithAudio:!0}}},modelRules:[],sources:[`https://ai.google.dev/api/generate-content`,`https://ai.google.dev/gemini-api/docs/optimization`],reviewedAt:`2026-09-23`,request:{serviceTierMap:{auto:null,standard:`standard`,flex:`flex`,priority:`priority`}}},webllm:{id:`webllm`,name:`WebLLM`,aliases:[`webllm`],transport:`webllm`,baseURL:null,requiresApiURL:!1,auth:{type:`none`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:``,dialect:`webllm`}},modelRules:[],sources:[`https://webllm.mlc.ai/docs/`],reviewedAt:`2026-08-17`},"azure-openai":{id:`azure-openai`,name:`Azure OpenAI`,aliases:[`azure-openai`,`azure_openai`,`azure`],transport:`openai-chat`,baseURL:null,requiresApiURL:!1,auth:{type:`api-key-header`,header:`api-key`,required:!0},defaults:{model:`gpt-5-mini`,embedModel:`text-embedding-3-small`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`}},endpoint:{scheme:`https`,hostField:`resourceName`,hostSuffix:`.openai.azure.com`,path:`/openai/deployments/{deploymentName}`,fields:{resourceName:[`resource_name`,`resourceName`],deploymentName:[`deployment_name`,`deploymentName`],version:[`api_version`,`apiVersion`,`version`]},required:[`resourceName`,`deploymentName`],defaults:{version:`2024-02-15-preview`},normalizers:{version:`api-version`},apiVersionField:`version`},capabilityGates:{structuredOutputs:{option:`version`,min:`2024-08-01`}},modelRules:[],sources:[`https://learn.microsoft.com/en-us/azure/ai-services/openai/reference`,`https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/priority-processing`],reviewedAt:`2026-08-17`,request:{serviceTierMap:{auto:`auto`,standard:`default`,flex:`flex`,priority:`priority`}}},deepseek:{id:`deepseek`,name:`DeepSeek`,aliases:[`deepseek`],transport:`openai-chat`,baseURL:`https://api.deepseek.com`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`deepseek-v4-flash`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`,`json_object`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{exact:[`deepseek-v4-flash`,`deepseek-v4-pro`]},capabilities:{thinking:!0,thinkingBudget:!0,showThoughts:!0,structuredOutputs:!1,structuredOutputModes:[`function`]},request:{reasoning:`thinking-object`,toolChoice:`unforced`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`max`,xhigh:`max`,max:`max`},dropWhenThinking:[`temperature`,`top_p`,`presence_penalty`,`frequency_penalty`],defaultThinkingLevel:`max`},response:{reasoningFields:[`reasoning_content`,`reasoning`]},replay:{assistantReasoningField:`reasoning_content`}},{match:{exact:[`deepseek-reasoner`]},capabilities:{thinking:!0,thinkingBudget:!1,showThoughts:!0,structuredOutputs:!1,structuredOutputModes:[`function`]},request:{toolChoice:`unforced`},response:{reasoningFields:[`reasoning_content`,`reasoning`]},replay:{assistantReasoningField:`reasoning_content`}}],sources:[`https://api-docs.deepseek.com/guides/thinking_mode/`],reviewedAt:`2026-08-18`},"deepseek-responses":{id:`deepseek-responses`,name:`DeepSeek Responses`,aliases:[`deepseek-responses`,`deepseek_responses`],transport:`openai-responses`,baseURL:`https://api.deepseek.com`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`deepseek-v4-flash`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!0,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/responses`,dialect:`openai-responses`}},request:{dropFields:[`include`,`previous_response_id`,`store`,`parallel_tool_calls`],reasoningObjectFields:[`effort`]},modelRules:[],sources:[`https://api-docs.deepseek.com/api/create-chat-completion`],reviewedAt:`2026-08-17`},meta:{id:`meta`,name:`Meta Model API`,aliases:[`meta`,`meta-responses`,`meta_responses`],transport:`openai-responses`,baseURL:`https://api.meta.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`muse-spark-1.3`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,files:{uploadMethod:`inline`},caching:{types:[`ephemeral`],cacheBreakpoints:!1},structuredOutputModes:[`native`,`function`,`json_object`],serviceTiers:[]},operations:{chat:{path:`/responses`,dialect:`openai-responses`},transcribe:{path:`/asr/transcribe`,dialect:`meta-transcription`},realtime:{path:`/asr/realtime`,dialect:`meta-realtime`,modelMatch:{exact:[`muse-voice-transcribe-1.0`]},url:`wss://api.meta.ai/v1/asr/realtime`,grammar:`meta_asr_realtime`,defaultModel:`muse-voice-transcribe-1.0`,audio:{input:{formats:[`pcm16`,`pcm`],sampleRate:24e3}}}},request:{toolChoice:`no-named`,reasoningObjectFields:[`effort`,`summary`],unsupportedThinkingLevels:{none:`Meta Muse Spark does not support reasoning level none`}},modelRules:[{match:{exact:[`muse-image-1.0`]},capabilities:{functions:!1,functionEmulation:!1,structuredOutputs:!1,thinking:!1,audio:!1,structuredOutputModes:[]}},{match:{exact:[`muse-voice-transcribe-1.0`]},capabilities:{functions:!1,functionEmulation:!1,structuredOutputs:!1,thinking:!1,images:!1,structuredOutputModes:[]}}],sources:[`https://dev.meta.ai/docs/protocols/responses`],reviewedAt:`2026-09-03`},"meta-chat":{id:`meta-chat`,name:`Meta Model API Chat Completions`,aliases:[`meta-chat`,`meta_chat`],transport:`openai-chat`,baseURL:`https://api.meta.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`muse-spark-1.3`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,files:{uploadMethod:`inline`},caching:{types:[`ephemeral`],cacheBreakpoints:!1},structuredOutputModes:[`native`,`function`,`json_object`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},request:{toolChoice:`no-named`,effortMap:{minimal:`minimal`,low:`low`,medium:`medium`,high:`high`,highest:`xhigh`},unsupportedThinkingLevels:{none:`Meta Muse Spark does not support reasoning level none`}},modelRules:[],sources:[`https://dev.meta.ai/docs/protocols/chat-completions`],reviewedAt:`2026-09-03`},"meta-messages":{id:`meta-messages`,name:`Meta Model API Messages`,aliases:[`meta-messages`,`meta_messages`],transport:`anthropic-messages`,baseURL:`https://api.meta.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`muse-spark-1.3`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!0,multiTurn:!0,images:!0,audio:!0,files:{uploadMethod:`inline`},structuredOutputModes:[`native`,`function`],serviceTiers:[]},operations:{chat:{path:`/messages`,dialect:`anthropic-messages`}},request:{toolChoice:`no-named`,unsupportedThinkingLevels:{none:`Meta Muse Spark does not support reasoning level none`}},modelRules:[],sources:[`https://dev.meta.ai/docs/protocols/messages`],reviewedAt:`2026-09-03`},mistral:{id:`mistral`,name:`Mistral AI`,aliases:[`mistral`],transport:`openai-chat`,baseURL:`https://api.mistral.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`mistral-small-latest`,embedModel:`mistral-embed`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,images:!0,audio:!0,audioOutput:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`},transcribe:{path:`/audio/transcriptions`,dialect:`openai-transcription`},speak:{path:`/audio/speech`,dialect:`mistral-speech`}},request:{renameFields:{max_completion_tokens:`max_tokens`},imageURLShape:`object`,serviceTierMap:{auto:`auto`,standard:`standard_only`,priority:`auto`}},modelRules:[],sources:[`https://docs.mistral.ai/api/`,`https://docs.mistral.ai/inference/priority-tier`],reviewedAt:`2026-08-17`},cohere:{id:`cohere`,name:`Cohere`,aliases:[`cohere`],transport:`openai-chat`,baseURL:`https://api.cohere.ai/compatibility/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`command-r-plus`,embedModel:`embed-english-v3.0`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`}},modelRules:[],sources:[`https://docs.cohere.com/reference/compatibility-api`],reviewedAt:`2026-08-17`},grok:{id:`grok`,name:`xAI Grok`,aliases:[`grok`,`xai`,`x-grok`,`x_grok`],transport:`openai-chat`,baseURL:`https://api.x.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`grok-4.6`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,images:!0,audio:!0,audioOutput:!0,webSearch:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},transcribe:{path:`/stt`,dialect:`xai-transcription`},speak:{path:`/tts`,dialect:`xai-speech`},realtime:{path:`/realtime`,dialect:`xai-realtime`,modelMatch:{prefix:[`grok-voice`]},url:`wss://api.x.ai/v1/realtime`,grammar:`openai_realtime_compatible`,defaultModel:`grok-voice-think-fast-1.0`,audio:{input:{formats:[`pcm16`,`pcm`],sampleRate:24e3},output:{formats:[`pcm16`,`pcm`],sampleRate:24e3,voices:[`eve`,`ara`,`rex`,`sal`,`leo`],defaultVoice:`eve`}},validation:{structuredOutputWithAudio:!1}}},request:{optionDialect:`search-parameters`,serviceTierMap:{auto:null,standard:`default`,priority:`priority`}},modelRules:[{match:{exact:[`grok-4.6`]},capabilities:{thinking:!0,thinkingBudget:!0,structuredOutputs:!0,structuredOutputModes:[`native`,`function`]},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`xhigh`,xhigh:`xhigh`,max:`xhigh`},unsupportedThinkingLevels:{none:`xAI Grok 4.6 reasoning cannot be disabled`},dropFields:[`presence_penalty`,`frequency_penalty`,`stop`]}},{match:{exact:[`grok-4.5`,`grok-4.5-latest`,`grok-build-latest`]},capabilities:{thinking:!0,thinkingBudget:!0,structuredOutputs:!0,structuredOutputModes:[`native`,`function`]},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`high`,xhigh:`high`,max:`high`},unsupportedThinkingLevels:{none:`xAI Grok 4.5 reasoning cannot be disabled`},dropFields:[`presence_penalty`,`frequency_penalty`,`stop`]}},{match:{exact:[`grok-4.3`,`grok-4.3-latest`,`grok-latest`]},capabilities:{thinking:!0,thinkingBudget:!0,showThoughts:!0,structuredOutputs:!0,structuredOutputModes:[`native`,`function`]},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:`none`,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`high`,xhigh:`high`,max:`high`},dropFields:[`presence_penalty`,`frequency_penalty`,`stop`]}},{match:{exact:[`grok-3-mini`,`grok-3-mini-latest`,`grok-3-mini-beta`,`grok-3-mini-fast`,`grok-3-mini-fast-latest`,`grok-3-mini-fast-beta`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`low`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`high`,high:`high`,highest:`high`,xhigh:`high`,max:`high`},unsupportedThinkingLevels:{none:`xAI Grok 3 Mini reasoning cannot be disabled`}}}],sources:[`https://docs.x.ai/developers/model-capabilities/text/reasoning`,`https://docs.x.ai/developers/rest-api-reference/management/auth`,`https://docs.x.ai/developers/models/grok-4.5`,`https://docs.x.ai/developers/advanced-api-usage/priority-processing`],reviewedAt:`2026-08-30`},reka:{id:`reka`,name:`Reka`,aliases:[`reka`],transport:`openai-chat`,baseURL:`https://api.reka.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`reka-core`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.reka.ai/`],reviewedAt:`2026-08-17`},together:{id:`together`,name:`Together AI`,aliases:[`together`,`together-ai`,`together_ai`],transport:`openai-chat`,baseURL:`https://api.together.xyz/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,structuredOutputModes:[`native`,`function`,`json_object`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`}},modelRules:[{match:{prefix:[`deepseek-ai/DeepSeek-V4`]},capabilities:{thinking:!0,thinkingBudget:!0,showThoughts:!0,structuredOutputs:!1,structuredOutputModes:[`function`]},request:{reasoning:`effort`,toolChoice:`unforced`,effortMap:{none:null,minimal:`high`,low:`high`,medium:`high`,high:`max`,highest:`max`,xhigh:`max`,max:`max`},defaultThinkingLevel:`max`},response:{reasoningFields:[`reasoning`,`reasoning_content`]},replay:{assistantReasoningField:`reasoning`}}],sources:[`https://docs.together.ai/docs/inference/chat/reasoning`],reviewedAt:`2026-08-18`},openrouter:{id:`openrouter`,name:`OpenRouter`,aliases:[`openrouter`],transport:`openai-chat`,baseURL:`https://openrouter.ai/api/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{prefix:[`deepseek/`]},capabilities:{thinking:!0,thinkingBudget:!0,showThoughts:!0,structuredOutputs:!1,structuredOutputModes:[`function`]},request:{reasoning:`openrouter`,toolChoice:`unforced`,effortMap:{none:`none`,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`max`,xhigh:`xhigh`,max:`max`},defaultThinkingLevel:`max`},response:{reasoningFields:[`reasoning`,`reasoning_content`],reasoningDetailsFields:[`reasoning_details`]},replay:{assistantReasoningField:`reasoning`,assistantReasoningDetailsField:`reasoning_details`}}],sources:[`https://openrouter.ai/docs/guides/best-practices/reasoning-tokens`,`https://openrouter.ai/docs/guides/features/service-tiers`],reviewedAt:`2026-08-18`,request:{serviceTierMap:{auto:null,standard:null,flex:`flex`,priority:`priority`}}},orcarouter:{id:`orcarouter`,name:`OrcaRouter`,aliases:[`orcarouter`],transport:`openai-chat`,baseURL:`https://api.orcarouter.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`orcarouter/auto`},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://www.orcarouter.ai`],reviewedAt:`2026-08-19`},fireworks:{id:`fireworks`,name:`Fireworks AI`,aliases:[`fireworks`,`fireworks-ai`],transport:`openai-chat`,baseURL:`https://api.fireworks.ai/inference/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`},embed:{path:`/embeddings`,dialect:`openai-embeddings`}},modelRules:[{match:{contains:[`deepseek-v4`]},capabilities:{thinking:!0,thinkingBudget:!0,showThoughts:!0,structuredOutputs:!1,structuredOutputModes:[`function`]},request:{reasoning:`effort`,toolChoice:`unforced`,effortMap:{none:`none`,minimal:`high`,low:`high`,medium:`high`,high:`high`,highest:`max`,xhigh:`max`,max:`max`},defaultThinkingLevel:`max`},response:{reasoningFields:[`reasoning_content`,`reasoning`]},replay:{assistantReasoningField:`reasoning_content`}}],sources:[`https://docs.fireworks.ai/api-reference/post-chatcompletions`,`https://docs.fireworks.ai/guides/reasoning`],reviewedAt:`2026-08-18`,request:{serviceTierMap:{auto:null,standard:`default`,priority:`priority`}}},"huggingface-router":{id:`huggingface-router`,name:`Hugging Face Router`,aliases:[`huggingface-router`,`huggingface`,`hf-router`],transport:`openai-chat`,baseURL:`https://router.huggingface.co/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://huggingface.co/docs/inference-providers/en/index`,`https://huggingface.co/docs/inference-providers/en/tasks/chat-completion`],reviewedAt:`2026-08-18`},"amazon-bedrock":{id:`amazon-bedrock`,name:`Amazon Bedrock`,aliases:[`amazon-bedrock`,`bedrock`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions-mantle.html`,`https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html`],reviewedAt:`2026-08-17`,request:{serviceTierMap:{auto:null,standard:`default`,flex:`flex`,priority:`priority`}}},"azure-foundry":{id:`azure-foundry`,name:`Azure AI Foundry`,aliases:[`azure-foundry`,`azure-ai-foundry`,`microsoft-foundry`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`api-key-header`,header:`api-key`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://learn.microsoft.com/en-us/rest/api/microsoft-foundry/azureopenai/chat`,`https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/priority-processing`],reviewedAt:`2026-08-17`,request:{serviceTierMap:{auto:`auto`,standard:`default`,flex:`flex`,priority:`priority`}}},"vertex-ai":{id:`vertex-ai`,name:`Vertex AI OpenAI Compatibility`,aliases:[`vertex-ai`,`vertex-openai`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{exact:[`google/gemma-4-26b-a4b-it-maas`]},capabilities:{structuredOutputs:!1,structuredOutputModes:[`json_object`,`function`],thinking:!0},request:{defaultThinkingLevel:`max`,thinkingBoolean:{path:[`chat_template_kwargs`,`enable_thinking`]}},response:{reasoningFields:[`reasoning_content`]},replay:{assistantReasoningField:`reasoning_content`}},{match:{prefix:[`google/gemini-`,`gemini-`]},capabilities:{structuredOutputs:!0,structuredOutputModes:[`native`,`function`,`json_object`]}}],sources:[`https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/call-vertex-using-openai-library`,`https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/maas/capabilities/structured-output`,`https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/maas/capabilities/thinking`],reviewedAt:`2026-08-18`},databricks:{id:`databricks`,name:`Databricks Model Serving`,aliases:[`databricks`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.databricks.com/aws/en/machine-learning/model-serving/query-chat-models`,`https://docs.databricks.com/aws/en/machine-learning/foundation-model-apis/priority-mode`],reviewedAt:`2026-08-17`,request:{serviceTierMap:{auto:null,standard:`default`,priority:`priority`}}},baseten:{id:`baseten`,name:`Baseten Model APIs`,aliases:[`baseten`],transport:`openai-chat`,baseURL:`https://inference.baseten.co/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.baseten.co/inference/model-apis/overview`],reviewedAt:`2026-08-17`},groq:{id:`groq`,name:`Groq`,aliases:[`groq`],transport:`openai-chat`,baseURL:`https://api.groq.com/openai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{exact:[`openai/gpt-oss-20b`,`openai/gpt-oss-120b`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`high`,xhigh:`high`,max:`high`},unsupportedThinkingLevels:{none:`Groq GPT-OSS reasoning does not support the none effort level`}}},{match:{exact:[`qwen/qwen3.6-27b`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:`none`,minimal:`default`,low:`default`,medium:`default`,high:`default`,highest:`default`,xhigh:`default`,max:`default`}}}],sources:[`https://console.groq.com/docs/reasoning`,`https://console.groq.com/docs/api-reference`,`https://console.groq.com/docs/service-tiers`],reviewedAt:`2026-08-18`,request:{serviceTierMap:{auto:`auto`,standard:`on_demand`,flex:`flex`,priority:`performance`}}},cerebras:{id:`cerebras`,name:`Cerebras Inference`,aliases:[`cerebras`],transport:`openai-chat`,baseURL:`https://api.cerebras.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!0,thinking:!1,multiTurn:!0,structuredOutputModes:[`native`,`function`],serviceTiers:[`standard`,`flex`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{exact:[`gpt-oss-120b`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:null,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`high`,xhigh:`high`,max:`high`},unsupportedThinkingLevels:{none:`Cerebras GPT-OSS reasoning does not support the none effort level`}}},{match:{exact:[`gemma-4-31b`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:`none`,minimal:`high`,low:`high`,medium:`high`,high:`high`,highest:`high`,xhigh:`high`,max:`high`}}}],sources:[`https://inference-docs.cerebras.ai/capabilities/reasoning`,`https://inference-docs.cerebras.ai/api-reference/chat-completions`,`https://inference-docs.cerebras.ai/capabilities/service-tiers`],reviewedAt:`2026-08-18`,request:{serviceTierMap:{auto:`auto`,standard:`default`,flex:`flex`,priority:`priority`}}},deepinfra:{id:`deepinfra`,name:`DeepInfra`,aliases:[`deepinfra`],transport:`openai-chat`,baseURL:`https://api.deepinfra.com/v1/openai`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[`standard`,`priority`]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[{match:{prefix:[`deepseek-ai/DeepSeek-R1`]},capabilities:{thinking:!0,thinkingBudget:!0},request:{reasoning:`effort`,defaultThinkingLevel:`max`,effortMap:{none:`none`,minimal:`low`,low:`low`,medium:`medium`,high:`high`,highest:`high`,xhigh:`high`,max:`high`}}}],sources:[`https://docs.deepinfra.com/chat/reasoning`,`https://docs.deepinfra.com/api-reference/introduction`,`https://docs.deepinfra.com/chat/overview`],reviewedAt:`2026-08-18`,request:{serviceTierMap:{auto:null,standard:null,priority:`priority`}}},sambanova:{id:`sambanova`,name:`SambaNova Cloud`,aliases:[`sambanova`,`sambanova-cloud`],transport:`openai-chat`,baseURL:`https://api.sambanova.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.sambanova.ai/docs/en/api-reference/overview`],reviewedAt:`2026-08-17`},nebius:{id:`nebius`,name:`Nebius AI Studio`,aliases:[`nebius`],transport:`openai-chat`,baseURL:`https://api.tokenfactory.nebius.com/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://api.studio.nebius.com/docs`],reviewedAt:`2026-08-17`},novita:{id:`novita`,name:`Novita AI`,aliases:[`novita`,`novita-ai`],transport:`openai-chat`,baseURL:`https://api.novita.ai/v3/openai`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://novita.ai/docs/guides/llm-api`],reviewedAt:`2026-08-17`},hyperbolic:{id:`hyperbolic`,name:`Hyperbolic`,aliases:[`hyperbolic`],transport:`openai-chat`,baseURL:`https://api.hyperbolic.xyz/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.hyperbolic.xyz/docs/inference-api`],reviewedAt:`2026-08-17`},siliconflow:{id:`siliconflow`,name:`SiliconFlow`,aliases:[`siliconflow`],transport:`openai-chat`,baseURL:`https://api.siliconflow.com/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.siliconflow.com/en/userguide/quickstart`],reviewedAt:`2026-08-17`},friendli:{id:`friendli`,name:`FriendliAI`,aliases:[`friendli`,`friendli-ai`],transport:`openai-chat`,baseURL:`https://api.friendli.ai/serverless/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://friendli.ai/docs/guides/tool-calling`],reviewedAt:`2026-08-17`},"cloudflare-workers-ai":{id:`cloudflare-workers-ai`,name:`Cloudflare Workers AI`,aliases:[`cloudflare-workers-ai`,`workers-ai`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://developers.cloudflare.com/workers-ai/configuration/open-ai-compatibility/`],reviewedAt:`2026-08-17`},featherless:{id:`featherless`,name:`Featherless AI`,aliases:[`featherless`,`featherless-ai`],transport:`openai-chat`,baseURL:`https://api.featherless.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://featherless.ai/docs/quickstart-guide`],reviewedAt:`2026-08-17`},nscale:{id:`nscale`,name:`Nscale`,aliases:[`nscale`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.nscale.com/docs/use-cases/chat`],reviewedAt:`2026-08-17`},ovhcloud:{id:`ovhcloud`,name:`OVHcloud AI Endpoints`,aliases:[`ovhcloud`,`ovh`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.ovhcloud.com/en/guides/public-cloud/ai-machine-learning/ai-endpoints-capabilities`],reviewedAt:`2026-08-17`},scaleway:{id:`scaleway`,name:`Scaleway Generative APIs`,aliases:[`scaleway`],transport:`openai-chat`,baseURL:`https://api.scaleway.ai/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://www.scaleway.com/en/developers/api/generative-apis`],reviewedAt:`2026-08-17`},"nvidia-nim":{id:`nvidia-nim`,name:`NVIDIA NIM`,aliases:[`nvidia-nim`,`nim`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html`],reviewedAt:`2026-08-17`},"runpod-vllm":{id:`runpod-vllm`,name:`RunPod vLLM`,aliases:[`runpod-vllm`,`runpod`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!0},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.runpod.io/serverless/vllm/openai-compatibility`],reviewedAt:`2026-08-17`},"sagemaker-vllm":{id:`sagemaker-vllm`,name:`SageMaker vLLM`,aliases:[`sagemaker-vllm`,`sagemaker`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-openai-compatible.html`],reviewedAt:`2026-08-17`},vllm:{id:`vllm`,name:`vLLM`,aliases:[`vllm`],transport:`openai-chat`,baseURL:`http://localhost:8000/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.vllm.ai/en/latest/serving/openai_compatible_server/`],reviewedAt:`2026-08-17`},ollama:{id:`ollama`,name:`Ollama`,aliases:[`ollama`],transport:`openai-chat`,baseURL:`http://localhost:11434/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.ollama.com/api/openai-compatibility`],reviewedAt:`2026-08-17`},"lm-studio":{id:`lm-studio`,name:`LM Studio`,aliases:[`lm-studio`,`lmstudio`],transport:`openai-chat`,baseURL:`http://localhost:1234/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://lmstudio.ai/docs/developer/openai-compat`],reviewedAt:`2026-08-17`},"llama-cpp":{id:`llama-cpp`,name:`llama.cpp Server`,aliases:[`llama-cpp`,`llama.cpp`],transport:`openai-chat`,baseURL:`http://localhost:8080/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md`],reviewedAt:`2026-08-17`},localai:{id:`localai`,name:`LocalAI`,aliases:[`localai`,`local-ai`],transport:`openai-chat`,baseURL:`http://localhost:8080/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://localai.io/features/openai-functions/`],reviewedAt:`2026-08-17`},"baseten-engine":{id:`baseten-engine`,name:`Baseten Inference Engine`,aliases:[`baseten-engine`,`truss`],transport:`openai-chat`,baseURL:null,requiresApiURL:!0,auth:{type:`bearer`,required:!1},defaults:{model:``},capabilities:{functions:!0,streaming:!0,structuredOutputs:!1,thinking:!1,multiTurn:!0,structuredOutputModes:[`function`],serviceTiers:[]},operations:{chat:{path:`/chat/completions`,dialect:`openai-chat`}},modelRules:[],sources:[`https://docs.baseten.co/development/model/deployment/inference`],reviewedAt:`2026-08-17`},typesafe:{id:`typesafe`,name:`Typesafe`,aliases:[`typesafe`],transport:`typesafe-system-one`,baseURL:`https://api.typesafe.ai`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`jev-latest`},capabilities:{functions:!1,functionEmulation:!1,streaming:!1,structuredOutputs:!0,structuredOutputModes:[`native`],requiresStructuredOutput:!0,thinking:!1,multiTurn:!1,images:!0,serviceTiers:[]},operations:{chat:{path:`/v1/systemone`,dialect:`typesafe-system-one`}},modelRules:[],sources:[`https://github.com/typesafe-ai/typesafe-sdk-js`,`https://docs.typesafe.ai/sdk/javascript`],reviewedAt:`2026-10-15`},"openai-decisions":{id:`openai-decisions`,name:`OpenAI Decisions`,aliases:[`openai-decisions`],transport:`openai-decisions`,baseURL:`https://api.openai.com/v1`,requiresApiURL:!1,auth:{type:`bearer`,required:!0},defaults:{model:`gpt-6-luna`},capabilities:{functions:!1,functionEmulation:!1,streaming:!1,structuredOutputs:!0,structuredOutputModes:[`native`],requiresStructuredOutput:!0,thinking:!1,multiTurn:!1,images:!0,serviceTiers:[]},operations:{chat:{path:`/decisions`,dialect:`openai-decisions`}},modelRules:[],sources:[`https://developers.openai.com/api/docs/guides/decisions`,`https://github.com/openai/openai-node/blob/master/src/resources/decisions.ts`],reviewedAt:`2026-10-07`}},mT={openai:`openai`,"openai-compatible":`openai-compatible`,openai_compatible:`openai-compatible`,compatible:`openai-compatible`,"openai-responses":`openai-responses`,openai_responses:`openai-responses`,responses:`openai-responses`,anthropic:`anthropic`,claude:`anthropic`,"google-gemini":`google-gemini`,google_gemini:`google-gemini`,gemini:`google-gemini`,webllm:`webllm`,"azure-openai":`azure-openai`,azure_openai:`azure-openai`,azure:`azure-openai`,deepseek:`deepseek`,"deepseek-responses":`deepseek-responses`,deepseek_responses:`deepseek-responses`,meta:`meta`,"meta-responses":`meta`,meta_responses:`meta`,"meta-chat":`meta-chat`,meta_chat:`meta-chat`,"meta-messages":`meta-messages`,meta_messages:`meta-messages`,mistral:`mistral`,cohere:`cohere`,grok:`grok`,xai:`grok`,"x-grok":`grok`,x_grok:`grok`,reka:`reka`,together:`together`,"together-ai":`together`,together_ai:`together`,openrouter:`openrouter`,orcarouter:`orcarouter`,fireworks:`fireworks`,"fireworks-ai":`fireworks`,"huggingface-router":`huggingface-router`,huggingface:`huggingface-router`,"hf-router":`huggingface-router`,"amazon-bedrock":`amazon-bedrock`,bedrock:`amazon-bedrock`,"azure-foundry":`azure-foundry`,"azure-ai-foundry":`azure-foundry`,"microsoft-foundry":`azure-foundry`,"vertex-ai":`vertex-ai`,"vertex-openai":`vertex-ai`,databricks:`databricks`,baseten:`baseten`,groq:`groq`,cerebras:`cerebras`,deepinfra:`deepinfra`,sambanova:`sambanova`,"sambanova-cloud":`sambanova`,nebius:`nebius`,novita:`novita`,"novita-ai":`novita`,hyperbolic:`hyperbolic`,siliconflow:`siliconflow`,friendli:`friendli`,"friendli-ai":`friendli`,"cloudflare-workers-ai":`cloudflare-workers-ai`,"workers-ai":`cloudflare-workers-ai`,featherless:`featherless`,"featherless-ai":`featherless`,nscale:`nscale`,ovhcloud:`ovhcloud`,ovh:`ovhcloud`,scaleway:`scaleway`,"nvidia-nim":`nvidia-nim`,nim:`nvidia-nim`,"runpod-vllm":`runpod-vllm`,runpod:`runpod-vllm`,"sagemaker-vllm":`sagemaker-vllm`,sagemaker:`sagemaker-vllm`,vllm:`vllm`,ollama:`ollama`,"lm-studio":`lm-studio`,lmstudio:`lm-studio`,"llama-cpp":`llama-cpp`,"llama.cpp":`llama-cpp`,localai:`localai`,"local-ai":`localai`,"baseten-engine":`baseten-engine`,truss:`baseten-engine`,typesafe:`typesafe`,"openai-decisions":`openai-decisions`},hT=/* @__PURE__ */ `openai.openai-compatible.openai-responses.anthropic.google-gemini.webllm.azure-openai.deepseek.deepseek-responses.meta.meta-chat.meta-messages.mistral.cohere.grok.reka.together.openrouter.orcarouter.fireworks.huggingface-router.amazon-bedrock.azure-foundry.vertex-ai.databricks.baseten.groq.cerebras.deepinfra.sambanova.nebius.novita.hyperbolic.siliconflow.friendli.cloudflare-workers-ai.featherless.nscale.ovhcloud.scaleway.nvidia-nim.runpod-vllm.sagemaker-vllm.vllm.ollama.lm-studio.llama-cpp.localai.baseten-engine.typesafe.openai-decisions`.split(`.`),gT=/* @__PURE__ */ function(e){return e.Grok46=`grok-4.6`,e.Grok45=`grok-4.5`,e.Grok45Latest=`grok-4.5-latest`,e.GrokBuildLatest=`grok-build-latest`,e.Grok43=`grok-4.3`,e.Grok43Latest=`grok-4.3-latest`,e.GrokLatest=`grok-latest`,e.Grok420Reasoning=`grok-4.20-reasoning`,e.Grok420Reasoning0309=`grok-4.20-0309-reasoning`,e.Grok420NonReasoning=`grok-4.20-non-reasoning`,e.Grok420NonReasoning0309=`grok-4.20-0309-non-reasoning`,e.Grok420MultiAgent=`grok-4.20-multi-agent`,e.Grok420MultiAgent0309=`grok-4.20-multi-agent-0309`,e.Grok41FastReasoning=`grok-4-1-fast-reasoning`,e.Grok41FastNonReasoning=`grok-4-1-fast-non-reasoning`,e.GrokVoiceThinkFast=`grok-voice-think-fast-1.0`,e.GrokVoiceFast=`grok-voice-fast-1.0`,e.Grok3=`grok-3`,e.Grok3Mini=`grok-3-mini`,e.Grok3Fast=`grok-3-fast`,e.Grok3MiniFast=`grok-3-mini-fast`,e}({}),_T=/* @__PURE__ */ function(e){return e.GrokEmbedSmall=`grok-embed-small`,e}({}),vT=()=>({input:{format:`pcm16`,mimeType:`audio/pcm`,sampleRate:24e3,channels:1},output:{enabled:!0,voice:`eve`,format:`pcm16`,mimeType:`audio/pcm`,sampleRate:24e3,channels:1,includeTranscript:!0},live:{turnTimeoutMs:3e4}}),yT=()=>structuredClone({model:`grok-4.6`,...Pb()}),bT=()=>structuredClone({...yT(),model:`grok-4.6`}),xT=()=>structuredClone({...Pb(),model:`grok-voice-think-fast-1.0`,audio:vT(),stream:!1}),ST=e=>e===`grok-voice-think-fast-1.0`||e===`grok-voice-fast-1.0`||e.startsWith(`grok-voice-`),CT=(e,t)=>Qx(Qx(vT(),e),t),wT=(e,t,n)=>ST(e)&&$x(CT(t,n)),TT=e=>BC({...e,apiName:`grok-realtime-audio`,providerName:`Grok Realtime`,wsURL:e=>`wss://api.x.ai/v1/realtime?model=${encodeURIComponent(e)}`,createSessionUpdate:({request:e,audio:t})=>{let n=e.messages.filter(e=>e.role===`system`).map(e=>e.content).join(`
|
|
859
859
|
`),r=t.input,i=t.output;return{type:`session.update`,session:{voice:typeof i?.voice==`object`?i.voice.id:i?.voice??`eve`,...n?{instructions:n}:{},turn_detection:null,audio:{input:{format:{type:`audio/pcm`,rate:r?.sampleRate??24e3}},output:{format:{type:`audio/pcm`,rate:i?.sampleRate??24e3}}}}}}}),ET=pT,DT=mT,OT=()=>hT.map(e=>{let t=ET[e];return{id:e,name:t.name,aliases:t.aliases,transport:t.transport,...t.baseURL?{baseURL:t.baseURL}:{},requiresApiURL:t.requiresApiURL,...t.endpoint?{endpoint:t.endpoint}:{},...t.defaults.model?{defaultModel:t.defaults.model}:{},...t.defaults.embedModel?{defaultEmbedModel:t.defaults.embedModel}:{},authentication:t.auth,operations:t.operations,modelRules:t.modelRules,capabilities:t.capabilities,...t.request?.unsupportedThinkingLevels?{unsupportedThinkingLevels:Object.keys(t.request.unsupportedThinkingLevels)}:{},sources:t.sources,reviewedAt:t.reviewedAt}}),kT={id:`chrome-ai`,name:`Chrome Built-in AI`,aliases:[`chrome`,`chrome-ai`,`prompt-api`,`gemini-nano`],transport:`chrome-ai`,baseURL:null,requiresApiURL:!1,defaults:{model:`gemini-nano`},auth:{type:`none`,required:!1},operations:{chat:{path:``,dialect:`chrome-ai`}},modelRules:[],capabilities:{functions:!1,streaming:!0,structuredOutputs:!0,structuredOutputModes:[`native`],thinking:!1,multiTurn:!0},sources:[],reviewedAt:`2026-10-02`},AT=e=>{let t=MT(e);return t.id===`chrome-ai`?{id:`chrome-ai`,name:t.name,aliases:t.aliases,transport:t.transport,requiresApiURL:!1,defaultModel:t.defaults.model,authentication:t.auth,operations:t.operations,modelRules:t.modelRules,capabilities:t.capabilities,sources:t.sources,reviewedAt:t.reviewedAt}:OT().find(e=>e.id===t.id)},jT=e=>{if(e.toLowerCase()===`chrome-ai`||e.toLowerCase()===`chrome`||e.toLowerCase()===`prompt-api`||e.toLowerCase()===`gemini-nano`)return`chrome-ai`;let t=DT[e.toLowerCase()];if(!t)throw Error(`Unknown AI profile "${e}". Use one of: ${hT.join(`, `)}`);return t},MT=e=>e.toLowerCase()===`chrome-ai`||e.toLowerCase()===`chrome`||e.toLowerCase()===`prompt-api`||e.toLowerCase()===`gemini-nano`?kT:ET[jT(e)],NT=(e,t)=>(t.match.exact?.includes(e)??!1)||(t.match.prefix?.some(t=>e.startsWith(t))??!1)||(t.match.contains?.some(t=>e.toLowerCase().includes(t.toLowerCase()))??!1),PT=(e,t)=>e.modelRules.find(e=>NT(t,e)),FT=e=>({images:{supported:e.images??!1,formats:e.images?[`image/jpeg`,`image/png`]:[]},audio:{supported:e.audio??!1,formats:e.audio?[`wav`,`mp3`,`pcm16`]:[],output:{supported:e.audioOutput??!1,formats:e.audioOutput?[`wav`,`mp3`,`pcm16`]:[]}},files:e.files?{supported:!0,formats:[`application/pdf`,`text/plain`],uploadMethod:e.files.uploadMethod}:{supported:!1,formats:[],uploadMethod:`none`},urls:{supported:!1,webSearch:e.webSearch??!1,contextFetching:!1}}),IT=(e,t)=>{let n=MT(e),r=PT(n,t),i={...n.capabilities,...r?.capabilities};return{functions:i.functions,functionEmulation:i.functionEmulation,requiresStructuredOutput:i.requiresStructuredOutput,streaming:i.streaming,structuredOutputs:i.structuredOutputs,structuredOutputModes:i.structuredOutputModes,hasThinkingBudget:i.thinkingBudget??i.thinking??!1,hasShowThoughts:i.showThoughts??i.thinking??!1,media:FT(i),caching:i.caching?{supported:!0,types:[...i.caching.types],cacheBreakpoints:i.caching.cacheBreakpoints}:{supported:!1,types:[]},thinking:i.thinking,multiTurn:i.multiTurn,serviceTiers:i.serviceTiers??[]}},LT=e=>{let t=e.modelRules.flatMap(e=>e.response?.reasoningFields??[]),n=e.modelRules.flatMap(e=>e.response?.reasoningDetailsFields??[]),r=e.modelRules.find(e=>e.replay?.assistantReasoningField)?.replay?.assistantReasoningField,i=e.modelRules.find(e=>e.replay?.assistantReasoningDetailsField)?.replay?.assistantReasoningDetailsField;return!r&&!i&&t.length===0&&n.length===0?`none`:{...r||t[0]?{assistantField:r??t[0]}:{},responseFields:[...new Set(t)],...i?{assistantDetailsField:i}:{},responseDetailsFields:[...new Set(n)]}},RT=e=>{let t=e.messages;if(Array.isArray(t))for(let e of t){if(!e||typeof e!=`object`)continue;let t=e.content;if(Array.isArray(t))for(let e of t){if(!e||typeof e!=`object`)continue;let t=e;if(t.type!==`image_url`)continue;let n=t.image_url;typeof n==`string`?t.image_url={url:n}:n&&typeof n==`object`&&(t.image_url={url:n.url})}}},zT=e=>Array.isArray(e)?e.map(zT):!e||typeof e!=`object`?e:Object.fromEntries(Object.entries(e).map(([e,t])=>[e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),zT(t)])),BT=(e,t,n)=>{if(!t)return;let r=n.thinkingTokenBudget??(typeof e.reasoning_effort==`string`?e.reasoning_effort:t.defaultThinkingLevel),i=r?t.unsupportedThinkingLevels?.[r]:void 0;if(i)throw Error(i);let a=r?t.effortMap?.[r]:void 0;r&&t.effortMap&&(a===null?delete e.reasoning_effort:a!==void 0&&(e.reasoning_effort=a));let o=r!==void 0&&r!==`none`&&(a!==null||!t.effortMap),s=r!==void 0&&a!==null;if(t.thinkingBoolean){let n=e,i=t.thinkingBoolean.path;for(let e of i.slice(0,-1)){let t=n[e],r=t&&typeof t==`object`&&!Array.isArray(t)?{...t}:{};n[e]=r,n=r}n[i[i.length-1]]=r!==`none`}if(t.reasoning===`thinking-object`?e.thinking={type:o?`enabled`:`disabled`}:t.reasoning===`openrouter`&&(s&&typeof e.reasoning_effort==`string`&&(e.reasoning={effort:e.reasoning_effort}),delete e.reasoning_effort),t.toolChoice===`unforced`){let t=e.tool_choice,r=t&&typeof t==`object`?t.type:void 0,i=t&&typeof t==`object`?t.name??t.function?.name:void 0,a=n.functionCallSource===`ax`&&i===`__axOutput`;if(t===`required`||t!==void 0&&t!==`auto`&&t!==`none`&&r!==`auto`&&!a)throw Error(`This deployment profile does not support explicitly forced tool choices`);t===`none`&&delete e.tools,delete e.tool_choice}else if(t.toolChoice===`no-named`){let t=e.tool_choice;if(t&&typeof t==`object`&&[`tool`,`function`].includes(String(t.type??``))){let r=t,i=r.name??r.function?.name,a=Array.isArray(e.tools)?e.tools.filter(e=>(e.name??e.function?.name)===`__axOutput`):[];if(n.functionCallSource!==`ax`||i!==`__axOutput`||a.length!==1)throw Error(`This deployment profile does not support explicitly named tool choices`);e.tools=a,e.tool_choice=r.type===`tool`?{type:`any`}:`required`}}if(o)for(let n of t.dropWhenThinking??[])delete e[n];for(let n of t.dropFields??[])delete e[n];for(let[n,r]of Object.entries(t.copyFields??{}))e[n]!==void 0&&(e[r]=e[n]);for(let[n,r]of Object.entries(t.renameFields??{}))e[n]!==void 0&&(e[r]=e[n],delete e[n]);for(let[n,r]of Object.entries(t.enumMaps??{})){let t=e[n];typeof t==`string`&&t in r&&(e[n]=r[t])}for(let[n,r]of Object.entries(t.constructObjects??{})){let t=Object.fromEntries(Object.entries(r).filter(([,t])=>e[t]!==void 0).map(([t,n])=>[t,e[n]]));Object.keys(t).length>0&&(e[n]=t)}if(t.imageURLShape===`object`&&RT(e),t.optionDialect===`search-parameters`){let t=n.searchParameters??n.search_parameters;t!==void 0&&(e.search_parameters=zT(t))}},VT=e=>Array.isArray(e)?e.map(VT):!e||typeof e!=`object`?e:Object.fromEntries(Object.entries(e).filter(([e])=>e!==`cache_control`).map(([e,t])=>[e,VT(t)])),HT=(e,t,n)=>{let r=n?.find(e=>e.name===t||e.aliases?.includes(t))?.supported;if(!r)return e;let i=r.thinkingBudget!==void 0||r.showThoughts!==void 0,a=e.structuredOutputModes;if(r.structuredOutputModes!==void 0)a=[...r.structuredOutputModes];else if(r.structuredOutputs!==void 0){let e=(a??[]).filter(e=>e!==`native`);a=r.structuredOutputs?[`native`,...e]:e}return{...e,hasThinkingBudget:r.thinkingBudget??e.hasThinkingBudget??!1,hasShowThoughts:r.showThoughts??e.hasShowThoughts??!1,structuredOutputs:a?a.includes(`native`):r.structuredOutputs??e.structuredOutputs??!1,...a?{structuredOutputModes:a}:{},thinking:i?!!(r.thinkingBudget||r.showThoughts):e.thinking,serviceTiers:r.serviceTiers===void 0?e.serviceTiers:[...r.serviceTiers]}},UT=(e,t,n,r,i)=>{let a={...t},o=String(t.model),s=PT(e,o),c=HT(GT(e,IT(e.id,o),i),o,r),l=n.serviceTier??a.service_tier;delete a.service_tier;let u=gw({requested:l,supported:c.serviceTiers,mapping:s?.request?.serviceTierMap??e.request?.serviceTierMap,provider:e.id,model:o});if(u!==void 0&&(a.service_tier=u),n.thinkingTokenBudget&&n.thinkingTokenBudget!==`none`&&!c.thinking)throw Error(`Thinking is not verified for profile ${e.id} and model ${o}; add an exact modelInfo override to opt in`);let d=a.response_format;if(d?.type===`json_schema`&&!c.structuredOutputs)throw Error(`Structured output is not verified for profile ${e.id} and model ${o}: native JSON Schema is unsupported`);if(d?.type===`json_object`&&!c.structuredOutputModes?.includes(`json_object`))throw Error(`Structured output is not verified for profile ${e.id} and model ${o}: JSON object mode is unsupported`);return BT(a,e.request,n),BT(a,s?.request,n),a},WT=(e,t)=>{if(typeof t.apiURL==`string`&&t.apiURL.length>0)return t.apiURL;if(e.endpoint){let n={...e.endpoint.defaults};for(let[r,i]of Object.entries(e.endpoint.fields??{}))for(let e of i)t[e]!==void 0&&t[e]!==``&&(n[r]=t[e]);for(let t of e.endpoint.required)if(n[t]===void 0||n[t]===``)throw Error(`${e.name} endpoint field ${t} is required`);let r=String(n[e.endpoint.hostField]),i=r.includes(`://`)?r.replace(/\/$/,``):`${e.endpoint.scheme??`https`}://${r}${e.endpoint.hostSuffix}`,a=e.endpoint.path;for(let[t,r]of Object.entries(n)){let i=String(r);e.endpoint.normalizers?.[t]===`api-version`&&(i=new URLSearchParams(i.includes(`api-version=`)?i:``).get(`api-version`)??i),a=a.replaceAll(`{${t}}`,encodeURIComponent(i)),n[t]=i}let o=new URL(`${i}${a}`);if(e.endpoint.apiVersionField){let t=e.endpoint.apiVersionField,r=e.endpoint.normalizers?.[t],i=n[t];r&&i!==void 0&&i!==``&&o.searchParams.set(r,String(i))}return o.toString().replace(/\/$/,``)}if(e.baseURL)return e.baseURL;throw Error(`${e.name} requires apiURL`)},GT=(e,t,n)=>{let r=e.capabilityGates?.structuredOutputs;if(!r)return t;let i=(String(n[r.option]??``).match(/\d{4}-\d{2}-\d{2}/)?.[0]??``)>=r.min,a=(t.structuredOutputModes??[]).filter(e=>e!==`native`);return{...t,structuredOutputs:i,structuredOutputModes:i?[`native`,...a]:a}},KT=(e,t,n)=>{if(e.auth.required&&!t&&!n)throw Error(`${e.name} API key not set`);return t??``},qT=e=>e?.map(e=>{let t=e;return t.config?{...e,modelConfig:{...t.config,...t.modelConfig},...t.config.serviceTier===void 0?{}:{serviceTier:mw(t.config.serviceTier)}}:e}),JT=(e,t)=>!t||e.auth.type===`none`?{}:e.auth.type===`api-key-header`?{[e.auth.header??`api-key`]:t}:e.auth.type===`x-api-key`?{"x-api-key":t}:{Authorization:`Bearer ${t}`};var YT=class extends Xw{profileSpec;profileApiURL;constructor(e){let t=MT(e.name);if(t.transport!==`openai-chat`)throw Error(`${t.id} is not an OpenAI Chat profile`);let n=KT(t,e.apiKey,e.credentialProvider),r=WT(t,e),i={model:t.defaults.model,...t.defaults.embedModel?{embedModel:t.defaults.embedModel}:{},...Pb(),...e.config},a=t.operations.realtime?.dialect===`xai-realtime`?{apiName:`${t.name} Realtime`,shouldUse:wT,resolveAudioConfig:CT,createApi:TT}:void 0;super({apiKey:n||`local-no-key`,credentialProvider:e.credentialProvider,credentialProfile:t.id,apiURL:r,config:i,options:e.options,modelInfo:e.modelInfo??(t.id===`meta-chat`?sC:[]),models:qT(e.models),supportFor:n=>HT(GT(t,IT(t.id,n),e),n,e.modelInfo??(t.id===`meta-chat`?sC:void 0)),reasoningContentMode:LT(t),realtime:a,promptCaching:t.id===`meta-chat`,promptCachingAllModels:t.id===`meta-chat`,promptCacheBreakpoints:t.id!==`meta-chat`,chatReqUpdater:(n,r)=>UT(t,n,{...e.options??{},...r},e.modelInfo,e)}),this.setName(t.name),this.setHeaders(async()=>JT(t,n)),this.setExplicitModelConfigKeys(e.config),this.profileSpec=t,this.profileApiURL=r}async transcribe(e,t){let n=this.profileSpec.operations.transcribe;if(!n)throw Error(`Transcription is not supported by profile ${this.profileSpec.id}`);let r=this.getOptions(),i=typeof e.model==`string`?e.model:void 0,a=n.dialect===`xai-transcription`?{language:e.language,keyterm:e.prompt,format:!0}:{model:i,language:e.language,prompt:e.prompt,temperature:e.temperature,response_format:e.responseFormat??`json`};return await Jx({url:`${this.profileApiURL.replace(/\/$/,``)}${n.path}`,headers:await this.buildHeaders({},{operation:`transcribe`,method:`POST`,url:`${this.profileApiURL.replace(/\/$/,``)}${n.path}`}),audio:e.audio,fields:a,fetch:t?.fetch??r.fetch,abortSignal:t?.abortSignal??r.abortSignal})}async speak(e,t){let n=this.profileSpec.operations.speak;if(!n)throw Error(`Speech is not supported by profile ${this.profileSpec.id}`);let r=this.getOptions(),i=e.format??`mp3`,a=typeof e.model==`string`?e.model:void 0,o=typeof e.voice==`object`?e.voice.id:e.voice,s;if(n.dialect===`xai-speech`){let t=i===`pcm16`||i===`raw`?`pcm`:i===`ulaw`?`mulaw`:i;s={text:e.text,voice_id:o??`eve`,language:e.language??`auto`,output_format:{codec:t,...e.sampleRate?{sample_rate:e.sampleRate}:{}},...e.speed===void 0?{}:{speed:e.speed}}}else s=n.dialect===`mistral-speech`?{model:a??`voxtral-mini-tts-2603`,input:e.text,response_format:i,...o?{voice_id:o}:{}}:{model:a,input:e.text,voice:o??`alloy`,response_format:i===`pcm16`?`pcm`:i,...e.speed===void 0?{}:{speed:e.speed}};return await Yx({url:`${this.profileApiURL.replace(/\/$/,``)}${n.path}`,headers:await this.buildHeaders({},{operation:`speak`,method:`POST`,url:`${this.profileApiURL.replace(/\/$/,``)}${n.path}`}),body:s,format:i,transcript:e.text,fetch:t?.fetch??r.fetch,abortSignal:t?.abortSignal??r.abortSignal})}},XT=class extends dT{profileSpec;profileApiURL;constructor(e){let t=MT(e.name);if(t.transport!==`openai-responses`)throw Error(`${t.id} is not an OpenAI Responses profile`);let n=KT(t,e.apiKey,e.credentialProvider),r=WT(t,e),i={model:t.defaults.model,...t.defaults.embedModel?{embedModel:t.defaults.embedModel}:{},stream:!0,...e.config};if(t.id===`meta`){i.promptCaching=!1;let e=i;e.store??=!1,e.includeEncryptedReasoning??=!0,e.rejectReasoningNone??=!0,e.highestReasoningEffort??=`xhigh`,i.defaultImageOutputFormat=`webp`,e.reasoningEffortMap??={minimal:`minimal`,low:`low`,medium:`medium`,high:`high`,highest:`xhigh`}}super({apiKey:n||`local-no-key`,credentialProvider:e.credentialProvider,credentialProfile:t.id,apiURL:r,config:i,options:e.options,modelInfo:e.modelInfo??(t.id===`meta`?lC:[]),models:e.models,supportFor:n=>HT(GT(t,IT(t.id,n),e),n,e.modelInfo??(t.id===`meta`?lC:void 0)),realtime:t.id===`meta`?{shouldUse:e=>e===`muse-voice-transcribe-1.0`,createApi:n=>fw(n,i.realtimeTranscription,e.credentialProvider?async()=>{let n=`${r.replace(/^http/,`ws`).replace(/\/$/,``)}/asr/realtime`,i=await e.credentialProvider({profile:t.id,operation:`realtime`,method:`WS`,url:n}),a=i.Authorization??i.authorization;if(!a)throw Error(`Meta realtime credential provider must return an Authorization header`);return a.replace(/^Bearer\s+/i,``)}:void 0,`${r.replace(/^http/,`ws`).replace(/\/$/,``)}/asr/realtime`)}:void 0,responsesReqUpdater:(n,r)=>{let a={...n},o=String(n.model);if(t.id===`meta`&&o===`muse-image-1.0`){if(n.tools?.filter(e=>e.type===`function`)?.length)throw Error(`muse-image-1.0 only permits the image_generation tool`);let e=i.imageGeneration;if(a.tools=[{type:`image_generation`,...e?.size?{size:e.size}:{},output_format:e?.outputFormat??`webp`,...e?.enableImageSearch===void 0?{}:{enable_image_search:e.enableImageSearch},...e?.enableWebSearch===void 0?{}:{enable_web_search:e.enableWebSearch},...e?.enableShell===void 0?{}:{enable_shell:e.enableShell},...e?.reasoningStrength?{reasoning_strength:e.reasoningStrength}:{}}],delete a.tool_choice,delete a.include,delete a.reasoning,Array.isArray(n.input)){let e=n.input.filter(e=>typeof e==`string`||e.type!==`reasoning`);a.input=e;for(let t of e)if(t&&typeof t!=`string`){if(t.type!==`message`&&t.type!==`image_generation_call`)throw Error(`muse-image-1.0 accepts only text, reference images, and prior generated images`);if(t.type===`message`&&Array.isArray(t.content)){let e=t.content.find(e=>e.type!==`input_text`&&e.type!==`input_image`&&e.type!==`output_text`);if(e)throw Error(`muse-image-1.0 does not support ${e.type} input`)}}}}let s=HT(GT(t,IT(t.id,o),e),o,e.modelInfo),c=gw({requested:a.service_tier,supported:s.serviceTiers,mapping:t.request?.serviceTierMap,provider:t.id,model:o});if(delete a.service_tier,c!==void 0&&(a.service_tier=c),BT(a,t.request,r),t.request?.reasoningObjectFields&&a.reasoning){let e=a.reasoning;a.reasoning=Object.fromEntries(t.request.reasoningObjectFields.filter(t=>e[t]!==void 0).map(t=>[t,e[t]]))}return a}}),this.setName(t.name),this.setHeaders(async()=>JT(t,n)),this.setExplicitModelConfigKeys(e.config),this.profileSpec=t,this.profileApiURL=r}async transcribe(e,t){let n=this.profileSpec.operations.transcribe;if(!n)throw Error(`Transcription is not supported by profile ${this.profileSpec.id}`);if(n.dialect!==`meta-transcription`)throw Error(`Unsupported transcription dialect ${n.dialect}`);let r=new URL(`${this.profileApiURL.replace(/\/$/,``)}${n.path}`);e.sessionId&&r.searchParams.set(`sessionId`,e.sessionId);let i=r.toString(),a=this.getOptions();if(e.audio.format!==`wav`&&!e.audio.mimeType?.toLowerCase().includes(`wav`))throw Error(`Meta Voice batch transcription requires WAV audio`);if(e.audio.channels!==void 0&&e.audio.channels!==1)throw Error(`Meta Voice batch transcription requires mono audio`);if(e.audio.sampleRate!==void 0&&e.audio.sampleRate!==16e3&&e.audio.sampleRate!==24e3)throw Error(`Meta Voice batch transcription requires 16000 Hz or 24000 Hz audio`);if(e.language||e.prompt)throw Error(`Meta Voice uses languageBias and keywords instead of language or prompt`);let o=typeof e.model==`string`?e.model:`muse-voice-transcribe-1.0`;if(o!==`muse-voice-transcribe-1.0`)throw Error(`Meta Voice transcribe requires muse-voice-transcribe-1.0`);return await qx({url:i,headers:await this.buildHeaders({},{operation:`transcribe`,method:`POST`,url:i}),audio:e.audio,request:{model:o,audioEncoding:`WAV`,...e.mode?{mode:e.mode.toUpperCase()}:{},...e.languageBias?.length?{languageBias:e.languageBias}:{},...e.keywords?.length?{keywords:e.keywords}:{},...e.partialMode?{partialMode:e.partialMode.toUpperCase()}:{},...e.emitAudioProgress===void 0?{}:{emitAudioProgress:e.emitAudioProgress}},partialMode:e.partialMode,sessionId:e.sessionId,acceptEventStream:e.partialMode!==void 0||e.emitAudioProgress===!0,fetch:t?.fetch??a.fetch,abortSignal:t?.abortSignal??a.abortSignal})}},ZT=class extends Ex{constructor(e){let t=MT(e.name);if(t.transport!==`anthropic-messages`)throw Error(`${t.id} is not an Anthropic Messages profile`);if(t.id!==`meta-messages`)throw Error(`Unsupported Anthropic Messages profile ${t.id}`);if(t.auth.required&&!e.apiKey&&!e.credentialProvider)throw Error(`${t.name} API key not set`);let n=WT(t,e),r=e.apiKey;super({apiKey:r,credentialProvider:e.credentialProvider,config:e.config,options:e.options,models:e.models,_profile:{id:t.id,name:t.name,apiURL:n,headers:async()=>JT(t,r??``),defaultModel:t.defaults.model,modelInfo:e.modelInfo??cC,supportFor:n=>HT(IT(t.id,n),n,e.modelInfo??cC),supportsToolChoiceNone:!0,requestUpdater:(e,n)=>{let r={...e},i=n.thinkingTokenBudget;if(i===`none`)throw Error(`Meta Muse Spark does not support reasoning level none`);if((i||r.thinking)&&(r.thinking={type:`adaptive`,display:n.showThoughts===!1?`omitted`:`summarized`}),i){let e=i===`minimal`?`low`:i===`highest`?`xhigh`:i;r.output_config={...r.output_config??{},effort:e}}return BT(r,t.request,n),delete r.reasoning_effort,delete r.stop_sequences,delete r.top_k,VT(r)}}})}};let QT=/* @__PURE__ */ function(e){return e.RekaCore=`reka-core`,e.RekaFlash=`reka-flash`,e.RekaEdge=`reka-edge`,e}({}),$T=[{name:`reka-core`,currency:`usd`,promptTokenCostPer1M:3,completionTokenCostPer1M:15},{name:`reka-flash`,currency:`usd`,promptTokenCostPer1M:.8,completionTokenCostPer1M:2},{name:`reka-edge`,currency:`usd`,promptTokenCostPer1M:.4,completionTokenCostPer1M:1}],eE=/* @__PURE__ */ function(e){return e.Llama31_8B_Instruct=`Llama-3.1-8B-Instruct-q4f32_1-MLC`,e.Llama31_70B_Instruct=`Llama-3.1-70B-Instruct-q4f16_1-MLC`,e.Llama32_1B_Instruct=`Llama-3.2-1B-Instruct-q4f32_1-MLC`,e.Llama32_3B_Instruct=`Llama-3.2-3B-Instruct-q4f32_1-MLC`,e.Mistral7B_Instruct=`Mistral-7B-Instruct-v0.3-q4f32_1-MLC`,e.Phi35_Mini_Instruct=`Phi-3.5-mini-instruct-q4f32_1-MLC`,e.Gemma2_2B_Instruct=`gemma-2-2b-it-q4f32_1-MLC`,e.Gemma2_9B_Instruct=`gemma-2-9b-it-q4f32_1-MLC`,e.Qwen2_5_0_5B_Instruct=`Qwen2.5-0.5B-Instruct-q4f32_1-MLC`,e.Qwen2_5_1_5B_Instruct=`Qwen2.5-1.5B-Instruct-q4f32_1-MLC`,e.Qwen2_5_3B_Instruct=`Qwen2.5-3B-Instruct-q4f32_1-MLC`,e.Qwen2_5_7B_Instruct=`Qwen2.5-7B-Instruct-q4f32_1-MLC`,e}({}),tE=[{name:`Llama-3.1-8B-Instruct-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:128e3,maxTokens:4096},{name:`Llama-3.1-70B-Instruct-q4f16_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:128e3,maxTokens:4096,isExpensive:!0},{name:`Llama-3.2-1B-Instruct-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:128e3,maxTokens:2048},{name:`Llama-3.2-3B-Instruct-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:128e3,maxTokens:2048},{name:`Mistral-7B-Instruct-v0.3-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:32768,maxTokens:4096},{name:`Phi-3.5-mini-instruct-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:128e3,maxTokens:4096},{name:`gemma-2-2b-it-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:8192,maxTokens:2048},{name:`gemma-2-9b-it-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:8192,maxTokens:2048},{name:`Qwen2.5-0.5B-Instruct-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:32768,maxTokens:2048},{name:`Qwen2.5-1.5B-Instruct-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:32768,maxTokens:2048},{name:`Qwen2.5-3B-Instruct-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:32768,maxTokens:2048},{name:`Qwen2.5-7B-Instruct-q4f32_1-MLC`,currency:`usd`,promptTokenCostPer1M:0,completionTokenCostPer1M:0,contextWindow:32768,maxTokens:4096}],nE=[{name:`grok-4.6`,currency:`USD`,supported:{thinkingBudget:!0,structuredOutputs:!0}},{name:`grok-4.5`,currency:`USD`,promptTokenCostPer1M:2,cacheReadTokenCostPer1M:.3,completionTokenCostPer1M:6,contextWindow:5e5,aliases:[`grok-4.5-latest`,`grok-build-latest`],supported:{thinkingBudget:!0,structuredOutputs:!0}},{name:`grok-4.3`,currency:`USD`,promptTokenCostPer1M:1.25,cacheReadTokenCostPer1M:.2,completionTokenCostPer1M:2.5,contextWindow:1e6,aliases:[`grok-4.3-latest`,`grok-latest`],supported:{thinkingBudget:!0,structuredOutputs:!0}},{name:`grok-4.20-reasoning`,currency:`USD`,promptTokenCostPer1M:1.25,cacheReadTokenCostPer1M:.2,completionTokenCostPer1M:2.5,contextWindow:2e6,aliases:[`grok-4.20-0309-reasoning`,`grok-4.20-reasoning-latest`,`grok-4.20`,`grok-4.20-0309`],supported:{structuredOutputs:!0}},{name:`grok-4.20-non-reasoning`,currency:`USD`,promptTokenCostPer1M:1.25,cacheReadTokenCostPer1M:.2,completionTokenCostPer1M:2.5,contextWindow:2e6,aliases:[`grok-4.20-0309-non-reasoning`,`grok-4.20-non-reasoning-latest`],supported:{structuredOutputs:!0}},{name:`grok-4.20-multi-agent`,currency:`USD`,promptTokenCostPer1M:1.25,cacheReadTokenCostPer1M:.2,completionTokenCostPer1M:2.5,contextWindow:2e6,aliases:[`grok-4.20-multi-agent-0309`,`grok-4.20-multi-agent-latest`],supported:{structuredOutputs:!0}},{name:`grok-4-1-fast-reasoning`,currency:`USD`,promptTokenCostPer1M:.2,cacheReadTokenCostPer1M:.05,completionTokenCostPer1M:.5,contextWindow:2e6,aliases:[`grok-4-1-fast-reasoning-latest`],supported:{structuredOutputs:!0}},{name:`grok-4-1-fast-non-reasoning`,currency:`USD`,promptTokenCostPer1M:.2,cacheReadTokenCostPer1M:.05,completionTokenCostPer1M:.5,contextWindow:2e6,aliases:[`grok-4-1-fast-non-reasoning-latest`],supported:{structuredOutputs:!0}},{name:`grok-voice-think-fast-1.0`,currency:`USD`},{name:`grok-voice-fast-1.0`,currency:`USD`},{name:`grok-3`,currency:`USD`,promptTokenCostPer1M:3,completionTokenCostPer1M:15},{name:`grok-3-mini`,currency:`USD`,promptTokenCostPer1M:.3,completionTokenCostPer1M:.5,supported:{thinkingBudget:!0}},{name:`grok-3-fast`,currency:`USD`,promptTokenCostPer1M:5,completionTokenCostPer1M:25},{name:`grok-3-mini-fast`,currency:`USD`,promptTokenCostPer1M:.6,completionTokenCostPer1M:4,supported:{thinkingBudget:!0}}],rE={openai:{displayName:`OpenAI`,defaultModel:`gpt-5-mini`,defaultEmbedModel:`text-embedding-3-small`,isDynamic:!1,modelInfo:AC},"openai-decisions":{displayName:`OpenAI Decisions`,defaultModel:`gpt-6-luna`,isDynamic:!1,modelInfo:tw},"openai-responses":{displayName:`OpenAI Responses`,defaultModel:`gpt-4o`,defaultEmbedModel:`text-embedding-ada-002`,isDynamic:!1,modelInfo:jC},"azure-openai":{displayName:`Azure OpenAI`,isDynamic:!0,modelInfo:[]},anthropic:{displayName:`Anthropic`,defaultModel:`claude-sonnet-5`,isDynamic:!1,modelInfo:Yb},"google-gemini":{displayName:`Google Gemini`,defaultModel:`gemini-3.6-flash`,defaultEmbedModel:`gemini-embedding-2`,isDynamic:!1,modelInfo:RS},cohere:{displayName:`Cohere`,defaultModel:`command-r-plus`,isDynamic:!1,modelInfo:kS},deepseek:{displayName:`DeepSeek`,defaultModel:`deepseek-v4-flash`,isDynamic:!1,modelInfo:jS},"deepseek-responses":{displayName:`DeepSeek Responses`,defaultModel:`deepseek-v4-flash`,isDynamic:!1,modelInfo:jS},meta:{displayName:`Meta Model API`,defaultModel:`muse-spark-1.3`,isDynamic:!1,modelInfo:lC},"meta-chat":{displayName:`Meta Model API Chat Completions`,defaultModel:`muse-spark-1.3`,isDynamic:!1,modelInfo:sC},"meta-messages":{displayName:`Meta Model API Messages`,defaultModel:`muse-spark-1.3`,isDynamic:!1,modelInfo:cC},mistral:{displayName:`Mistral AI`,defaultModel:`mistral-small-latest`,isDynamic:!1,modelInfo:fC},reka:{displayName:`Reka`,defaultModel:`reka-core`,isDynamic:!1,modelInfo:$T},grok:{displayName:`xAI Grok`,defaultModel:`grok-4.6`,isDynamic:!1,modelInfo:nE},webllm:{displayName:`WebLLM`,defaultModel:`Llama-3.2-3B-Instruct-q4f32_1-MLC`,isDynamic:!1,modelInfo:tE},"chrome-ai":{displayName:`Chrome AI`,defaultModel:`gemini-nano`,isDynamic:!1,modelInfo:ES}},iE={...Object.fromEntries(OT().map(e=>[e.id,{displayName:e.name,isDynamic:!0,modelInfo:[]}])),...rE},aE=new Map([...OT().map(e=>[e.id,e]),[`chrome-ai`,AT(`chrome-ai`)]]),oE=[`none`,`minimal`,`low`,`medium`,`high`,`highest`],sE=(e,t)=>e.modelRules.find(e=>(e.match.exact?.includes(t)??!1)||(e.match.prefix?.some(e=>t.startsWith(e))??!1)||(e.match.contains?.some(e=>t.toLowerCase().includes(e.toLowerCase()))??!1)),cE=(e,t,n)=>{if(!n)return[];let r={...Object.fromEntries((e.unsupportedThinkingLevels??[]).map(e=>[e,!0])),...sE(e,t)?.request?.unsupportedThinkingLevels??{}};return oE.filter(e=>!Object.hasOwn(r??{},e))},lE=(e,t,n)=>n===`embeddings`||e===`openai`&&IC(t.name)||e===`google-gemini`&&HS(t.name)||e===`grok`&&ST(t.name)?[]:t.supported?.serviceTiers===void 0?[...IT(e,t.name).serviceTiers??[]]:[...t.supported.serviceTiers],uE=(e,t)=>{let n=t??e.defaultModel??``,r=IT(e.id,n);return{thinking:r.thinking,thinkingLevels:cE(e,n,r.hasThinkingBudget??!1),serviceTiers:[...r.serviceTiers??[]]}},dE=e=>{let t={...e};return e.aliases&&(t.aliases=[...e.aliases]),e.supported&&(t.supported={...e.supported,...e.supported.structuredOutputModes?{structuredOutputModes:[...e.supported.structuredOutputModes]}:void 0,...e.supported.serviceTiers?{serviceTiers:[...e.supported.serviceTiers]}:void 0,...e.supported.operations?{operations:[...e.supported.operations]}:void 0}),e.notSupported&&(t.notSupported={...e.notSupported}),e.audio&&(t.audio={...e.audio}),e.modalities&&(t.modalities={input:[...e.modalities.input],output:[...e.modalities.output]}),e.dataUse&&(t.dataUse={...e.dataUse,...e.dataUse.appliesTo?{appliesTo:[...e.dataUse.appliesTo]}:void 0}),t},fE=(e,t,n)=>{let r=pE(n),i=n.name.toLowerCase(),a=n.supported?.thinkingBudget??!1;return{thinkingBudget:a,thinkingLevels:cE(t,n.name,a),showThoughts:n.supported?.showThoughts??!1,structuredOutputs:n.supported?.structuredOutputs??!1,temperature:!(n.notSupported?.temperature??!1),topP:!(n.notSupported?.topP??!1),audioInput:n.audio?.input??r===`audio`,audioOutput:n.audio?.output??(r===`audio`&&!i.includes(`whisper`)&&!i.includes(`transcription`)&&!i.includes(`transcribe`)),...n.modalities?{textInput:n.modalities.input.includes(`text`),imageInput:n.modalities.input.includes(`image`),videoInput:n.modalities.input.includes(`video`),pdfInput:n.modalities.input.includes(`pdf`),textOutput:n.modalities.output.includes(`text`)}:{},imageOutput:n.modalities?.output.includes(`image`)??n.supported?.imageOutput??!1,serviceTiers:lE(e,n,r)}},pE=e=>{let t=e.name.toLowerCase();return e.supported?.imageOutput||t.includes(`image`)?`image`:e.audio?.output||t.includes(`audio`)||t.includes(`realtime`)||t.includes(`voice`)||t.includes(`whisper`)||t.includes(`transcribe`)||t.includes(`native-audio`)?`audio`:t.includes(`embedding`)||t.includes(`embed`)?`embeddings`:t.includes(`code`)||t.includes(`codex`)||t.includes(`coder`)||t.includes(`codestral`)?`code`:`text`},mE=e=>{if(e===void 0)return;let t=Array.isArray(e)?e:[e];if(!t.includes(`all`))return new Set(t)},hE=(e,t)=>!t||t.has(e.type)?!0:t.has(`text`)&&e.type===`code`,gE=e=>{let t=typeof e?.promptTokenCostPer1M==`number`,n=typeof e?.completionTokenCostPer1M==`number`;return!t&&!n?1/0:(e?.promptTokenCostPer1M??0)+(e?.completionTokenCostPer1M??0)},_E=(e,t)=>{let n=gE(e)-gE(t);return n===0?e.name.localeCompare(t.name):n},vE=(e,t,n,r,i)=>{let a=dE(i),o=[n,r].filter(e=>e!==void 0);return{...a,provider:e,type:pE(i),isDefault:o.some(e=>i.name===e||(i.aliases?.includes(e)??!1)),capabilities:fE(e,t,i)}},yE=e=>{let t=mE(e?.type);return Object.entries(iE).map(([e,{displayName:n,defaultModel:r,defaultEmbedModel:i,isDynamic:a,modelInfo:o}])=>{let s=aE.get(e);if(!s)throw Error(`Missing AI profile metadata for catalog provider ${e}`);let c=o.map(t=>vE(e,s,r,i,t)).filter(e=>hE(e,t)).sort(_E);return{name:e,displayName:n,...r===void 0?void 0:{defaultModel:r},...i===void 0?void 0:{defaultEmbedModel:i},isDynamic:a,capabilities:uE(s,r),models:c}}).sort((e,t)=>{let n=gE(e.models[0])-gE(t.models[0]);return n===0?e.displayName.localeCompare(t.displayName):n})},bE=()=>structuredClone({model:`gemini-nano`}),xE=()=>structuredClone({model:`gemini-nano`,temperature:.4});function SE(e){if(e)return e;let t=globalThis,n=t.LanguageModel??t.ai?.languageModel;if(!n)throw Error(`Chrome built-in AI (LanguageModel) is not available. Requires Chrome 138+ with the Prompt API enabled.`);return n}function CE(e){try{typeof e.destroy==`function`?e.destroy():typeof e.close==`function`&&e.close()}catch{}}var wE=class{config;tokensUsed;suppliedLanguageModel;constructor(e,t){this.config=e,this.suppliedLanguageModel=t}getTokenUsage(){return this.tokensUsed}getModelConfig(){let{config:e}=this;return{maxTokens:e.maxTokens,temperature:e.temperature,topK:e.topK,stream:e.stream}}createChatReq(e,t){let n=e.model,r=[],i=``;for(let t=0;t<e.chatPrompt.length;t++){let n=e.chatPrompt[t],a=t===e.chatPrompt.length-1;if(n.role===`system`)r.push({role:`system`,content:n.content});else if(n.role===`user`){let e=``;typeof n.content==`string`?e=n.content:Array.isArray(n.content)&&(e=n.content.map(e=>e.type===`text`?e.text:e.type===`image`?e.altText??`[Image: ${e.mimeType}]`:e.type===`audio`?e.transcription??`[Audio: ${e.mimeType??`application/octet-stream`}]`:e.type===`url`?e.cachedContent??[e.title,e.description,e.url].filter(Boolean).join(`
|
|
860
860
|
`):e.extractedText??`[File: ${e.filename??`file`} (${e.mimeType})]`).join(`
|
|
861
861
|
`)),a?i=e:r.push({role:`user`,content:e})}else if(n.role===`assistant`){let e=n.content||``;r.push({role:`assistant`,content:e})}else if(n.role===`function`){let e=n.content?.length?n.content.map(e=>e.type===`text`?e.text:e.type===`image`?e.altText??`[Image: ${e.mimeType}]`:e.type===`audio`?e.transcription??`[Audio: ${e.mimeType??`application/octet-stream`}]`:e.type===`url`?e.cachedContent??[e.title,e.description,e.url].filter(Boolean).join(`
|