constant

package
v1.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 1 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModelNonStreamingTokens = map[string]int{
	"claude-opus-4-20250514":                  8192,
	"claude-4-opus-20250514":                  8192,
	"claude-opus-4-0":                         8192,
	"anthropic.claude-opus-4-20250514-v1:0":   8192,
	"claude-opus-4@20250514":                  8192,
	"claude-opus-4-1-20250805":                8192,
	"anthropic.claude-opus-4-1-20250805-v1:0": 8192,
	"claude-opus-4-1@20250805":                8192,
}

ModelNonStreamingTokens defines the maximum tokens for models that should limit non-streaming requests.

Functions

func ValueOf

func ValueOf[T Constant[T]]() T

ValueOf gives the default value of a constant from its type. It's helpful when constructing constants as variants in a one-of. Note that empty structs are marshalled by default. Usage: constant.ValueOf[constant.Foo]()

Types

type APIError

type APIError string // Always "api_error"

func (APIError) Default

func (c APIError) Default() APIError

func (APIError) MarshalJSON

func (c APIError) MarshalJSON() ([]byte, error)

type Adaptive added in v1.21.0

type Adaptive string // Always "adaptive"

func (Adaptive) Default added in v1.21.0

func (c Adaptive) Default() Adaptive

func (Adaptive) MarshalJSON added in v1.21.0

func (c Adaptive) MarshalJSON() ([]byte, error)

type Advisor added in v1.34.0

type Advisor string // Always "advisor"

func (Advisor) Default added in v1.34.0

func (c Advisor) Default() Advisor

func (Advisor) MarshalJSON added in v1.34.0

func (c Advisor) MarshalJSON() ([]byte, error)

type Advisor20260301 added in v1.34.0

type Advisor20260301 string // Always "advisor_20260301"

func (Advisor20260301) Default added in v1.34.0

func (c Advisor20260301) Default() Advisor20260301

func (Advisor20260301) MarshalJSON added in v1.34.0

func (c Advisor20260301) MarshalJSON() ([]byte, error)

type AdvisorMessage added in v1.34.0

type AdvisorMessage string // Always "advisor_message"

func (AdvisorMessage) Default added in v1.34.0

func (c AdvisorMessage) Default() AdvisorMessage

func (AdvisorMessage) MarshalJSON added in v1.34.0

func (c AdvisorMessage) MarshalJSON() ([]byte, error)

type AdvisorRedactedResult added in v1.34.0

type AdvisorRedactedResult string // Always "advisor_redacted_result"

func (AdvisorRedactedResult) Default added in v1.34.0

func (AdvisorRedactedResult) MarshalJSON added in v1.34.0

func (c AdvisorRedactedResult) MarshalJSON() ([]byte, error)

type AdvisorResult added in v1.34.0

type AdvisorResult string // Always "advisor_result"

func (AdvisorResult) Default added in v1.34.0

func (c AdvisorResult) Default() AdvisorResult

func (AdvisorResult) MarshalJSON added in v1.34.0

func (c AdvisorResult) MarshalJSON() ([]byte, error)

type AdvisorToolResult added in v1.34.0

type AdvisorToolResult string // Always "advisor_tool_result"

func (AdvisorToolResult) Default added in v1.34.0

func (AdvisorToolResult) MarshalJSON added in v1.34.0

func (c AdvisorToolResult) MarshalJSON() ([]byte, error)

type AdvisorToolResultError added in v1.34.0

type AdvisorToolResultError string // Always "advisor_tool_result_error"

func (AdvisorToolResultError) Default added in v1.34.0

func (AdvisorToolResultError) MarshalJSON added in v1.34.0

func (c AdvisorToolResultError) MarshalJSON() ([]byte, error)

type All added in v1.16.0

type All string // Always "all"

func (All) Default added in v1.16.0

func (c All) Default() All

func (All) MarshalJSON added in v1.16.0

func (c All) MarshalJSON() ([]byte, error)

type Any

type Any string // Always "any"

func (Any) Default

func (c Any) Default() Any

func (Any) MarshalJSON

func (c Any) MarshalJSON() ([]byte, error)

type ApplicationPDF

type ApplicationPDF string // Always "application/pdf"

func (ApplicationPDF) Default

func (c ApplicationPDF) Default() ApplicationPDF

func (ApplicationPDF) MarshalJSON

func (c ApplicationPDF) MarshalJSON() ([]byte, error)

type Approximate

type Approximate string // Always "approximate"

func (Approximate) Default

func (c Approximate) Default() Approximate

func (Approximate) MarshalJSON

func (c Approximate) MarshalJSON() ([]byte, error)

type Assistant

type Assistant string // Always "assistant"

func (Assistant) Default

func (c Assistant) Default() Assistant

func (Assistant) MarshalJSON

func (c Assistant) MarshalJSON() ([]byte, error)

type AuthenticationError

type AuthenticationError string // Always "authentication_error"

func (AuthenticationError) Default

func (AuthenticationError) MarshalJSON

func (c AuthenticationError) MarshalJSON() ([]byte, error)

type Auto

type Auto string // Always "auto"

func (Auto) Default

func (c Auto) Default() Auto

func (Auto) MarshalJSON

func (c Auto) MarshalJSON() ([]byte, error)

type Base64

type Base64 string // Always "base64"

func (Base64) Default

