Module: Anthropic::Models::Beta::MessageCreateParams::FallbackCreditToken
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/message_create_params.rb,
sig/anthropic/models/beta/message_create_params.rbs
Overview
The fallback_credit_token from a prior refusal's stop_details.
When a preceding request was refused and returned a fallback_credit_token,
pass that code here on the retry to have the retry's cache-creation tokens for
the prefix that was warm on the refused model billed at the cache-read rate.
Must be redeemed by the same organization and workspace, with the same request
body (optionally extended by one appended assistant message whose content is
the partial text — with any trailing whitespace stripped from the final text
block — and paired server-tool blocks streamed before the refusal; the
appended-assistant form is not available for requests with output_format set
or forced tool_choice), on an eligible fallback model, on the same platform,
and within 5 minutes of the refusal; a mismatch is a 400. A token minted
mid-server-tool-loop whose partial content was continuable may only be redeemed
with the appended-assistant form — if an exact-body retry is rejected with a 400
saying the token must be redeemed by continuing the partial response, retry with
the appended-assistant form instead.
When the appended-assistant form is used on a model that otherwise disallows assistant-turn prefill, this token also authorizes that one prefill.
Instance Method Summary collapse
Methods included from Internal::Type::Union
==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants, variants
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Instance Method Details
#self?.variants ⇒ ::Array[Anthropic::Models::Beta::MessageCreateParams::fallback_credit_token]
211 |
# File 'sig/anthropic/models/beta/message_create_params.rbs', line 211
def self?.variants: -> ::Array[Anthropic::Models::Beta::MessageCreateParams::fallback_credit_token]
|