Neutrome SDK reference
    Preparing search index...

    Function fallback

    • Tries executors in order until one succeeds.

      A streaming attempt that has already emitted a chunk is never abandoned.

      Parameters

      • executors: readonly ExecutorInput[]

        Executors or model ids to try, best first.

      • options: FallbackOptions = {}

        Fallback predicates and hooks.

      Returns Executor

      An executor that fails over.

      Error when executors is empty.

      const upstream = fallback([
      retry("default/glm-5.2", { attempts: 3 }),
      "fast/gemma-4-31b",
      ]);