func (c Base64) Default() Base64

func (Base64) MarshalJSON

func (c Base64) MarshalJSON() ([]byte, error)

type Bash

type Bash string // Always "bash"

func (Bash) Default

func (c Bash) Default() Bash

func (Bash) MarshalJSON

func (c Bash) MarshalJSON() ([]byte, error)

type Bash20241022

type Bash20241022 string // Always "bash_20241022"

func (Bash20241022) Default

func (c Bash20241022) Default() Bash20241022

func (Bash20241022) MarshalJSON

func (c Bash20241022) MarshalJSON() ([]byte, error)

type Bash20250124

type Bash20250124 string // Always "bash_20250124"

func (Bash20250124) Default

func (c Bash20250124) Default() Bash20250124

func (Bash20250124) MarshalJSON

func (c Bash20250124) MarshalJSON() ([]byte, error)

type BashCodeExecutionOutput added in v1.10.0

type BashCodeExecutionOutput string // Always "bash_code_execution_output"

func (BashCodeExecutionOutput) Default added in v1.10.0

func (BashCodeExecutionOutput) MarshalJSON added in v1.10.0

func (c BashCodeExecutionOutput) MarshalJSON() ([]byte, error)

type BashCodeExecutionResult added in v1.10.0

type BashCodeExecutionResult string // Always "bash_code_execution_result"

func (BashCodeExecutionResult) Default added in v1.10.0

func (BashCodeExecutionResult) MarshalJSON added in v1.10.0

func (c BashCodeExecutionResult) MarshalJSON() ([]byte, error)

type BashCodeExecutionToolResult added in v1.10.0

type BashCodeExecutionToolResult string // Always "bash_code_execution_tool_result"

func (BashCodeExecutionToolResult) Default added in v1.10.0

func (BashCodeExecutionToolResult) MarshalJSON added in v1.10.0

func (c BashCodeExecutionToolResult) MarshalJSON() ([]byte, error)

type BashCodeExecutionToolResultError added in v1.10.0

type BashCodeExecutionToolResultError string // Always "bash_code_execution_tool_result_error"

func (BashCodeExecutionToolResultError) Default added in v1.10.0

func (BashCodeExecutionToolResultError) MarshalJSON added in v1.10.0

func (c BashCodeExecutionToolResultError) MarshalJSON() ([]byte, error)

type BillingError

type BillingError string // Always "billing_error"

func (BillingError) Default

func (c BillingError) Default() BillingError

func (BillingError) MarshalJSON

func (c BillingError) MarshalJSON() ([]byte, error)

type Canceled

type Canceled string // Always "canceled"

func (Canceled) Default

func (c Canceled) Default() Canceled

func (Canceled) MarshalJSON

func (c Canceled) MarshalJSON() ([]byte, error)

type CharLocation

type CharLocation string // Always "char_location"

func (CharLocation) Default

func (c CharLocation) Default() CharLocation

func (CharLocation) MarshalJSON

func (c CharLocation) MarshalJSON() ([]byte, error)

type CitationsDelta

type CitationsDelta string // Always "citations_delta"

func (CitationsDelta) Default

func (c CitationsDelta) Default() CitationsDelta

func (CitationsDelta) MarshalJSON

func (c CitationsDelta) MarshalJSON() ([]byte, error)

type ClearThinking20251015 added in v1.16.0

type ClearThinking20251015 string // Always "clear_thinking_20251015"

func (ClearThinking20251015) Default added in v1.16.0

func (ClearThinking20251015) MarshalJSON added in v1.16.0

func (c ClearThinking20251015) MarshalJSON() ([]byte, error)

type ClearToolUses20250919 added in v1.13.0

type ClearToolUses20250919 string // Always "clear_tool_uses_20250919"

func (ClearToolUses20250919) Default added in v1.13.0

func (ClearToolUses20250919) MarshalJSON added in v1.13.0

func (c ClearToolUses20250919) MarshalJSON() ([]byte, error)

type Cloud added in v1.33.0

type Cloud string // Always "cloud"

func (Cloud) Default added in v1.33.0

func (c Cloud) Default() Cloud

func (Cloud) MarshalJSON added in v1.33.0

func (c Cloud) MarshalJSON() ([]byte, error)

type CodeExecution added in v1.2.0

type CodeExecution string // Always "code_execution"

func (CodeExecution) Default added in v1.2.0

func (c CodeExecution) Default() CodeExecution

func (CodeExecution) MarshalJSON added in v1.2.0

func (c CodeExecution) MarshalJSON() ([]byte, error)

type CodeExecution20250522 added in v1.2.0

type CodeExecution20250522 string // Always "code_execution_20250522"

func (CodeExecution20250522) Default added in v1.2.0

func (CodeExecution20250522) MarshalJSON added in v1.2.0

func (c CodeExecution20250522) MarshalJSON() ([]byte, error)

type CodeExecution20250825 added in v1.10.0

type CodeExecution20250825 string // Always "code_execution_20250825"

func (CodeExecution20250825) Default added in v1.10.0

func (CodeExecution20250825) MarshalJSON added in v1.10.0

func (c CodeExecution20250825) MarshalJSON() ([]byte, error)

type CodeExecution20260120 added in v1.23.0

type CodeExecution20260120 string // Always "code_execution_20260120"

func (CodeExecution20260120) Default added in v1.23.0

