Skip to content

rulvar API reference


rulvar API reference / @rulvar/anthropic / mapStopReason

Function: mapStopReason()

ts
function mapStopReason(stopReason, stopDetails): MappedStop;

Defined in: packages/anthropic/src/wire.ts:348

The stop-reason table. pause_turn never surfaces as a canonical finish: the adapter continues internally.

Parameters

ParameterType
stopReasonstring | null | undefined
stopDetailsRecord<string, unknown> | null | undefined

Returns

MappedStop