Class: Anthropic::Models::Beta::BetaFallbackCreditTokenParam
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::BetaFallbackCreditTokenParam
- Defined in:
- lib/anthropic/models/beta/beta_fallback_credit_token_param.rb,
sig/anthropic/models/beta/beta_fallback_credit_token_param.rbs
Defined Under Namespace
Modules: Mode
Instance Attribute Summary collapse
-
#mode ⇒ Symbol, ...
How a failing token affects the retry.
-
#token ⇒ String
The opaque
fallback_credit_tokenfrom a prior refusal'sstop_details— the same string the bare-string form carries.
Instance Method Summary collapse
-
#initialize(token:, mode: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see BetaFallbackCreditTokenParam for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(token:, mode: nil) ⇒ Object
Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaFallbackCreditTokenParam for more details.
Object form of fallback_credit_token: the token plus a redemption mode.
Requires anthropic-beta: fallback-credit-2026-07-01; without that header the
field accepts the bare string only. The bare string and the mode-less object are
equivalent (both select strict), so wrapping an existing token changes nothing
by itself.
|
|
# File 'lib/anthropic/models/beta/beta_fallback_credit_token_param.rb', line 26
|
Instance Attribute Details
#mode ⇒ Symbol, ...
How a failing token affects the retry. strict (the default, and the
bare-string behavior): a failing redemption is a 400 and the retry is not
served. best_effort: the retry is served either way — a token-layer failure no
longer rejects the request; the retry proceeds at normal price and the outcome
is reported on the response's usage.fallback_credit. Two failures stay hard in
both modes: a malformed token, and combining fallback_credit_token with
fallbacks.
24 |
# File 'lib/anthropic/models/beta/beta_fallback_credit_token_param.rb', line 24 optional :mode, enum: -> { Anthropic::Beta::BetaFallbackCreditTokenParam::Mode } |
#token ⇒ String
The opaque fallback_credit_token from a prior refusal's stop_details — the
same string the bare-string form carries.
12 |
# File 'lib/anthropic/models/beta/beta_fallback_credit_token_param.rb', line 12 required :token, String |
Instance Method Details
#to_hash ⇒ {
26 |
# File 'sig/anthropic/models/beta/beta_fallback_credit_token_param.rbs', line 26
def to_hash: -> {
|