func (CodeExecution20260120) MarshalJSON added in v1.23.0

func (c CodeExecution20260120) MarshalJSON() ([]byte, error)

type CodeExecutionOutput added in v1.2.0

type CodeExecutionOutput string // Always "code_execution_output"

func (CodeExecutionOutput) Default added in v1.2.0

func (CodeExecutionOutput) MarshalJSON added in v1.2.0

func (c CodeExecutionOutput) MarshalJSON() ([]byte, error)

type CodeExecutionResult added in v1.2.0

type CodeExecutionResult string // Always "code_execution_result"

func (CodeExecutionResult) Default added in v1.2.0

func (CodeExecutionResult) MarshalJSON added in v1.2.0

func (c CodeExecutionResult) MarshalJSON() ([]byte, error)

type CodeExecutionToolResult added in v1.2.0

type CodeExecutionToolResult string // Always "code_execution_tool_result"

func (CodeExecutionToolResult) Default added in v1.2.0

func (CodeExecutionToolResult) MarshalJSON added in v1.2.0

func (c CodeExecutionToolResult) MarshalJSON() ([]byte, error)

type CodeExecutionToolResultError added in v1.2.0

type CodeExecutionToolResultError string // Always "code_execution_tool_result_error"

func (CodeExecutionToolResultError) Default added in v1.2.0

func (CodeExecutionToolResultError) MarshalJSON added in v1.2.0

func (c CodeExecutionToolResultError) MarshalJSON() ([]byte, error)

type Compact20260112 added in v1.21.0

type Compact20260112 string // Always "compact_20260112"

func (Compact20260112) Default added in v1.21.0

func (c Compact20260112) Default() Compact20260112

func (Compact20260112) MarshalJSON added in v1.21.0

func (c Compact20260112) MarshalJSON() ([]byte, error)

type Compaction added in v1.21.0

type Compaction string // Always "compaction"

func (Compaction) Default added in v1.21.0

func (c Compaction) Default() Compaction

func (Compaction) MarshalJSON added in v1.21.0

func (c Compaction) MarshalJSON() ([]byte, error)

type CompactionDelta added in v1.21.0

type CompactionDelta string // Always "compaction_delta"

func (CompactionDelta) Default added in v1.21.0

func (c CompactionDelta) Default() CompactionDelta

func (CompactionDelta) MarshalJSON added in v1.21.0

func (c CompactionDelta) MarshalJSON() ([]byte, error)

type Completion

type Completion string // Always "completion"

func (Completion) Default

func (c Completion) Default() Completion

func (Completion) MarshalJSON

func (c Completion) MarshalJSON() ([]byte, error)

type Computer

type Computer string // Always "computer"

func (Computer) Default

func (c Computer) Default() Computer

func (Computer) MarshalJSON

func (c Computer) MarshalJSON() ([]byte, error)

type Computer20241022

type Computer20241022 string // Always "computer_20241022"

func (Computer20241022) Default

func (c Computer20241022) Default() Computer20241022

func (Computer20241022) MarshalJSON

func (c Computer20241022) MarshalJSON() ([]byte, error)

type Computer20250124

type Computer20250124 string // Always "computer_20250124"

func (Computer20250124) Default

func (c Computer20250124) Default() Computer20250124

func (Computer20250124) MarshalJSON

func (c Computer20250124) MarshalJSON() ([]byte, error)

type Computer20251124 added in v1.19.0

type Computer20251124 string // Always "computer_20251124"

func (Computer20251124) Default added in v1.19.0

func (c Computer20251124) Default() Computer20251124

func (Computer20251124) MarshalJSON added in v1.19.0

func (c Computer20251124) MarshalJSON() ([]byte, error)

type Constant

type Constant[T any] interface {
	Default() T
}

type ContainerUpload added in v1.2.0

type ContainerUpload string // Always "container_upload"

func (ContainerUpload) Default added in v1.2.0

func (c ContainerUpload) Default() ContainerUpload

func (ContainerUpload) MarshalJSON added in v1.2.0

func (c ContainerUpload) MarshalJSON() ([]byte, error)

type Content

type Content string // Always "content"

func (Content) Default

func (c Content) Default() Content

func (Content) MarshalJSON

func (c Content) MarshalJSON() ([]byte, error)

type ContentBlockDelta

type ContentBlockDelta string // Always "content_block_delta"

func (ContentBlockDelta) Default

func (ContentBlockDelta) MarshalJSON

func (c ContentBlockDelta) MarshalJSON() ([]byte, error)

type ContentBlockLocation

type ContentBlockLocation string // Always "content_block_location"

func (ContentBlockLocation) Default

func (ContentBlockLocation) MarshalJSON

func (c ContentBlockLocation) MarshalJSON() ([]byte, error)

type ContentBlockStart

type ContentBlockStart string // Always "content_block_start"

func (ContentBlockStart) Default

func (ContentBlockStart) MarshalJSON

func (c ContentBlockStart) MarshalJSON() ([]byte, error)

type ContentBlockStop

type ContentBlockStop string // Always "content_block_stop"

func (ContentBlockStop) Default

func (c ContentBlockStop) Default() ContentBlockStop

func (ContentBlockStop) MarshalJSON

func (c ContentBlockStop) MarshalJSON() ([]byte, error)

type Create added in v1.13.0

type Create string // Always "create"

