Class: Anthropic::Models::Beta::SessionUpdateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/anthropic/models/beta/session_update_params.rb,
sig/anthropic/models/beta/session_update_params.rbs

Overview

See Also:

  • Anthropic::Resources::Beta::Sessions#update

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(session_id:, agent: nil, budget: nil, metadata: nil, title: nil, vault_ids: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ SessionUpdateParams

Some parameter documentations has been truncated, see Anthropic::Models::Beta::SessionUpdateParams for more details.

Parameters:

  • session_id (String)
  • agent (Anthropic::Models::Beta::BetaManagedAgentsSessionAgentUpdate) (defaults to: nil) —

    Agent configuration update. Only tools and mcp_servers are updatable mid-ses

  • budget (Anthropic::Models::Beta::BetaManagedAgentsBudgetLimit, nil) (defaults to: nil) —

    Enforced spend ceiling for the session. Set an object to replace the budget of a

  • metadata (Hash{Symbol=>String, nil}, nil) (defaults to: nil) —

    Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omi

  • title (String, nil) (defaults to: nil) —

    Human-readable session title.

  • vault_ids (Array<String>) (defaults to: nil) —

    Vault IDs (vlt_*) to attach to the session. Not yet supported; requests settin

  • betas (Array<Symbol, String, Anthropic::Models::AnthropicBeta>) (defaults to: nil) —

    This endpoint is in beta: requests must send managed-agents-2026-04-01 in this

  • workspace_id (String) (defaults to: nil) —

    Optional header to select the Workspace for this request. The value is a Workspa

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})
  • session_id: (String)
  • agent: (Anthropic::Beta::BetaManagedAgentsSessionAgentUpdate) (defaults to: nil)
  • budget: (Anthropic::Beta::BetaManagedAgentsBudgetLimit, nil) (defaults to: nil)
  • metadata: (::Hash[Symbol, String?], nil) (defaults to: nil)
  • title: (String, nil) (defaults to: nil)
  • vault_ids: (::Array[String]) (defaults to: nil)
  • betas: (::Array[Anthropic::Models::anthropic_beta]) (defaults to: nil)
  • workspace_id: (String) (defaults to: nil)
  • request_options: (Anthropic::request_opts) (defaults to: {})


# File 'lib/anthropic/models/beta/session_update_params.rb', line 75

Instance Attribute Details

#agent ⇒ Anthropic::Models::Beta::BetaManagedAgentsSessionAgentUpdate?

Agent configuration update. Only tools and mcp_servers are updatable mid-session. Only valid for sessions created from an agent or deployment reference. The session must not be running.

Parameters:

  • (Anthropic::Beta::BetaManagedAgentsSessionAgentUpdate)

Returns:



22
# File 'lib/anthropic/models/beta/session_update_params.rb', line 22

optional :agent, -> { Anthropic::Beta::BetaManagedAgentsSessionAgentUpdate }

#betas ⇒ Array<Symbol, String, Anthropic::Models::AnthropicBeta>?

This endpoint is in beta: requests must send managed-agents-2026-04-01 in this header.

Parameters:

  • (::Array[Anthropic::Models::anthropic_beta])

Returns:



62
# File 'lib/anthropic/models/beta/session_update_params.rb', line 62

optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }

#budget ⇒ Anthropic::Models::Beta::BetaManagedAgentsBudgetLimit?

Enforced spend ceiling for the session. Set an object to replace the budget of a session that was created with one, or null to remove it; omit to preserve. A budget cannot be added to a session created without one (rejected with reason budget_create_only), and a removed budget cannot be re-added. Allowed in any non-terminated status. Lowering max_list_cost to at or below the session's consumed list cost is rejected with reason budget_not_raised, and every model the session can run must have a public list price or the request is rejected with reason model_not_budgetable.

Parameters:

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

Returns:



35
# File 'lib/anthropic/models/beta/session_update_params.rb', line 35

optional :budget, -> { Anthropic::Beta::BetaManagedAgentsBudgetLimit }, nil?: true

#metadata ⇒ Hash{Symbol=>String, nil}?

Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve.

Parameters:

  • value (::Hash[Symbol, String?], nil)

Returns:

  • (Hash{Symbol=>String, nil}, nil)


42
# File 'lib/anthropic/models/beta/session_update_params.rb', line 42

optional :metadata, Anthropic::Internal::Type::HashOf[String, nil?: true], nil?: true

#session_id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :session_id, String

#title ⇒ String?

Human-readable session title.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


48
# File 'lib/anthropic/models/beta/session_update_params.rb', line 48

optional :title, String, nil?: true

#vault_ids ⇒ Array<String>?

Vault IDs (vlt_*) to attach to the session. Not yet supported; requests setting this field are rejected. Reserved for future use.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


55
# File 'lib/anthropic/models/beta/session_update_params.rb', line 55

optional :vault_ids, Anthropic::Internal::Type::ArrayOf[String]

#workspace_id ⇒ String?

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Parameters:

  • (String)

Returns:

  • (String, nil)


73
# File 'lib/anthropic/models/beta/session_update_params.rb', line 73

optional :workspace_id, String

Instance Method Details

#to_hash ⇒ { session_id: String, agent: Anthropic::Beta::BetaManagedAgentsSessionAgentUpdate, budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit?, metadata: ::Hash[Symbol, String?]?, title: String?, vault_ids: ::Array[String], betas: ::Array[Anthropic::Models::anthropic_beta], workspace_id: String, request_options: Anthropic::RequestOptions }

Returns:

  • ({ session_id: String, agent: Anthropic::Beta::BetaManagedAgentsSessionAgentUpdate, budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit?, metadata: ::Hash[Symbol, String?]?, title: String?, vault_ids: ::Array[String], betas: ::Array[Anthropic::Models::anthropic_beta], workspace_id: String, request_options: Anthropic::RequestOptions })


61
62
63
64
65
66
67
68
69
70
71
# File 'sig/anthropic/models/beta/session_update_params.rbs', line 61

def to_hash: -> {
  session_id: String,
  agent: Anthropic::Beta::BetaManagedAgentsSessionAgentUpdate,
  budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit?,
  metadata: ::Hash[Symbol, String?]?,
  title: String?,
  vault_ids: ::Array[String],
  betas: ::Array[Anthropic::Models::anthropic_beta],
  workspace_id: String,
  request_options: Anthropic::RequestOptions
}