Class: Anthropic::Models::Beta::BetaManagedAgentsSessionUsage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_managed_agents_session_usage.rb,
sig/anthropic/models/beta/beta_managed_agents_session_usage.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#initializeObject



44
# File 'sig/anthropic/models/beta/beta_managed_agents_session_usage.rbs', line 44

def initialize: (

Instance Attribute Details

#active_secondsFloat?

Cumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once, unlike stats.active_seconds, which sums each thread's own active time. This is the duration the session's runtime cost is priced on.

Parameters:

  • (Float)

Returns:

  • (Float, nil)


14
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 14

optional :active_seconds, Float

#cache_creationAnthropic::Models::Beta::BetaManagedAgentsCacheCreationUsage?

Prompt-cache creation token usage broken down by cache lifetime.



20
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 20

optional :cache_creation, -> { Anthropic::Beta::BetaManagedAgentsCacheCreationUsage }

#cache_read_input_tokensInteger?

Total tokens read from prompt cache.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


26
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 26

optional :cache_read_input_tokens, Integer

#input_tokensInteger?

Total input tokens consumed across all turns.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


32
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 32

optional :input_tokens, Integer

#list_costAnthropic::Models::BetaMonetaryAmount?

A monetary amount in a specific currency.

Parameters:

Returns:



38
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 38

optional :list_cost, -> { Anthropic::BetaMonetaryAmount }, nil?: true

#output_tokensInteger?

Total output tokens generated across all turns.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


44
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 44

optional :output_tokens, Integer

#server_tool_useAnthropic::Models::Beta::BetaManagedAgentsServerToolUsage?

Cumulative count of server-executed tool invocations, broken down by tool.

Parameters:

  • value (Anthropic::Beta::BetaManagedAgentsServerToolUsage, nil)

Returns:



50
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 50

optional :server_tool_use, -> { Anthropic::Beta::BetaManagedAgentsServerToolUsage }, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


54
# File 'sig/anthropic/models/beta/beta_managed_agents_session_usage.rbs', line 54

def to_hash: -> {