func (Create) Default added in v1.13.0

func (c Create) Default() Create

func (Create) MarshalJSON added in v1.13.0

func (c Create) MarshalJSON() ([]byte, error)

type Delete added in v1.13.0

type Delete string // Always "delete"

func (Delete) Default added in v1.13.0

func (c Delete) Default() Delete

func (Delete) MarshalJSON added in v1.13.0

func (c Delete) MarshalJSON() ([]byte, error)

type Direct added in v1.19.0

type Direct string // Always "direct"

func (Direct) Default added in v1.19.0

func (c Direct) Default() Direct

func (Direct) MarshalJSON added in v1.19.0

func (c Direct) MarshalJSON() ([]byte, error)

type Disabled

type Disabled string // Always "disabled"

func (Disabled) Default

func (c Disabled) Default() Disabled

func (Disabled) MarshalJSON

func (c Disabled) MarshalJSON() ([]byte, error)

type Document

type Document string // Always "document"

func (Document) Default

func (c Document) Default() Document

func (Document) MarshalJSON

func (c Document) MarshalJSON() ([]byte, error)

type Enabled

type Enabled string // Always "enabled"

func (Enabled) Default

func (c Enabled) Default() Enabled

func (Enabled) MarshalJSON

func (c Enabled) MarshalJSON() ([]byte, error)

type EncryptedCodeExecutionResult added in v1.23.0

type EncryptedCodeExecutionResult string // Always "encrypted_code_execution_result"

func (EncryptedCodeExecutionResult) Default added in v1.23.0

func (EncryptedCodeExecutionResult) MarshalJSON added in v1.23.0

func (c EncryptedCodeExecutionResult) MarshalJSON() ([]byte, error)

type Environment added in v1.33.0

type Environment string // Always "environment"

func (Environment) Default added in v1.33.0

func (c Environment) Default() Environment

func (Environment) MarshalJSON added in v1.33.0

func (c Environment) MarshalJSON() ([]byte, error)

type EnvironmentDeleted added in v1.33.0

type EnvironmentDeleted string // Always "environment_deleted"

func (EnvironmentDeleted) Default added in v1.33.0

func (EnvironmentDeleted) MarshalJSON added in v1.33.0

func (c EnvironmentDeleted) MarshalJSON() ([]byte, error)

type Ephemeral

type Ephemeral string // Always "ephemeral"

func (Ephemeral) Default

func (c Ephemeral) Default() Ephemeral

func (Ephemeral) MarshalJSON

func (c Ephemeral) MarshalJSON() ([]byte, error)

type Error

type Error string // Always "error"

func (Error) Default

func (c Error) Default() Error

func (Error) MarshalJSON

func (c Error) MarshalJSON() ([]byte, error)

type Errored

type Errored string // Always "errored"

func (Errored) Default

func (c Errored) Default() Errored

func (Errored) MarshalJSON

func (c Errored) MarshalJSON() ([]byte, error)

type Expired

type Expired string // Always "expired"

func (Expired) Default

func (c Expired) Default() Expired

func (Expired) MarshalJSON

func (c Expired) MarshalJSON() ([]byte, error)

type File added in v1.2.0

type File string // Always "file"

func (File) Default added in v1.2.0

func (c File) Default() File

func (File) MarshalJSON added in v1.2.0

func (c File) MarshalJSON() ([]byte, error)

type Image

type Image string // Always "image"

func (Image) Default

func (c Image) Default() Image

func (Image) MarshalJSON

func (c Image) MarshalJSON() ([]byte, error)

type InputJSONDelta

type InputJSONDelta string // Always "input_json_delta"

func (InputJSONDelta) Default

func (c InputJSONDelta) Default() InputJSONDelta

func (InputJSONDelta) MarshalJSON

func (c InputJSONDelta) MarshalJSON() ([]byte, error)

type InputTokens added in v1.13.0

type InputTokens string // Always "input_tokens"

func (InputTokens) Default added in v1.13.0

func (c InputTokens) Default() InputTokens

func (InputTokens) MarshalJSON added in v1.13.0

func (c InputTokens) MarshalJSON() ([]byte, error)

type Insert added in v1.13.0

type Insert string // Always "insert"

func (Insert) Default added in v1.13.0

func (c Insert) Default() Insert

func (Insert) MarshalJSON added in v1.13.0

func (c Insert) MarshalJSON() ([]byte, error)

type InvalidRequestError

type InvalidRequestError string // Always "invalid_request_error"

func (InvalidRequestError) Default

func (InvalidRequestError) MarshalJSON

func (c InvalidRequestError) MarshalJSON() ([]byte, error)

type JSONSchema added in v1.18.0

type JSONSchema string // Always "json_schema"

func (JSONSchema) Default added in v1.18.0

func (c JSONSchema) Default() JSONSchema

func (JSONSchema) MarshalJSON added in v1.18.0

func (c JSONSchema) MarshalJSON() ([]byte, error)

type Limited added in v1.33.0

type Limited string // Always "limited"

func (Limited) Default added in v1.33.0

func (c Limited) Default() Limited

func (Limited) MarshalJSON added in v1.33.0

func (c Limited) MarshalJSON() ([]byte, error)

type MCPToolResult added in v1.2.0

type MCPToolResult string // Always "mcp_tool_result"

func (MCPToolResult) Default added in v1.2.0

