Function: translateGatewayRequest()
translateGatewayRequest(
route,body,signal):Promise<Response>
Translate one request through a provider-owned AI SDK model.
Parameters
Section titled “Parameters”clientProtocol
Section titled “clientProtocol”"openai-responses" | "openai-chat" | "anthropic-messages" | "openai-embeddings" = ...
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")[] = ...
translateRequest
Section titled “translateRequest”boolean = ...
translateResponse
Section titled “translateResponse”boolean = ...
upstreamModel
Section titled “upstreamModel”string = ...
upstreamProtocol
Section titled “upstreamProtocol”"databricks-ai-gateway-codex" | "databricks-responses" | "databricks-open-responses" | "databricks-chat" | "databricks-anthropic" | "databricks-embeddings" | "ai-sdk" = ...
Readonly<Record<string, unknown>>
signal
Section titled “signal”AbortSignal
Returns
Section titled “Returns”Promise<Response>