Optional after: CompletionResolutionOptional failure: unknownOptional responseSchema: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>Optional schemaName: stringOptional schemaInPrompt: booleanTrue when messages already carry the schema's instructions (a structured
reply puts its own in the system prompt): a hop whose payload carries no
schema then gets no second copy.
Optional onLateUsage: ((report) => void)Receives the usage the provider reports for this attempt after the caller's signal ended it (LateAttemptUsage), once the stream left running has ended. Without a listener, or when it throws, that usage is logged at warn level with its token counts.
Optional schemaThe schema instructions, in generateObject's words, that a hop's system
prompt needs for responseSchema: the text when the hop's provider payload
carries no schema (no payload for the provider or model, or a JSON mode
without one), undefined when the payload carries it. A caller that puts
the text in its prompt itself passes schemaInPrompt to stream().
Optional schemaName: string
The route's first hop that can start, or, given the hop that failed, the next one.
failureis the error that hop failed with: the walk reads it as generateText's and streamText's walks do (a refusal passes over the policy chain's Claude legs; a standing uncensored leg that failed on availability is owed the next ranked model). Without it the hop counts as an availability failure.