func (c MCPToolResult) Default() MCPToolResult

func (MCPToolResult) MarshalJSON added in v1.2.0

func (c MCPToolResult) MarshalJSON() ([]byte, error)

type MCPToolUse added in v1.2.0

type MCPToolUse string // Always "mcp_tool_use"

func (MCPToolUse) Default added in v1.2.0

func (c MCPToolUse) Default() MCPToolUse

func (MCPToolUse) MarshalJSON added in v1.2.0

func (c MCPToolUse) MarshalJSON() ([]byte, error)

type MCPToolset added in v1.19.0

type MCPToolset string // Always "mcp_toolset"

func (MCPToolset) Default added in v1.19.0

func (c MCPToolset) Default() MCPToolset

func (MCPToolset) MarshalJSON added in v1.19.0

func (c MCPToolset) MarshalJSON() ([]byte, error)

type Memory added in v1.13.0

type Memory string // Always "memory"

func (Memory) Default added in v1.13.0

func (c Memory) Default() Memory

func (Memory) MarshalJSON added in v1.13.0

func (c Memory) MarshalJSON() ([]byte, error)

type Memory20250818 added in v1.13.0

type Memory20250818 string // Always "memory_20250818"

func (Memory20250818) Default added in v1.13.0

func (c Memory20250818) Default() Memory20250818

func (Memory20250818) MarshalJSON added in v1.13.0

func (c Memory20250818) MarshalJSON() ([]byte, error)

type Message

type Message string // Always "message"

func (Message) Default

func (c Message) Default() Message

func (Message) MarshalJSON

func (c Message) MarshalJSON() ([]byte, error)

type MessageBatch

type MessageBatch string // Always "message_batch"

func (MessageBatch) Default

func (c MessageBatch) Default() MessageBatch

func (MessageBatch) MarshalJSON

func (c MessageBatch) MarshalJSON() ([]byte, error)

type MessageBatchDeleted

type MessageBatchDeleted string // Always "message_batch_deleted"

func (MessageBatchDeleted) Default

func (MessageBatchDeleted) MarshalJSON

func (c MessageBatchDeleted) MarshalJSON() ([]byte, error)

type MessageDelta

type MessageDelta string // Always "message_delta"

func (MessageDelta) Default

func (c MessageDelta) Default() MessageDelta

func (MessageDelta) MarshalJSON

func (c MessageDelta) MarshalJSON() ([]byte, error)

type MessageStart

type MessageStart string // Always "message_start"

func (MessageStart) Default

func (c MessageStart) Default() MessageStart

func (MessageStart) MarshalJSON

func (c MessageStart) MarshalJSON() ([]byte, error)

type MessageStop

type MessageStop string // Always "message_stop"

func (MessageStop) Default

func (c MessageStop) Default() MessageStop

func (MessageStop) MarshalJSON

func (c MessageStop) MarshalJSON() ([]byte, error)

type Model

type Model string // Always "model"

func (Model) Default

func (c Model) Default() Model

func (Model) MarshalJSON

func (c Model) MarshalJSON() ([]byte, error)

type None

type None string // Always "none"

func (None) Default

func (c None) Default() None

func (None) MarshalJSON

func (c None) MarshalJSON() ([]byte, error)

type NotFoundError

type NotFoundError string // Always "not_found_error"

func (NotFoundError) Default

func (c NotFoundError) Default() NotFoundError

func (NotFoundError) MarshalJSON

func (c NotFoundError) MarshalJSON() ([]byte, error)

type Object

type Object string // Always "object"

func (Object) Default

func (c Object) Default() Object

func (Object) MarshalJSON

func (c Object) MarshalJSON() ([]byte, error)

type OverloadedError

type OverloadedError string // Always "overloaded_error"

func (OverloadedError) Default

func (c OverloadedError) Default() OverloadedError

func (OverloadedError) MarshalJSON

func (c OverloadedError) MarshalJSON() ([]byte, error)

type PageLocation

type PageLocation string // Always "page_location"

func (PageLocation) Default

func (c PageLocation) Default() PageLocation

func (PageLocation) MarshalJSON

func (c PageLocation) MarshalJSON() ([]byte, error)

type PermissionError

type PermissionError string // Always "permission_error"

func (PermissionError) Default

func (c PermissionError) Default() PermissionError

func (PermissionError) MarshalJSON

func (c PermissionError) MarshalJSON() ([]byte, error)

type RateLimitError

type RateLimitError string // Always "rate_limit_error"

func (RateLimitError) Default

func (c RateLimitError) Default() RateLimitError

func (RateLimitError) MarshalJSON

func (c RateLimitError) MarshalJSON() ([]byte, error)

type RedactedThinking

type RedactedThinking string // Always "redacted_thinking"

func (RedactedThinking) Default

func (c RedactedThinking) Default() RedactedThinking

func (RedactedThinking) MarshalJSON

func (c RedactedThinking) MarshalJSON() ([]byte, error)

type Refusal added in v1.29.0

type Refusal string // Always "refusal"

func (Refusal) Default added in v1.29.0

func (c Refusal) Default() Refusal

func (Refusal) MarshalJSON added in v1.29.0

func (c Refusal) MarshalJSON() ([]byte, error)

type Rename added in v1.13.0

type Rename string // Always "rename"

func (Rename) Default added in v1.13.0

func (c Rename) Default() Rename

