server_info
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| AuthConflict clawd_code_sdk.models.server_info Sources of the auth token and API key when both are configured. |
||
| ClaudeCodeAccountInfo clawd_code_sdk.models.server_info Account information from Claude Code. |
||
| ClaudeCodeAgentInfo clawd_code_sdk.models.server_info Information about an available subagent from Claude Code server. |
||
| ClaudeCodeCommandInfo clawd_code_sdk.models.server_info Information about an available slash command from Claude Code. |
||
| ClaudeCodeModelInfo clawd_code_sdk.models.server_info Information about an available AI model from Claude Code. |
||
| ClaudeCodeServerInfo clawd_code_sdk.models.server_info Complete server initialization info from Claude Code. |
||
| FeedbackMode clawd_code_sdk.models.server_info Feedback collection mode. |
🛈 DocStrings¶
Pydantic models for Claude Code server info structures.
AuthConflict
¶
Bases: ClaudeCodeBaseModel
Sources of the auth token and API key when both are configured.
Source code in src/clawd_code_sdk/models/server_info.py
ClaudeCodeAccountInfo
¶
Bases: ClaudeCodeBaseModel
Account information from Claude Code.
Source code in src/clawd_code_sdk/models/server_info.py
api_key_source
class-attribute
instance-attribute
¶
Where API key comes from (e.g., "ANTHROPIC_API_KEY").
api_provider
class-attribute
instance-attribute
¶
Active API backend.
Anthropic OAuth login only applies when "firstParty"; for 3P providers the other fields are absent and auth is external (AWS creds, gcloud ADC, etc.).
organization
class-attribute
instance-attribute
¶
Organization name.
subscription_type
class-attribute
instance-attribute
¶
Subscription type (e.g., "Claude API").
token_source
class-attribute
instance-attribute
¶
Where tokens come from (e.g., "claude.ai").
ClaudeCodeAgentInfo
¶
Bases: ClaudeCodeBaseModel
Information about an available subagent from Claude Code server.
Source code in src/clawd_code_sdk/models/server_info.py
model
class-attribute
instance-attribute
¶
Model alias this agent uses. If omitted, inherits the parent's model.
ClaudeCodeCommandInfo
¶
Bases: ClaudeCodeBaseModel
Information about an available slash command from Claude Code.
Source code in src/clawd_code_sdk/models/server_info.py
aliases
class-attribute
instance-attribute
¶
Alternate names that resolve to the command (e.g., /cost / /stats both resolve to /usage).
argument_hint
instance-attribute
¶
Usage hint for command arguments (may be empty string).
builtin
class-attribute
instance-attribute
¶
Whether this is a built-in command (as opposed to a skill/plugin/custom command).
ClaudeCodeModelInfo
¶
Bases: ClaudeCodeBaseModel
Information about an available AI model from Claude Code.
Source code in src/clawd_code_sdk/models/server_info.py
description
instance-attribute
¶
Full description including capabilities and pricing.
disabled
class-attribute
instance-attribute
¶
Visible but not selectable (only set for entries in unavailable_models).
display_name
instance-attribute
¶
Human-readable display name (e.g., "Opus", "Default (recommended)").
resolved_model
class-attribute
instance-attribute
¶
Concrete model ID this entry resolves to (e.g. for aliases).
supported_effort_levels
class-attribute
instance-attribute
¶
Supported effort levels.
supports_adaptive_thinking
class-attribute
instance-attribute
¶
Whether the model supports adaptive thinking.
supports_auto_mode
class-attribute
instance-attribute
¶
Whether the model supports auto mode.
supports_effort
class-attribute
instance-attribute
¶
Whether the model supports effort setting.
supports_fast_mode
class-attribute
instance-attribute
¶
Whether the model supports fast mode.
supports_thinking_off
class-attribute
instance-attribute
¶
Whether thinking can be turned off for the model.
value
instance-attribute
¶
Model identifier used in API calls (e.g., "default", "opus", "haiku").
ClaudeCodeServerInfo
¶
Bases: ClaudeCodeBaseModel
Complete server initialization info from Claude Code.
This is returned by the Claude Code server during initialization and contains all available capabilities including models, commands, output styles, and account information.
Source code in src/clawd_code_sdk/models/server_info.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | |
account
class-attribute
instance-attribute
¶
account: ClaudeCodeAccountInfo | None = Field(default=None)
Account and authentication information.
agents
class-attribute
instance-attribute
¶
agents: list[ClaudeCodeAgentInfo] = Field(default_factory=list)
List of available subagents.
auth_conflict
class-attribute
instance-attribute
¶
auth_conflict: AuthConflict | None = None
Set when both an auth token and an API key are configured (source names only).
auto_default_nudge
class-attribute
instance-attribute
¶
IDE hosts only: the defaultMode the auto-default nudge offers to replace.
available_output_styles
class-attribute
instance-attribute
¶
List of all available output styles.
capabilities
class-attribute
instance-attribute
¶
Feature capability tags supported by the CLI (undocumented, informational).
claude_code_version
class-attribute
instance-attribute
¶
Version of the Claude Code process answering initialize.
claude_in_chrome_at_startup
class-attribute
instance-attribute
¶
Whether an IDE host should connect Claude in Chrome when the session starts.
claude_in_chrome_prompt_disabled
class-attribute
instance-attribute
¶
True when CLAUDE_CODE_DISABLE_CFC_PROMPT is set.
code_running_mcp_tools_applied
class-attribute
instance-attribute
¶
MCP tools declared via codeRunningMcpTools, keyed by server name.
commands
class-attribute
instance-attribute
¶
commands: list[ClaudeCodeCommandInfo] = Field(default_factory=list)
List of available slash commands.
current_model
class-attribute
instance-attribute
¶
The CLI's active model at connect time.
current_permission_mode
class-attribute
instance-attribute
¶
Permission mode the session is currently in (undocumented).
fast_mode_disabled_reason
class-attribute
instance-attribute
¶
Why fast mode is unavailable, if it is.
fast_mode_state
class-attribute
instance-attribute
¶
Fast mode state: off, in cooldown after rate limit, or actively enabled.
feedback_mode
class-attribute
instance-attribute
¶
feedback_mode: FeedbackMode | None = None
How the CLI collects feedback (undocumented).
feedback_survey_config
class-attribute
instance-attribute
¶
Present only when the host may show the feedback survey (undocumented structure).
footer_indicator
class-attribute
instance-attribute
¶
The terminal's configured footer pill (undocumented structure).
hook_on_failure_supported
class-attribute
instance-attribute
¶
Whether the CLI honors on_failure on hook matchers.
hooks_applied
class-attribute
instance-attribute
¶
False when the process was already running and did not register SDK hooks.
hooks_when_unanswered_kept
class-attribute
instance-attribute
¶
Number of registered hook matchers whose whenUnanswered the CLI kept.
host_worded_asks
class-attribute
instance-attribute
¶
Desktop host only: PreToolUse asks are sent to the host as can_use_tool requests.
inbound_read_receipts
class-attribute
instance-attribute
¶
Remote Control hosts only: client messages get processing/processed receipts.
managed_settings_applied
class-attribute
instance-attribute
¶
Whether the initialize's managedSettings match the ones stored at launch.
mcp_servers_applied
class-attribute
instance-attribute
¶
Whether the initialize's mcpServers match the set read at launch.
models
class-attribute
instance-attribute
¶
models: list[ClaudeCodeModelInfo] = Field(default_factory=list)
List of available AI models.
output_style
class-attribute
instance-attribute
¶
Current output style setting.
permission_mode_from_default_fallback
class-attribute
instance-attribute
¶
IDE hosts only: permission mode is auto because no settings source configured one.
plugins_applied
class-attribute
instance-attribute
¶
Whether every plugin sent via initialize is loaded.
session_state
class-attribute
instance-attribute
¶
Current session state, e.g. "idle" (undocumented).
survey_followup_box
class-attribute
instance-attribute
¶
Survey follow-up config for VS Code/desktop hosts (undocumented structure).
unavailable_models
class-attribute
instance-attribute
¶
unavailable_models: list[ClaudeCodeModelInfo] | None = None
Models the account can see but not select (e.g. excluded by org ZDR settings).
user_output_styles_dir
class-attribute
instance-attribute
¶
Directory for user-defined output styles (undocumented).
workspace_trust_recorded
class-attribute
instance-attribute
¶
Outcome of the workspaceTrust attestation.