The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
import { setCallbacksCall } from "@/components/networking";
import { useMutation } from "@tanstack/react-query";
export interface RetryPolicyPayload {
retry_policy?: Record<string, number> | null;
model_group_retry_policy?: Record<string, Record<string, number> | undefined> | null;
}
export const useUpdateRetryPolicy = (accessToken: string | null) =>
useMutation({
mutationFn: async (policy: RetryPolicyPayload) => {
if (!accessToken) {
throw new Error("Access token is required");
}
return setCallbacksCall(accessToken, { router_settings: policy });
},
});