func (Rename) MarshalJSON added in v1.13.0

func (c Rename) MarshalJSON() ([]byte, error)

type SearchResult added in v1.5.0

type SearchResult string // Always "search_result"

func (SearchResult) Default added in v1.5.0

func (c SearchResult) Default() SearchResult

func (SearchResult) MarshalJSON added in v1.5.0

func (c SearchResult) MarshalJSON() ([]byte, error)

type SearchResultLocation added in v1.5.0

type SearchResultLocation string // Always "search_result_location"

func (SearchResultLocation) Default added in v1.5.0

func (SearchResultLocation) MarshalJSON added in v1.5.0

func (c SearchResultLocation) MarshalJSON() ([]byte, error)

type ServerToolUse

type ServerToolUse string // Always "server_tool_use"

func (ServerToolUse) Default

func (c ServerToolUse) Default() ServerToolUse

func (ServerToolUse) MarshalJSON

func (c ServerToolUse) MarshalJSON() ([]byte, error)

type Session added in v1.33.0

type Session string // Always "session"

func (Session) Default added in v1.33.0

func (c Session) Default() Session

func (Session) MarshalJSON added in v1.33.0

func (c Session) MarshalJSON() ([]byte, error)

type SignatureDelta

type SignatureDelta string // Always "signature_delta"

func (SignatureDelta) Default

func (c SignatureDelta) Default() SignatureDelta

func (SignatureDelta) MarshalJSON

func (c SignatureDelta) MarshalJSON() ([]byte, error)

type StrReplace added in v1.13.0

type StrReplace string // Always "str_replace"

func (StrReplace) Default added in v1.13.0

func (c StrReplace) Default() StrReplace

func (StrReplace) MarshalJSON added in v1.13.0

func (c StrReplace) MarshalJSON() ([]byte, error)

type StrReplaceBasedEditTool added in v1.2.0

type StrReplaceBasedEditTool string // Always "str_replace_based_edit_tool"

func (StrReplaceBasedEditTool) Default added in v1.2.0

func (StrReplaceBasedEditTool) MarshalJSON added in v1.2.0

func (c StrReplaceBasedEditTool) MarshalJSON() ([]byte, error)

type StrReplaceEditor

type StrReplaceEditor string // Always "str_replace_editor"

func (StrReplaceEditor) Default

func (c StrReplaceEditor) Default() StrReplaceEditor

func (StrReplaceEditor) MarshalJSON

func (c StrReplaceEditor) MarshalJSON() ([]byte, error)

type Succeeded

type Succeeded string // Always "succeeded"

func (Succeeded) Default

func (c Succeeded) Default() Succeeded

func (Succeeded) MarshalJSON

func (c Succeeded) MarshalJSON() ([]byte, error)

type Text

type Text string // Always "text"

func (Text) Default

func (c Text) Default() Text

func (Text) MarshalJSON

func (c Text) MarshalJSON() ([]byte, error)

type TextDelta

type TextDelta string // Always "text_delta"

func (TextDelta) Default

func (c TextDelta) Default() TextDelta

func (TextDelta) MarshalJSON

func (c TextDelta) MarshalJSON() ([]byte, error)

type TextEditor20241022

type TextEditor20241022 string // Always "text_editor_20241022"

func (TextEditor20241022) Default

func (TextEditor20241022) MarshalJSON

func (c TextEditor20241022) MarshalJSON() ([]byte, error)

type TextEditor20250124

type TextEditor20250124 string // Always "text_editor_20250124"

func (TextEditor20250124) Default

func (TextEditor20250124) MarshalJSON

func (c TextEditor20250124) MarshalJSON() ([]byte, error)

type TextEditor20250429 added in v1.2.0

type TextEditor20250429 string // Always "text_editor_20250429"

func (TextEditor20250429) Default added in v1.2.0

func (TextEditor20250429) MarshalJSON added in v1.2.0

func (c TextEditor20250429) MarshalJSON() ([]byte, error)

type TextEditor20250728 added in v1.7.0

type TextEditor20250728 string // Always "text_editor_20250728"

func (TextEditor20250728) Default added in v1.7.0

func (TextEditor20250728) MarshalJSON added in v1.7.0

func (c TextEditor20250728) MarshalJSON() ([]byte, error)

type TextEditorCodeExecutionCreateResult added in v1.10.0

type TextEditorCodeExecutionCreateResult string // Always "text_editor_code_execution_create_result"

func (TextEditorCodeExecutionCreateResult) Default added in v1.10.0

func (TextEditorCodeExecutionCreateResult) MarshalJSON added in v1.10.0

func (c TextEditorCodeExecutionCreateResult) MarshalJSON() ([]byte, error)

type TextEditorCodeExecutionStrReplaceResult added in v1.10.0

type TextEditorCodeExecutionStrReplaceResult string // Always "text_editor_code_execution_str_replace_result"

func (TextEditorCodeExecutionStrReplaceResult) Default added in v1.10.0

func (TextEditorCodeExecutionStrReplaceResult) MarshalJSON added in v1.10.0

func (c TextEditorCodeExecutionStrReplaceResult) MarshalJSON() ([]byte, error)

type TextEditorCodeExecutionToolResult added in v1.10.0

type TextEditorCodeExecutionToolResult string // Always "text_editor_code_execution_tool_result"

