configs
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| AnthropicModelConfig llmling_models_config.configs Configuration for Anthropic models. |
||
| AugmentedModelConfig llmling_models_config.configs Configuration for model with pre/post prompt processing. |
||
| BaseModelConfig llmling_models_config.configs Base for model configurations. |
||
| DelegationModelConfig llmling_models_config.configs Configuration for delegation-based model selection. |
||
| FallbackModelConfig llmling_models_config.configs Configuration for fallback strategy. |
||
| FunctionModelConfig llmling_models_config.configs Configuration for function-based model references. |
||
| GeminiModelConfig llmling_models_config.configs Configuration for Gemini models. |
||
| ImportModelConfig llmling_models_config.configs Configuration for importing external models. |
||
| InputModelConfig llmling_models_config.configs Configuration for human input model. |
||
| ModelSettings llmling_models_config.configs Settings to configure an LLM. |
||
| OpenAIModelConfig llmling_models_config.configs Configuration for OpenAI models. |
||
| OpenRouterModelConfig llmling_models_config.configs Configuration for OpenRouter models. |
||
| PrePostPromptConfig llmling_models_config.configs Configuration for pre/post prompts. |
||
| RemoteInputConfig llmling_models_config.configs Configuration for remote human input. |
||
| RemoteProxyConfig llmling_models_config.configs Configuration for remote model proxy. |
||
| StringModelConfig llmling_models_config.configs Configuration for string-based model references. |
||
| TestModelConfig llmling_models_config.configs Configuration for test models. |
||
| UserSelectModelConfig llmling_models_config.configs Configuration for interactive model selection. |
🛈 DocStrings¶
Model configuration.
This is a lightweight config-only package for fast imports.
For the actual models, use from llmling_models import ....
AnthropicModelConfig
¶
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.
Source code in src/llmling_models_config/configs.py
AugmentedModelConfig
¶
Bases: BaseModelConfig
Configuration for model with pre/post prompt processing.
The post-prompt is not applied when the model is streamed (only the pre-prompt is).
Source code in src/llmling_models_config/configs.py
main_model
class-attribute
instance-attribute
¶
main_model: ModelId | BaseModelConfig | str = Field(
examples=["openai:gpt-5-nano", "anthropic:claude-sonnet-4-5"], title="Primary model"
)
The primary model identifier.
post_prompt
class-attribute
instance-attribute
¶
post_prompt: PrePostPromptConfig | None = Field(default=None, title='Post-processing prompt')
Optional configuration for prompt postprocessing.
pre_prompt
class-attribute
instance-attribute
¶
pre_prompt: PrePostPromptConfig | None = Field(default=None, title='Pre-processing prompt')
Optional configuration for prompt preprocessing.
type
class-attribute
instance-attribute
¶
Type identifier for augmented model.
BaseModelConfig
¶
Bases: Schema
Base for model configurations.
Source code in src/llmling_models_config/configs.py
DelegationModelConfig
¶
Bases: BaseModelConfig
Configuration for delegation-based model selection.
Source code in src/llmling_models_config/configs.py
model_descriptions
class-attribute
instance-attribute
¶
model_descriptions: dict[str, str] | None = Field(
default=None,
title="Model descriptions",
examples=[
{
"openai:gpt-5-nano": "A small, fast model",
"anthropic:claude-sonnet-4-5": "A large, powerful model",
}
],
)
Optional descriptions of each model for selection purposes.
models
class-attribute
instance-attribute
¶
models: list[ModelId | str | BaseModelConfig] = Field(
min_length=1,
title="Available models",
examples=[["openai:gpt-5-nano", "anthropic:claude-sonnet-4-5"]],
)
List of available models to choose from.
selection_prompt
class-attribute
instance-attribute
¶
selection_prompt: str = Field(
examples=["Choose the best model for this task", "Select appropriate model"],
title="Selection prompt",
)
Prompt used to guide the selector model's decision.
selector_model
class-attribute
instance-attribute
¶
selector_model: ModelId | str | BaseModelConfig = Field(
examples=["openai:gpt-5-nano"], title="Selector model"
)
Model responsible for selecting which model to use.
type
class-attribute
instance-attribute
¶
Type identifier for delegation model.
FallbackModelConfig
¶
Bases: BaseModelConfig
Configuration for fallback strategy.
Source code in src/llmling_models_config/configs.py
models
class-attribute
instance-attribute
¶
models: list[ModelId | str | BaseModelConfig] = Field(
min_length=1,
title="Fallback models",
examples=[["openai:gpt-5-nano", "anthropic:claude-sonnet-4-5"]],
)
Ordered list of models to try in sequence.
type
class-attribute
instance-attribute
¶
Type identifier for fallback model.
FunctionModelConfig
¶
Bases: BaseModelConfig
Configuration for function-based model references.
Source code in src/llmling_models_config/configs.py
GeminiModelConfig
¶
Bases: BaseModelConfig
Configuration for Gemini models.
Source code in src/llmling_models_config/configs.py
1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 | |
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: GeminiModelName | str = Field(
examples=["gemini-2.0-flash", "gemini-1.5-pro"], title="Model identifier"
)
String identifier for the model.
labels
class-attribute
instance-attribute
¶
User-defined metadata to break down billed charges.
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.
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.
safety_settings
class-attribute
instance-attribute
¶
Safety settings options for Gemini model request.
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_config
class-attribute
instance-attribute
¶
Thinking features configuration.
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 Gemini model.
get_model_settings
¶
Get model settings in pydantic-ai format.
Source code in src/llmling_models_config/configs.py
ImportModelConfig
¶
Bases: BaseModelConfig
Configuration for importing external models.
Source code in src/llmling_models_config/configs.py
InputModelConfig
¶
Bases: BaseModelConfig
Configuration for human input model.
Source code in src/llmling_models_config/configs.py
handler
class-attribute
instance-attribute
¶
handler: ImportString[Any] = Field(
default="llmling_models:DefaultInputHandler", validate_default=True, title="Input handler"
)
Handler for processing user input.
input_prompt
class-attribute
instance-attribute
¶
input_prompt: str = Field(
default="Your response: ",
examples=["Your response: ", "Enter reply: "],
title="Input request text",
)
Text displayed when requesting input.
prompt_template
class-attribute
instance-attribute
¶
prompt_template: str = Field(
default="👤 Please respond to: {prompt}",
examples=["👤 Please respond to: {prompt}", "User input required: {prompt}"],
title="Prompt display template",
)
Template for displaying the prompt to the user.
show_system
class-attribute
instance-attribute
¶
Whether to show system messages.
type
class-attribute
instance-attribute
¶
Type identifier for input model.
ModelSettings
¶
Bases: Schema
Settings to configure an LLM.
Source code in src/llmling_models_config/configs.py
1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 | |
frequency_penalty
class-attribute
instance-attribute
¶
frequency_penalty: float | None = Field(
default=None, ge=-2.0, le=2.0, examples=[0.0, 0.5, 1.0], title="Frequency penalty"
)
Penalize new tokens based on their existing frequency in the text so far.
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_output_tokens
class-attribute
instance-attribute
¶
max_output_tokens: int | None = Field(
default=None, examples=[1024, 2048, 4096], title="Maximum output tokens"
)
The maximum number of tokens to generate.
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=[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.
temperature
class-attribute
instance-attribute
¶
temperature: float | None = Field(
default=None, ge=0.0, le=2.0, examples=[0.7, 1.0, 1.5], title="Temperature"
)
Amount of randomness in the response (0.0 - 2.0).
timeout
class-attribute
instance-attribute
¶
timeout: float | None = Field(
default=None, ge=0.0, examples=[30.0, 60.0, 120.0], title="Request timeout"
)
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.9, 0.95, 1.0], title="Top-p (nucleus sampling)"
)
An alternative to sampling with temperature, called nucleus sampling.
to_dict
¶
OpenAIModelConfig
¶
Bases: BaseModelConfig
Configuration for OpenAI models.
Source code in src/llmling_models_config/configs.py
577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 | |
builtin_tools
class-attribute
instance-attribute
¶
The provided OpenAI built-in tools to use (file_search, web_search, computer).
See OpenAI's built-in tools for more details.
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: OpenaiModelName | str = Field(
examples=["gpt-4", "gpt-4-turbo"], title="Model identifier"
)
String identifier for the model.
include_code_execution_outputs
class-attribute
instance-attribute
¶
include_code_execution_outputs: bool | None = Field(
default=None, title="Include code execution outputs"
)
Whether to include the code execution results in the response.
include_file_search_results
class-attribute
instance-attribute
¶
Whether to include the file search results in the response.
include_web_search_sources
class-attribute
instance-attribute
¶
Whether to include the web search results in the response.
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.
logprobs
class-attribute
instance-attribute
¶
Include log probabilities in the response.
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.
parallel_tool_calls
class-attribute
instance-attribute
¶
Whether to allow parallel tool calls.
prediction
class-attribute
instance-attribute
¶
prediction: dict[str, Any] | None = Field(
default=None,
title="Predicted output",
examples=[{"type": "content", "content": "predicted response text"}],
)
Predicted output for the model to use as a starting point.
Can be a simple string content or structured with text parts: - Simple: {"type": "content", "content": "predicted text"} - Parts: {"type": "content", "content": [{"type": "text", "text": "predicted"}]}
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.
previous_response_id
class-attribute
instance-attribute
¶
previous_response_id: Literal["auto"] | str | None = Field(
default=None, title="Previous response ID"
)
The ID of a previous response to use as the starting point for a continued conversation.
When set to 'auto', the request automatically uses the most recent provider_response_id.
prompt_cache_key
class-attribute
instance-attribute
¶
Used by OpenAI to cache responses for similar requests to optimize your cache hit rates.
See the OpenAI Prompt Caching documentation for more information.
prompt_cache_retention
class-attribute
instance-attribute
¶
prompt_cache_retention: Literal["in-memory", "24h"] | None = Field(
default=None, title="Prompt cache retention"
)
The retention policy for the prompt cache. Set to 24h to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours.
See the OpenAI Prompt Caching documentation for more information.
reasoning_effort
class-attribute
instance-attribute
¶
reasoning_effort: Literal["none", "minimal", "low", "medium", "high", "xhigh"] | None = Field(
default=None, title="Reasoning effort"
)
Constrains effort on reasoning for reasoning models.
reasoning_summary
class-attribute
instance-attribute
¶
reasoning_summary: Literal["detailed", "concise", "auto"] | None = Field(
default=None, title="Reasoning summary"
)
A summary of the reasoning performed by the model.
This can be useful for debugging and understanding the model's reasoning process.
One of concise, detailed, or auto.
seed
class-attribute
instance-attribute
¶
The random seed to use for the model, theoretically allowing for deterministic results.
send_reasoning_ids
class-attribute
instance-attribute
¶
Whether to send the unique IDs of reasoning, text, and function call parts from the message history to the model.
Enabled by default for reasoning models. Disable if you get errors about items not matching.
service_tier
class-attribute
instance-attribute
¶
service_tier: Literal["auto", "default", "flex", "priority"] | None = Field(
default=None, title="Service tier"
)
The service tier to use for the model request.
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.
text_verbosity
class-attribute
instance-attribute
¶
text_verbosity: Literal["low", "medium", "high"] | None = Field(
default=None, title="Text verbosity"
)
Constrains the verbosity of the model's text response.
Lower values will result in more concise responses, while higher values will result in more verbose responses.
timeout
class-attribute
instance-attribute
¶
Override the client-level default timeout for a request, in seconds.
top_logprobs
class-attribute
instance-attribute
¶
Include log probabilities of the top n tokens in the response.
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.
truncation
class-attribute
instance-attribute
¶
The truncation strategy to use for the model response.
disabled(default): Request fails if response exceeds context window.auto: Model truncates by dropping input items in the middle of the conversation.
type
class-attribute
instance-attribute
¶
Type identifier for OpenAI model.
user
class-attribute
instance-attribute
¶
A unique identifier representing the end-user.
get_model_settings
¶
Get model settings in pydantic-ai format.
Source code in src/llmling_models_config/configs.py
OpenRouterModelConfig
¶
Bases: BaseModelConfig
Configuration for OpenRouter models.
OpenRouter provides access to many models through a unified API.
Source code in src/llmling_models_config/configs.py
867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 | |
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: OpenrouterModelName | str = Field(
examples=["anthropic/claude-3.5-sonnet", "openai/gpt-4-turbo"], title="Model identifier"
)
String identifier for the model.
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.
models
class-attribute
instance-attribute
¶
models: list[str] | None = Field(
default=None, title="Fallback models", examples=[["anthropic/claude-3-sonnet", "openai/gpt-4"]]
)
List of fallback models to try if the primary model fails.
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.
preset
class-attribute
instance-attribute
¶
Named preset configuration for common use cases.
provider
class-attribute
instance-attribute
¶
provider: dict[str, Any] | None = Field(
default=None,
title="Provider configuration",
examples=[
{"order": ["anthropic", "openai"], "allow_fallbacks": True},
{"only": ["anthropic"], "data_collection": "deny"},
],
)
Provider routing configuration.
Options include: - order: List of provider preferences - allow_fallbacks: Whether to allow fallback providers - require_parameters: Require providers to support all parameters - data_collection: 'allow' or 'deny' data collection - only: Restrict to specific providers - ignore: Exclude specific providers - quantizations: Preferred quantization levels - sort: Sort by 'price', 'throughput', or 'latency'
reasoning
class-attribute
instance-attribute
¶
reasoning: dict[str, Any] | None = Field(
default=None,
title="Reasoning configuration",
examples=[{"effort": "high", "max_tokens": 10000}, {"effort": "medium", "exclude": True}],
)
Reasoning/thinking configuration.
Options include: - effort: 'high', 'medium', or 'low' - max_tokens: Maximum tokens for reasoning - exclude: Whether to exclude reasoning from response - enabled: Enable/disable reasoning
seed
class-attribute
instance-attribute
¶
The random seed to use for the model.
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.
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.
transforms
class-attribute
instance-attribute
¶
List of transforms to apply to requests.
type
class-attribute
instance-attribute
¶
Type identifier for OpenRouter model.
usage
class-attribute
instance-attribute
¶
usage: dict[str, Any] | None = Field(
default=None, title="Usage configuration", examples=[{"include": True}]
)
Usage tracking configuration.
get_model_settings
¶
Get model settings in pydantic-ai format.
Source code in src/llmling_models_config/configs.py
PrePostPromptConfig
¶
Bases: Schema
Configuration for pre/post prompts.
Source code in src/llmling_models_config/configs.py
model
class-attribute
instance-attribute
¶
model: ModelId | BaseModelConfig | str = Field(
examples=[["openai:gpt-5-nano", "anthropic:claude-sonnet-4-5"]], title="Model identifier"
)
The model to use for processing the prompt.
text
class-attribute
instance-attribute
¶
text: str = Field(
examples=["You are a helpful assistant", "Process this carefully"], title="Prompt text"
)
The prompt text to be applied.
RemoteInputConfig
¶
Bases: BaseModelConfig
Configuration for remote human input.
Source code in src/llmling_models_config/configs.py
api_key
class-attribute
instance-attribute
¶
Optional API key for authentication.
type
class-attribute
instance-attribute
¶
Type identifier for remote input model.
url
class-attribute
instance-attribute
¶
url: str = Field(
default="ws://localhost:8000/v1/chat/stream",
examples=["ws://localhost:8000/v1/chat/stream", "wss://api.example.com/chat"],
title="WebSocket URL",
)
WebSocket URL for connecting to the remote input service.
RemoteProxyConfig
¶
Bases: BaseModelConfig
Configuration for remote model proxy.
Source code in src/llmling_models_config/configs.py
api_key
class-attribute
instance-attribute
¶
Optional API key for authentication.
type
class-attribute
instance-attribute
¶
Type identifier for remote proxy model.
url
class-attribute
instance-attribute
¶
url: str = Field(
default="ws://localhost:8000/v1/completion/stream",
examples=["ws://localhost:8000/v1/completion/stream", "wss://api.example.com/completion"],
title="WebSocket URL",
)
WebSocket URL for connecting to the remote model service.
StringModelConfig
¶
Bases: BaseModelConfig
Configuration for string-based model references.
Source code in src/llmling_models_config/configs.py
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | |
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: ModelId | str = Field(
examples=["openai:gpt-5-nano", "anthropic:claude-sonnet-4-5"], 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.
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.
timeout
class-attribute
instance-attribute
¶
timeout: float | None = Field(
default=None, ge=0.0, examples=[30.0, 60.0, 120.0], title="Request timeout"
)
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 string model.
get_model_settings
¶
Get model settings in pydantic-ai format.
Source code in src/llmling_models_config/configs.py
TestModelConfig
¶
Bases: BaseModelConfig
Configuration for test models.
Source code in src/llmling_models_config/configs.py
call_tools
class-attribute
instance-attribute
¶
call_tools: list[str] | Literal["all"] = Field(
default="all", examples=["all", ["tool1", "tool2"]], title="Available tools"
)
Tools that can be called by the test model.
custom_output_text
class-attribute
instance-attribute
¶
custom_output_text: str | None = Field(
default=None, examples=["Test response", "Mock output for testing"], title="Custom output text"
)
Optional custom text to return from the test model.
seed
class-attribute
instance-attribute
¶
Seed for generating random tool arguments (when tool_args not specified).
tool_args
class-attribute
instance-attribute
¶
tool_args: dict[str, dict[str, Any]] | None = Field(
default=None, examples=[{"read": {"path": "/test/file.txt"}}], title="Fixed tool arguments"
)
Optional mapping of tool_name -> args to use instead of generated args.
type
class-attribute
instance-attribute
¶
Type identifier for test model.
UserSelectModelConfig
¶
Bases: BaseModelConfig
Configuration for interactive model selection.
Source code in src/llmling_models_config/configs.py
handler
class-attribute
instance-attribute
¶
handler: ImportString[Any] = Field(
default="llmling_models:DefaultInputHandler", validate_default=True, title="Selection handler"
)
Handler for processing user selection input.
input_prompt
class-attribute
instance-attribute
¶
input_prompt: str = Field(
default="Enter model number (0-{max}): ",
examples=["Enter model number (0-{max}): ", "Choose (0-{max}): "],
title="Selection input prompt",
)
Text displayed when requesting model selection.
models
class-attribute
instance-attribute
¶
models: list[ModelId | str | BaseModelConfig] = Field(
min_length=1,
title="Selectable models",
examples=[["openai:gpt-5-nano", "anthropic:claude-sonnet-4-5"]],
)
List of models the user can choose from.
prompt_template
class-attribute
instance-attribute
¶
prompt_template: str = Field(
default="🤖 Choose a model for: {prompt}",
examples=["🤖 Choose a model for: {prompt}", "Select model for: {prompt}"],
title="Selection prompt template",
)
Template for displaying the choice prompt to the user.
show_system
class-attribute
instance-attribute
¶
Whether to show system messages during selection.
type
class-attribute
instance-attribute
¶
Type identifier for user-select model.