Interface BetaUsage.Iteration.Visitor

    • Constructor Detail

    • Method Detail

      • visitFallbackMessage

         abstract T visitFallbackMessage(BetaFallbackMessageIterationUsage fallbackMessage)

        Token usage for the fallback-model attempt of a server-side fallback request.

        The terminal entry of a fallback-served turn: when a fallback hop's output is the returned message, the entry for the iteration that completed it carries this type in place of message. A declined hop and the serving hop's earlier tool-loop iterations produce message entries. Whether a fallback model served the response is signalled by the presence of this entry in usage.iterations.

      • unknown

         T unknown(JsonValue json)

        Maps an unknown variant of Iteration to a value of type T.

        An instance of Iteration can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.