func (TextEditorCodeExecutionToolResult) Default added in v1.10.0

func (TextEditorCodeExecutionToolResult) MarshalJSON added in v1.10.0

func (c TextEditorCodeExecutionToolResult) MarshalJSON() ([]byte, error)

type TextEditorCodeExecutionToolResultError added in v1.10.0

type TextEditorCodeExecutionToolResultError string // Always "text_editor_code_execution_tool_result_error"

func (TextEditorCodeExecutionToolResultError) Default added in v1.10.0

func (TextEditorCodeExecutionToolResultError) MarshalJSON added in v1.10.0

func (c TextEditorCodeExecutionToolResultError) MarshalJSON() ([]byte, error)

type TextEditorCodeExecutionViewResult added in v1.10.0

type TextEditorCodeExecutionViewResult string // Always "text_editor_code_execution_view_result"

func (TextEditorCodeExecutionViewResult) Default added in v1.10.0

func (TextEditorCodeExecutionViewResult) MarshalJSON added in v1.10.0

func (c TextEditorCodeExecutionViewResult) MarshalJSON() ([]byte, error)

type TextPlain

type TextPlain string // Always "text/plain"

func (TextPlain) Default

func (c TextPlain) Default() TextPlain

func (TextPlain) MarshalJSON

func (c TextPlain) MarshalJSON() ([]byte, error)

type Thinking

type Thinking string // Always "thinking"

func (Thinking) Default

func (c Thinking) Default() Thinking

func (Thinking) MarshalJSON

func (c Thinking) MarshalJSON() ([]byte, error)

type ThinkingDelta

type ThinkingDelta string // Always "thinking_delta"

func (ThinkingDelta) Default

func (c ThinkingDelta) Default() ThinkingDelta

func (ThinkingDelta) MarshalJSON

func (c ThinkingDelta) MarshalJSON() ([]byte, error)

type ThinkingTurns added in v1.16.0

type ThinkingTurns string // Always "thinking_turns"

func (ThinkingTurns) Default added in v1.16.0

func (c ThinkingTurns) Default() ThinkingTurns

func (ThinkingTurns) MarshalJSON added in v1.16.0

func (c ThinkingTurns) MarshalJSON() ([]byte, error)

type TimeoutError

type TimeoutError string // Always "timeout_error"

func (TimeoutError) Default

func (c TimeoutError) Default() TimeoutError

func (TimeoutError) MarshalJSON

func (c TimeoutError) MarshalJSON() ([]byte, error)

type Tokens added in v1.37.0

type Tokens string // Always "tokens"

func (Tokens) Default added in v1.37.0

func (c Tokens) Default() Tokens

func (Tokens) MarshalJSON added in v1.37.0

func (c Tokens) MarshalJSON() ([]byte, error)

type Tool

type Tool string // Always "tool"

func (Tool) Default

func (c Tool) Default() Tool

func (Tool) MarshalJSON

func (c Tool) MarshalJSON() ([]byte, error)

type ToolReference added in v1.19.0

type ToolReference string // Always "tool_reference"

func (ToolReference) Default added in v1.19.0

func (c ToolReference) Default() ToolReference

func (ToolReference) MarshalJSON added in v1.19.0

func (c ToolReference) MarshalJSON() ([]byte, error)

type ToolResult

type ToolResult string // Always "tool_result"

func (ToolResult) Default

func (c ToolResult) Default() ToolResult

func (ToolResult) MarshalJSON

func (c ToolResult) MarshalJSON() ([]byte, error)

type ToolSearchToolBm25 added in v1.19.0

type ToolSearchToolBm25 string // Always "tool_search_tool_bm25"

func (ToolSearchToolBm25) Default added in v1.19.0

func (ToolSearchToolBm25) MarshalJSON added in v1.19.0

func (c ToolSearchToolBm25) MarshalJSON() ([]byte, error)

type ToolSearchToolRegex added in v1.19.0

type ToolSearchToolRegex string // Always "tool_search_tool_regex"

func (ToolSearchToolRegex) Default added in v1.19.0

func (ToolSearchToolRegex) MarshalJSON added in v1.19.0

func (c ToolSearchToolRegex) MarshalJSON() ([]byte, error)

type ToolSearchToolResult added in v1.19.0

type ToolSearchToolResult string // Always "tool_search_tool_result"

func (ToolSearchToolResult) Default added in v1.19.0

func (ToolSearchToolResult) MarshalJSON added in v1.19.0

func (c ToolSearchToolResult) MarshalJSON() ([]byte, error)

type ToolSearchToolResultError added in v1.19.0

type ToolSearchToolResultError string // Always "tool_search_tool_result_error"

func (ToolSearchToolResultError) Default added in v1.19.0

func (ToolSearchToolResultError) MarshalJSON added in v1.19.0

func (c ToolSearchToolResultError) MarshalJSON() ([]byte, error)

type ToolSearchToolSearchResult added in v1.19.0

type ToolSearchToolSearchResult string // Always "tool_search_tool_search_result"

func (ToolSearchToolSearchResult) Default added in v1.19.0

func (ToolSearchToolSearchResult) MarshalJSON added in v1.19.0

func (c ToolSearchToolSearchResult) MarshalJSON() ([]byte, error)

type ToolUse

type ToolUse string // Always "tool_use"

func (ToolUse) Default

func (c ToolUse) Default() ToolUse

