Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/agent / fallback / isAgentFallbackEligible

Function: isAgentFallbackEligible()

ts
function isAgentFallbackEligible(error, policy?): AgentFallbackEligibility;

Defined in: packages/agent/src/fallback/index.ts:76

Pure dispatcher that maps a ProviderError to one of four eligible reasons or to eligible: false if the error is on the bypass list (auth | invalid-input | content-filter | cancelled).

The function is intentionally allocation-free on the hot path so the agent runtime can call it once per provider error per step without budget concerns.

Parameters

ParameterType
errorProviderError
policyAgentFallbackPolicy

Returns

AgentFallbackEligibility

Stable