model_info
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| ModelInfo tokonomics.model_discovery.model_info Unified model information from various providers. |
||
| ModelPricing tokonomics.model_discovery.model_info Pricing information for a model. |
🛈 DocStrings¶
Model discovery and information retrieval.
ModelInfo
dataclass
¶
Unified model information from various providers.
Source code in src/tokonomics/model_discovery/model_info.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 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 | |
context_window
class-attribute
instance-attribute
¶
Maximum number of tokens that can be processed in one request.
created_at
class-attribute
instance-attribute
¶
Timestamp when the model was created/released.
description
class-attribute
instance-attribute
¶
Detailed description of the model's capabilities.
id_override
class-attribute
instance-attribute
¶
Optional override for the model ID used in API calls.
When set, this value is used instead of the auto-generated pydantic_ai_id. Useful for agents like Claude Code that need simple IDs (e.g., 'opus', 'sonnet').
input_modalities
class-attribute
instance-attribute
¶
Supported input modalities (text, image, audio, video, etc.).
is_deprecated
class-attribute
instance-attribute
¶
Whether this model version is deprecated.
is_embedding
class-attribute
instance-attribute
¶
Whether this model is primarily used for creating embeddings.
is_free
class-attribute
instance-attribute
¶
Whether this model is free to use.
max_output_tokens
class-attribute
instance-attribute
¶
Maximum number of tokens the model can generate in a response.
metadata
class-attribute
instance-attribute
¶
Provider-specific metadata that doesn't fit in standard fields.
output_modalities
class-attribute
instance-attribute
¶
Supported output modalities (text, image, audio, video, etc.).
owned_by
class-attribute
instance-attribute
¶
Organization that owns/created the model.
pricing
class-attribute
instance-attribute
¶
pricing: ModelPricing | None = None
Pricing information for using the model.
provider
class-attribute
instance-attribute
¶
Service provider name (e.g. OpenAI, Anthropic).
pydantic_ai_id
property
¶
Unique pydantic-ai style identifier for the model.
Returns id_override if set, otherwise returns '{provider}:{id}'.
pydantic_ai_variants
property
¶
Thinking level variants as pydantic-ai ModelSettings.
Returns a dict mapping variant name (e.g., 'high', 'max') to provider-specific model settings for that thinking level.
Only populated for models that support reasoning/thinking (based on metadata from models.dev).
Returns:
| Type | Description |
|---|---|
dict[str, dict[str, Any]]
|
Dict mapping variant name to ModelSettings dict. |
dict[str, dict[str, Any]]
|
Empty dict if model doesn't support reasoning variants. |
format
¶
Format model information as a human-readable string.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Formatted model information |
Source code in src/tokonomics/model_discovery/model_info.py
ModelPricing
dataclass
¶
Pricing information for a model.
Source code in src/tokonomics/model_discovery/model_info.py
completion
class-attribute
instance-attribute
¶
Cost per token for completion outputs.
image
class-attribute
instance-attribute
¶
Cost per image for input processing.
input_cache_read
class-attribute
instance-attribute
¶
Cost for reading from input cache.
input_cache_write
class-attribute
instance-attribute
¶
Cost for writing to input cache.
internal_reasoning
class-attribute
instance-attribute
¶
Cost for internal reasoning functionality.
prompt
class-attribute
instance-attribute
¶
Cost per token for prompt inputs.
web_search
class-attribute
instance-attribute
¶
Cost for web search functionality.