func (ToolUse) MarshalJSON

func (c ToolUse) MarshalJSON() ([]byte, error)

type ToolUses added in v1.13.0

type ToolUses string // Always "tool_uses"

func (ToolUses) Default added in v1.13.0

func (c ToolUses) Default() ToolUses

func (ToolUses) MarshalJSON added in v1.13.0

func (c ToolUses) MarshalJSON() ([]byte, error)

type URL

type URL string // Always "url"

func (URL) Default

func (c URL) Default() URL

func (URL) MarshalJSON

func (c URL) MarshalJSON() ([]byte, error)

type Unrestricted added in v1.33.0

type Unrestricted string // Always "unrestricted"

func (Unrestricted) Default added in v1.33.0

func (c Unrestricted) Default() Unrestricted

func (Unrestricted) MarshalJSON added in v1.33.0

func (c Unrestricted) MarshalJSON() ([]byte, error)

type View added in v1.13.0

type View string // Always "view"

func (View) Default added in v1.13.0

func (c View) Default() View

func (View) MarshalJSON added in v1.13.0

func (c View) MarshalJSON() ([]byte, error)

type WebFetch added in v1.12.0

type WebFetch string // Always "web_fetch"

func (WebFetch) Default added in v1.12.0

func (c WebFetch) Default() WebFetch

func (WebFetch) MarshalJSON added in v1.12.0

func (c WebFetch) MarshalJSON() ([]byte, error)

type WebFetch20250910 added in v1.12.0

type WebFetch20250910 string // Always "web_fetch_20250910"

func (WebFetch20250910) Default added in v1.12.0

func (c WebFetch20250910) Default() WebFetch20250910

func (WebFetch20250910) MarshalJSON added in v1.12.0

func (c WebFetch20250910) MarshalJSON() ([]byte, error)

type WebFetch20260209 added in v1.23.0

type WebFetch20260209 string // Always "web_fetch_20260209"

func (WebFetch20260209) Default added in v1.23.0

func (c WebFetch20260209) Default() WebFetch20260209

func (WebFetch20260209) MarshalJSON added in v1.23.0

func (c WebFetch20260209) MarshalJSON() ([]byte, error)

type WebFetch20260309 added in v1.27.0

type WebFetch20260309 string // Always "web_fetch_20260309"

func (WebFetch20260309) Default added in v1.27.0

func (c WebFetch20260309) Default() WebFetch20260309

func (WebFetch20260309) MarshalJSON added in v1.27.0

func (c WebFetch20260309) MarshalJSON() ([]byte, error)

type WebFetchResult added in v1.12.0

type WebFetchResult string // Always "web_fetch_result"

func (WebFetchResult) Default added in v1.12.0

func (c WebFetchResult) Default() WebFetchResult

func (WebFetchResult) MarshalJSON added in v1.12.0

func (c WebFetchResult) MarshalJSON() ([]byte, error)

type WebFetchToolResult added in v1.12.0

type WebFetchToolResult string // Always "web_fetch_tool_result"

func (WebFetchToolResult) Default added in v1.12.0

func (WebFetchToolResult) MarshalJSON added in v1.12.0

func (c WebFetchToolResult) MarshalJSON() ([]byte, error)

type WebFetchToolResultError added in v1.12.0

type WebFetchToolResultError string // Always "web_fetch_tool_result_error"

func (WebFetchToolResultError) Default added in v1.12.0

func (WebFetchToolResultError) MarshalJSON added in v1.12.0

func (c WebFetchToolResultError) MarshalJSON() ([]byte, error)

type WebSearch

type WebSearch string // Always "web_search"

func (WebSearch) Default

func (c WebSearch) Default() WebSearch

func (WebSearch) MarshalJSON

func (c WebSearch) MarshalJSON() ([]byte, error)

type WebSearch20250305

type WebSearch20250305 string // Always "web_search_20250305"

func (WebSearch20250305) Default

func (WebSearch20250305) MarshalJSON

func (c WebSearch20250305) MarshalJSON() ([]byte, error)

type WebSearch20260209 added in v1.23.0

type WebSearch20260209 string // Always "web_search_20260209"

func (WebSearch20260209) Default added in v1.23.0

func (WebSearch20260209) MarshalJSON added in v1.23.0

func (c WebSearch20260209) MarshalJSON() ([]byte, error)

type WebSearchResult

type WebSearchResult string // Always "web_search_result"

func (WebSearchResult) Default

func (c WebSearchResult) Default() WebSearchResult

func (WebSearchResult) MarshalJSON

func (c WebSearchResult) MarshalJSON() ([]byte, error)

type WebSearchResultLocation

type WebSearchResultLocation string // Always "web_search_result_location"

func (WebSearchResultLocation) Default

func (WebSearchResultLocation) MarshalJSON

func (c WebSearchResultLocation) MarshalJSON() ([]byte, error)

type WebSearchToolResult

type WebSearchToolResult string // Always "web_search_tool_result"

func (WebSearchToolResult) Default

func (WebSearchToolResult) MarshalJSON

func (c WebSearchToolResult) MarshalJSON() ([]byte, error)

type WebSearchToolResultError

type WebSearchToolResultError string // Always "web_search_tool_result_error"

func (WebSearchToolResultError) Default

func (WebSearchToolResultError) MarshalJSON

func (c WebSearchToolResultError) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL