AnthropicModelConfig
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| BaseModelConfig llmling_models_config.configs Base for model configurations. |
â‹” Inheritance diagram¶
graph TD
2095943598["configs.AnthropicModelConfig"]
3497727833["configs.BaseModelConfig"]
330168112["schema.Schema"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
3497727833 --> 2095943598
330168112 --> 3497727833
3879467795 --> 330168112
2751680898 --> 3879467795
🛈 DocStrings¶
Bases: BaseModelConfig
Configuration for Anthropic models.
Source code in src/llmling_models_config/configs.py
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 | |
cache_instructions
class-attribute
instance-attribute
¶
cache_instructions: bool | Literal["5m", "1h"] | None = Field(
default=None, title="Cache instructions"
)
Whether to add cache_control to the last system prompt block.
cache_messages
class-attribute
instance-attribute
¶
Convenience setting to enable caching for the last user message.
cache_tool_definitions
class-attribute
instance-attribute
¶
cache_tool_definitions: bool | Literal["5m", "1h"] | None = Field(
default=None, title="Cache tool definitions"
)
Whether to add cache_control to the last tool definition.
container
class-attribute
instance-attribute
¶
container: dict[str, Any] | Literal[False] | None = Field(
default=None,
title="Container sandbox",
examples=[
{"id": "container-123"},
{"id": "my-container", "skills": [{"skill_id": "computer", "type": "anthropic"}]},
False,
],
)
Container sandbox configuration for Claude.
Enables running Claude in a sandboxed container environment with optional skills. Set to False to explicitly disable container mode, or provide config dict: - id: Container identifier - skills: List of skills with skill_id, type ('anthropic' or 'custom'), and version
extra_body
class-attribute
instance-attribute
¶
Extra body to send to the model.
extra_headers
class-attribute
instance-attribute
¶
extra_headers: dict[str, str] | None = Field(
default=None, examples=[{"Custom-Header": "value"}], title="Extra headers"
)
Extra headers to send to the model.
frequency_penalty
class-attribute
instance-attribute
¶
frequency_penalty: float | None = Field(
default=None, ge=-2.0, le=2.0, examples=[-1.0, 0.0, 0.5, 1.0], title="Frequency penalty"
)
Penalize new tokens based on their existing frequency in the text so far.
identifier
class-attribute
instance-attribute
¶
identifier: AnthropicModelName | str = Field(
examples=["claude-3-opus", "claude-3-sonnet"], title="Model identifier"
)
String identifier for the model.
logit_bias
class-attribute
instance-attribute
¶
logit_bias: dict[str, int] | None = Field(
default=None, title="Logit bias", examples=[{"5678": -100}, {"1234": 100}]
)
Modify the likelihood of specified tokens appearing in the completion.
max_tokens
class-attribute
instance-attribute
¶
max_tokens: int | None = Field(
default=None, ge=1, examples=[1024, 2048, 4096], title="Maximum tokens"
)
The maximum number of tokens to generate before stopping.
metadata
class-attribute
instance-attribute
¶
An object describing metadata about the request.
parallel_tool_calls
class-attribute
instance-attribute
¶
Whether to allow parallel tool calls.
presence_penalty
class-attribute
instance-attribute
¶
presence_penalty: float | None = Field(
default=None, ge=-2.0, le=2.0, examples=[-1.0, 0.0, 0.5, 1.0], title="Presence penalty"
)
Penalize new tokens based on whether they have appeared in the text so far.
seed
class-attribute
instance-attribute
¶
The random seed to use for the model, theoretically allowing for deterministic results.
stop_sequences
class-attribute
instance-attribute
¶
stop_sequences: list[str] | None = Field(
default=None, examples=[["STOP", "END"], ["\n\n"]], title="Stop sequences"
)
Sequences that will cause the model to stop generating.
temperature
class-attribute
instance-attribute
¶
temperature: float | None = Field(
default=None, ge=0.0, examples=[0.0, 0.7, 1.0, 2.0], title="Temperature"
)
Amount of randomness injected into the response.
thinking_budget
class-attribute
instance-attribute
¶
thinking_budget: int | None = Field(
default=None, ge=1024, examples=[10000, 50000, 100000], title="Thinking budget tokens"
)
Budget tokens for extended thinking mode.
When set, enables Claude's extended thinking capability, allowing the model to reason through complex problems before responding. Higher values allow for more thorough reasoning but increase latency and cost.
timeout
class-attribute
instance-attribute
¶
Override the client-level default timeout for a request, in seconds.
top_p
class-attribute
instance-attribute
¶
top_p: float | None = Field(
default=None, ge=0.0, le=1.0, examples=[0.1, 0.9, 1.0], title="Top-p (nucleus sampling)"
)
An alternative to sampling with temperature, called nucleus sampling.
type
class-attribute
instance-attribute
¶
Type identifier for Anthropic model.
get_model_settings
¶
Get model settings in pydantic-ai format.