@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
20 lines (19 loc) • 1.09 kB
TypeScript
import type { ClaudeProxyModelTier, FallbackEntry, ParsedClaudeRequest, ProxyTranslationPlan } from "../types/index.js";
export declare function inferClaudeProxyModelTier(modelName: string): ClaudeProxyModelTier;
/**
* Build a translation plan for a Claude-compatible proxy request.
* The plan lists the primary provider followed by eligible fallback targets.
* All configured fallback entries are always eligible — no contract-based gating.
* An "auto-provider" entry is appended only when explicitly enabled by the
* caller. This keeps an empty fallback chain from silently escaping to an
* unrelated provider.
*/
export declare function buildProxyTranslationPlan(primary: {
provider: string;
model?: string;
}, fallbackChain: FallbackEntry[], requestedModel: string, _parsed: ParsedClaudeRequest, allowAutoFallback?: boolean): ProxyTranslationPlan;
/**
* Parse the retry-after header from an upstream 429 response.
* Returns milliseconds to wait, or 0 if no valid header present.
*/
export declare function parseRetryAfterMs(retryAfterHeader: string | null): number;