Function: resolveRoute()
resolveRoute(
input):object
Select the lowest-overhead upstream that preserves the client contract.
Parameters
Section titled “Parameters”clientProtocol
Section titled “clientProtocol”"openai-responses" | "openai-chat" | "anthropic-messages" | "openai-embeddings" = ...
features
Section titled “features”{ background: boolean; customTools: boolean; parallelTools: boolean; previousResponse: boolean; reasoning: boolean; storage: boolean; structuredOutput: boolean; tools: boolean; unsupportedOpenResponsesTools: boolean; webSearch: boolean; } = ...
features.background
Section titled “features.background”boolean = ...
features.customTools
Section titled “features.customTools”boolean = ...
features.parallelTools
Section titled “features.parallelTools”boolean = ...
features.previousResponse
Section titled “features.previousResponse”boolean = ...
features.reasoning
Section titled “features.reasoning”boolean = ...
features.storage
Section titled “features.storage”boolean = ...
features.structuredOutput
Section titled “features.structuredOutput”boolean = ...
features.tools
Section titled “features.tools”boolean = ...
features.unsupportedOpenResponsesTools
Section titled “features.unsupportedOpenResponsesTools”boolean = ...
features.webSearch
Section titled “features.webSearch”boolean = ...
originator?
Section titled “originator?”string = ...
requestedModel
Section titled “requestedModel”string = ...
target
Section titled “target”{ aliases: string[]; capabilities: { aiGatewayCodex: boolean; anthropic: boolean; chat: boolean; customTools: boolean; embeddings: boolean; openResponses: boolean; parallelTools: boolean; reasoning: boolean; responses: boolean; streaming: boolean; structuredOutput: boolean; tools: boolean; webSearch: boolean; }; displayName: string; endpoint?: { class?: "chat-thinking" | "chat-balanced" | "chat-fast" | "embedding"; description?: string; dimension?: number; displayName?: string; family?: string; modelServiceName?: string; name: string; profile?: { cost?: number; quality?: number; speed?: number; }; reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max")[]; serviceNames?: Record<string, string>; state?: string; status?: { deprecated: boolean; }; supportsTools?: boolean; task?: string; }; family?: string; id: string; modelServiceName?: string; reasoningEfforts: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max")[]; } = ...
target.aliases
Section titled “target.aliases”string[] = ...
target.capabilities
Section titled “target.capabilities”{ aiGatewayCodex: boolean; anthropic: boolean; chat: boolean; customTools: boolean; embeddings: boolean; openResponses: boolean; parallelTools: boolean; reasoning: boolean; responses: boolean; streaming: boolean; structuredOutput: boolean; tools: boolean; webSearch: boolean; } = ...
target.capabilities.aiGatewayCodex
Section titled “target.capabilities.aiGatewayCodex”boolean = ...
target.capabilities.anthropic
Section titled “target.capabilities.anthropic”boolean = ...
target.capabilities.chat
Section titled “target.capabilities.chat”boolean = ...
target.capabilities.customTools
Section titled “target.capabilities.customTools”boolean = ...
target.capabilities.embeddings
Section titled “target.capabilities.embeddings”boolean = ...
target.capabilities.openResponses
Section titled “target.capabilities.openResponses”boolean = ...
target.capabilities.parallelTools
Section titled “target.capabilities.parallelTools”boolean = ...
target.capabilities.reasoning
Section titled “target.capabilities.reasoning”boolean = ...
target.capabilities.responses
Section titled “target.capabilities.responses”boolean = ...
target.capabilities.streaming
Section titled “target.capabilities.streaming”boolean = ...
target.capabilities.structuredOutput
Section titled “target.capabilities.structuredOutput”boolean = ...
target.capabilities.tools
Section titled “target.capabilities.tools”boolean = ...
target.capabilities.webSearch
Section titled “target.capabilities.webSearch”boolean = ...
target.displayName
Section titled “target.displayName”string = ...
target.endpoint?
Section titled “target.endpoint?”{ class?: "chat-thinking" | "chat-balanced" | "chat-fast" | "embedding"; description?: string; dimension?: number; displayName?: string; family?: string; modelServiceName?: string; name: string; profile?: { cost?: number; quality?: number; speed?: number; }; reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max")[]; serviceNames?: Record<string, string>; state?: string; status?: { deprecated: boolean; }; supportsTools?: boolean; task?: string; } = ...
target.endpoint.class?
Section titled “target.endpoint.class?”"chat-thinking" | "chat-balanced" | "chat-fast" | "embedding" = ...
target.endpoint.description?
Section titled “target.endpoint.description?”string = ...
target.endpoint.dimension?
Section titled “target.endpoint.dimension?”number = ...
target.endpoint.displayName?
Section titled “target.endpoint.displayName?”string = ...
target.endpoint.family?
Section titled “target.endpoint.family?”string = ...
target.endpoint.modelServiceName?
Section titled “target.endpoint.modelServiceName?”string = ...
target.endpoint.name
Section titled “target.endpoint.name”string = ...
target.endpoint.profile?
Section titled “target.endpoint.profile?”{ cost?: number; quality?: number; speed?: number; } = ...
target.endpoint.profile.cost?
Section titled “target.endpoint.profile.cost?”number = ...
target.endpoint.profile.quality?
Section titled “target.endpoint.profile.quality?”number = ...
target.endpoint.profile.speed?
Section titled “target.endpoint.profile.speed?”number = ...
target.endpoint.reasoningEfforts?
Section titled “target.endpoint.reasoningEfforts?”("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max")[] = ...
target.endpoint.serviceNames?
Section titled “target.endpoint.serviceNames?”Record<string, string> = ...
target.endpoint.state?
Section titled “target.endpoint.state?”string = ...
target.endpoint.status?
Section titled “target.endpoint.status?”{ deprecated: boolean; } = ...
target.endpoint.status.deprecated
Section titled “target.endpoint.status.deprecated”boolean = ...
target.endpoint.supportsTools?
Section titled “target.endpoint.supportsTools?”boolean = ...
target.endpoint.task?
Section titled “target.endpoint.task?”string = ...
target.family?
Section titled “target.family?”string = ...
target.id
Section titled “target.id”string = ...
target.modelServiceName?
Section titled “target.modelServiceName?”string = ...
target.reasoningEfforts
Section titled “target.reasoningEfforts”("none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max")[] = ...
Returns
Section titled “Returns”object
clientProtocol
Section titled “clientProtocol”clientProtocol:
"openai-responses"|"openai-chat"|"anthropic-messages"|"openai-embeddings"
target
Section titled “target”target:
object
target.aliases
Section titled “target.aliases”aliases:
string[]
target.capabilities
Section titled “target.capabilities”capabilities:
object
target.capabilities.aiGatewayCodex
Section titled “target.capabilities.aiGatewayCodex”aiGatewayCodex:
boolean
target.capabilities.anthropic
Section titled “target.capabilities.anthropic”anthropic:
boolean
target.capabilities.chat
Section titled “target.capabilities.chat”chat:
boolean
target.capabilities.customTools
Section titled “target.capabilities.customTools”customTools:
boolean
target.capabilities.embeddings
Section titled “target.capabilities.embeddings”embeddings:
boolean
target.capabilities.openResponses
Section titled “target.capabilities.openResponses”openResponses:
boolean
target.capabilities.parallelTools
Section titled “target.capabilities.parallelTools”parallelTools:
boolean
target.capabilities.reasoning
Section titled “target.capabilities.reasoning”reasoning:
boolean
target.capabilities.responses
Section titled “target.capabilities.responses”responses:
boolean
target.capabilities.streaming
Section titled “target.capabilities.streaming”streaming:
boolean
target.capabilities.structuredOutput
Section titled “target.capabilities.structuredOutput”structuredOutput:
boolean
target.capabilities.tools
Section titled “target.capabilities.tools”tools:
boolean
target.capabilities.webSearch
Section titled “target.capabilities.webSearch”webSearch:
boolean
target.displayName
Section titled “target.displayName”displayName:
string
target.endpoint?
Section titled “target.endpoint?”
optionalendpoint?:object
target.endpoint.class?
Section titled “target.endpoint.class?”
optionalclass?:"chat-thinking"|"chat-balanced"|"chat-fast"|"embedding"
target.endpoint.description?
Section titled “target.endpoint.description?”
optionaldescription?:string
target.endpoint.dimension?
Section titled “target.endpoint.dimension?”
optionaldimension?:number
target.endpoint.displayName?
Section titled “target.endpoint.displayName?”
optionaldisplayName?:string
target.endpoint.family?
Section titled “target.endpoint.family?”
optionalfamily?:string
target.endpoint.modelServiceName?
Section titled “target.endpoint.modelServiceName?”
optionalmodelServiceName?:string
target.endpoint.name
Section titled “target.endpoint.name”name:
string
target.endpoint.profile?
Section titled “target.endpoint.profile?”
optionalprofile?:object
target.endpoint.profile.cost?
Section titled “target.endpoint.profile.cost?”
optionalcost?:number
target.endpoint.profile.quality?
Section titled “target.endpoint.profile.quality?”
optionalquality?:number
target.endpoint.profile.speed?
Section titled “target.endpoint.profile.speed?”
optionalspeed?:number
target.endpoint.reasoningEfforts?
Section titled “target.endpoint.reasoningEfforts?”
optionalreasoningEfforts?: ("none"|"minimal"|"low"|"medium"|"high"|"xhigh"|"max")[]
target.endpoint.serviceNames?
Section titled “target.endpoint.serviceNames?”
optionalserviceNames?:Record<string,string>
target.endpoint.state?
Section titled “target.endpoint.state?”
optionalstate?:string
target.endpoint.status?
Section titled “target.endpoint.status?”
optionalstatus?:object
target.endpoint.status.deprecated
Section titled “target.endpoint.status.deprecated”deprecated:
boolean
target.endpoint.supportsTools?
Section titled “target.endpoint.supportsTools?”
optionalsupportsTools?:boolean
target.endpoint.task?
Section titled “target.endpoint.task?”
optionaltask?:string
target.family?
Section titled “target.family?”
optionalfamily?:string
target.id
Section titled “target.id”id:
string
target.modelServiceName?
Section titled “target.modelServiceName?”
optionalmodelServiceName?:string
target.reasoningEfforts
Section titled “target.reasoningEfforts”reasoningEfforts: (
"none"|"minimal"|"low"|"medium"|"high"|"xhigh"|"max")[]
translateRequest
Section titled “translateRequest”translateRequest:
boolean
translateResponse
Section titled “translateResponse”translateResponse:
boolean
upstreamModel
Section titled “upstreamModel”upstreamModel:
string
upstreamProtocol
Section titled “upstreamProtocol”upstreamProtocol:
"databricks-ai-gateway-codex"|"databricks-responses"|"databricks-open-responses"|"databricks-chat"|"databricks-anthropic"|"databricks-embeddings"|"ai-sdk"