ModelInfo#
- class rapidtools.models.ModelInfo(key: str, label: str, kind: str, description: str, module: str, class_name: str, default_model: str, catalog: list[dict[str, str]]=<factory>, attribute_prefix: str = '', key_env: tuple[str, ...]=(), key_label: str = '', analyzer_default_model: str | None = None, supports_4bit: bool = False, supports_batch: bool = False, free_form_model: bool = False)[source]#
Bases:
objectStatic description of a model backend.
- Variables:
key (str) – Short registry key (
'gemini','qwen_vl', …).label (str) – Human-readable provider name.
kind (str) –
'api'(hosted, needs a key),'local'(Hugging Face weights) or'segmentation'(SAM 3).description (str) – One-line description shown in user interfaces.
module (str) – Import path of the module holding the wrapper class.
class_name (str) – Name of the wrapper class inside
module.default_model (str) – Model ID used when none is given to the wrapper.
catalog (list[dict[str, str]]) – Curated
{'model_id', 'family', ...}records.attribute_prefix (str) – Prefix used for attributes written by analyzers.
key_env (tuple[str, ...]) – Environment variable(s) holding the API key (API kinds).
key_label (str) – Label for the key field in user interfaces.
analyzer_default_model (str | None) – Cheaper default used by batch analyzers and the GUI; falls back to
default_model.supports_4bit (bool) – Whether
load_in_4bitis accepted.supports_batch (bool) – Whether the wrapper offers
run_inference_batch.free_form_model (bool) – Whether arbitrary model IDs beyond the catalogue are expected to work (generic Hugging Face backends).
Example
>>> from rapidtools.models.catalogs import PROVIDERS >>> PROVIDERS['claude'].kind, PROVIDERS['gemma4'].supports_batch ('api', True)