Skip to main content

Type Alias: GatewayInferenceResponse

type GatewayInferenceResponse = {
[key: string]: unknown;
metadata: GatewayInferenceMetadata;
temperature: number | null;
top_p: number | null;
user?: string | null;
previous_response_id?: string | null;
model: GatewayInferenceModelIdsResponses;
reasoning?: GatewayInferenceReasoning | null;
max_output_tokens?: number | null;
instructions: string | null;
text?: {
[key: string]: unknown;
format?: GatewayInferenceTextResponseFormatConfiguration;
};
tools: GatewayInferenceTool[];
tool_choice: | GatewayInferenceToolChoiceOptions
| GatewayInferenceToolChoiceTypes
| GatewayInferenceToolChoiceFunction;
truncation?: "auto" | "disabled" | null;
id: string;
object: "response";
status?: "completed" | "failed" | "in_progress" | "incomplete";
created_at: number;
error: GatewayInferenceResponseError;
incomplete_details: | {
[key: string]: unknown;
reason?: "max_output_tokens" | "content_filter";
}
| null;
output: GatewayInferenceOutputItem[];
output_text?: string | null;
usage?: GatewayInferenceResponseUsage;
parallel_tool_calls: boolean;
};

Defined in: src/models/ai-gateway-inference.ts:3399

Portkey Response; additive response fields are preserved.

Example​

`GatewayInferenceResponseSchema.parse(value);`

Indexable​

[key: string]: unknown

Properties​

metadata​

metadata: GatewayInferenceMetadata;

Defined in: src/models/ai-gateway-inference.ts:3400


temperature​

temperature: number | null;

Defined in: src/models/ai-gateway-inference.ts:3401


top_p​

top_p: number | null;

Defined in: src/models/ai-gateway-inference.ts:3402


user?​

optional user?: string | null;

Defined in: src/models/ai-gateway-inference.ts:3403


previous_response_id?​

optional previous_response_id?: string | null;

Defined in: src/models/ai-gateway-inference.ts:3404


model​

model: GatewayInferenceModelIdsResponses;

Defined in: src/models/ai-gateway-inference.ts:3405


reasoning?​

optional reasoning?: GatewayInferenceReasoning | null;

Defined in: src/models/ai-gateway-inference.ts:3406


max_output_tokens?​

optional max_output_tokens?: number | null;

Defined in: src/models/ai-gateway-inference.ts:3407


instructions​

instructions: string | null;

Defined in: src/models/ai-gateway-inference.ts:3408


text?​

optional text?: {
[key: string]: unknown;
format?: GatewayInferenceTextResponseFormatConfiguration;
};

Defined in: src/models/ai-gateway-inference.ts:3409

Index Signature​

[key: string]: unknown

format?​

optional format?: GatewayInferenceTextResponseFormatConfiguration;

tools​

tools: GatewayInferenceTool[];

Defined in: src/models/ai-gateway-inference.ts:3410


tool_choice​

tool_choice:
| GatewayInferenceToolChoiceOptions
| GatewayInferenceToolChoiceTypes
| GatewayInferenceToolChoiceFunction;

Defined in: src/models/ai-gateway-inference.ts:3411


truncation?​

optional truncation?: "auto" | "disabled" | null;

Defined in: src/models/ai-gateway-inference.ts:3415


id​

id: string;

Defined in: src/models/ai-gateway-inference.ts:3416


object​

object: "response";

Defined in: src/models/ai-gateway-inference.ts:3417


status?​

optional status?: "completed" | "failed" | "in_progress" | "incomplete";

Defined in: src/models/ai-gateway-inference.ts:3418


created_at​

created_at: number;

Defined in: src/models/ai-gateway-inference.ts:3419


error​

error: GatewayInferenceResponseError;

Defined in: src/models/ai-gateway-inference.ts:3420


incomplete_details​

incomplete_details:
| {
[key: string]: unknown;
reason?: "max_output_tokens" | "content_filter";
}
| null;

Defined in: src/models/ai-gateway-inference.ts:3421


output​

output: GatewayInferenceOutputItem[];

Defined in: src/models/ai-gateway-inference.ts:3425


output_text?​

optional output_text?: string | null;

Defined in: src/models/ai-gateway-inference.ts:3426


usage?​

optional usage?: GatewayInferenceResponseUsage;

Defined in: src/models/ai-gateway-inference.ts:3427


parallel_tool_calls​

parallel_tool_calls: boolean;

Defined in: src/models/ai-gateway-inference.ts:3428