Model Entity
The Model entity stores an LLM configuration on the platform: the provider, model name, and API key. Once saved, a model can be set as a default for generation or evaluation, and converted into a ready-to-use LLM instance.
Note: The Model entity is different from the Models module. The entity stores configurations on the platform; the module provides the LLM clients that make API calls.
Models use the shared entity interface for fetching, filtering, updating, and deleting.
Creating a model
Pass a provider name and the SDK resolves it to the correct provider type on push(). Set model_type="embedding" for embedding models (the default is "language"):
Models.list_providers() returns the provider names accepted by provider:
Fetching models
Setting default models
Mark a saved model as the default for a task. This updates your user settings:
Converting to an LLM instance
Turn a stored configuration into an LLM (or embedder) client:
Saving an LLM instance
An LLM instance created with get_model can be saved back as a Model entity:
Fields
| Field | Type | Description |
|---|---|---|
id | str | Unique identifier (set after push) |
name | str | Human-readable name |
description | str | Optional description (auto-generated from the provider if omitted) |
provider | str | Provider name (e.g. "openai", "anthropic") |
model_name | str | Model identifier (e.g. "gpt-4", "claude-3-opus-20240229") |
model_type | str | "language" (default) or "embedding" |
key | str | API key for the provider |
provider_type_id | str | Auto-resolved from the provider name |
status_id | str | Optional status reference |
Next: use a model with Synthesizers to generate tests, or configure Metrics for evaluation.