Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: return new Model and EmbeddingModel objects for list model/embedding endpoints [LET-6090] (#6019)

jnjpng501c325b320e
diff --git a/fern/openapi.json b/fern/openapi.json
index fdf0fd06d..38ebbb36f 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -11184,7 +11184,7 @@
"get": {
"tags": ["models", "llms"],
"summary": "List Llm Models",
- "description": "List available LLM models using the asynchronous implementation for improved performance",
+ "description": "List available LLM models using the asynchronous implementation for improved performance.\n\nReturns Model format which extends LLMConfig with additional metadata fields.\nLegacy LLMConfig fields are marked as deprecated but still available for backward compatibility.",
"operationId": "list_models",
"parameters": [
{
@@ -11247,7 +11247,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/LLMConfig"
+ "$ref": "#/components/schemas/Model"
},
"title": "Response List Models"
}
@@ -11271,7 +11271,7 @@
"get": {
"tags": ["models", "llms"],
"summary": "List Embedding Models",
- "description": "List available embedding models using the asynchronous implementation for improved performance",
+ "description": "List available embedding models using the asynchronous implementation for improved performance.\n\nReturns EmbeddingModel format which extends EmbeddingConfig with additional metadata fields.\nLegacy EmbeddingConfig fields are marked as deprecated but still available for backward compatibility.",
"operationId": "list_embedding_models",
"parameters": [],
"responses": {
@@ -11282,7 +11282,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/EmbeddingConfig"
+ "$ref": "#/components/schemas/EmbeddingModel"
},
"title": "Response List Embedding Models"
}
@@ -24081,6 +24081,170 @@
"title": "EmbeddingConfig",
"description": "Configuration for embedding model connection and processing parameters."
},
+ "EmbeddingModel": {
+ "properties": {
+ "handle": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Handle",
+ "description": "The handle for this config, in the format provider/model-name."
+ },
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "The actual model name used by the provider"
+ },
+ "display_name": {
+ "type": "string",
+ "title": "Display Name",
+ "description": "Display name for the model shown in UI"
+ },
+ "provider_type": {
+ "$ref": "#/components/schemas/ProviderType",
+ "description": "The type of the provider"
+ },
+ "provider_name": {
+ "type": "string",
+ "title": "Provider Name",
+ "description": "The name of the provider"
+ },
+ "model_type": {
+ "type": "string",
+ "const": "embedding",
+ "title": "Model Type",
+ "description": "Type of model (llm or embedding)",
+ "default": "embedding"
+ },
+ "embedding_endpoint_type": {
+ "type": "string",
+ "enum": [
+ "openai",
+ "anthropic",
+ "bedrock",
+ "google_ai",
+ "google_vertex",
+ "azure",
+ "groq",
+ "ollama",
+ "webui",
+ "webui-legacy",
+ "lmstudio",
+ "lmstudio-legacy",
+ "llamacpp",
+ "koboldcpp",
+ "vllm",
+ "hugging-face",
+ "mistral",
+ "together",
+ "pinecone"
+ ],
+ "title": "Embedding Endpoint Type",
+ "description": "Deprecated: Use 'provider_type' field instead. The endpoint type for the embedding model.",
+ "deprecated": true
+ },
+ "embedding_endpoint": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Embedding Endpoint",
+ "description": "Deprecated: The endpoint for the model.",
+ "deprecated": true
+ },
+ "embedding_model": {
+ "type": "string",
+ "title": "Embedding Model",
+ "description": "Deprecated: Use 'name' field instead. Embedding model name.",
+ "deprecated": true
+ },
+ "embedding_dim": {
+ "type": "integer",
+ "title": "Embedding Dim",
+ "description": "The dimension of the embedding"
+ },
+ "embedding_chunk_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Embedding Chunk Size",
+ "description": "Deprecated: The chunk size of the embedding.",
+ "default": 300,
+ "deprecated": true
+ },
+ "batch_size": {
+ "type": "integer",
+ "title": "Batch Size",
+ "description": "Deprecated: The maximum batch size for processing embeddings.",
+ "default": 32,
+ "deprecated": true
+ },
+ "azure_endpoint": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Azure Endpoint",
+ "description": "Deprecated: The Azure endpoint for the model.",
+ "deprecated": true
+ },
+ "azure_version": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Azure Version",
+ "description": "Deprecated: The Azure version for the model.",
+ "deprecated": true
+ },
+ "azure_deployment": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Azure Deployment",
+ "description": "Deprecated: The Azure deployment for the model.",
+ "deprecated": true
+ }
+ },
+ "type": "object",
+ "required": [
+ "name",
+ "display_name",
+ "provider_type",
+ "provider_name",
+ "embedding_endpoint_type",
+ "embedding_model",
+ "embedding_dim"
+ ],
+ "title": "EmbeddingModel"
+ },
"EmbeddingModelSettings": {
"properties": {
"model": {
@@ -29562,6 +29726,286 @@
"type": "object",
"title": "ModalSandboxConfig"
},
+ "Model": {
+ "properties": {
+ "handle": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Handle",
+ "description": "The handle for this config, in the format provider/model-name."
+ },
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "The actual model name used by the provider"
+ },
+ "display_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Display Name",
+ "description": "A human-friendly display name for the model."
+ },
+ "provider_type": {
+ "$ref": "#/components/schemas/ProviderType",
+ "description": "The type of the provider"
+ },
+ "provider_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Provider Name",
+ "description": "The provider name for the model."
+ },
+ "model_type": {
+ "type": "string",
+ "const": "llm",
+ "title": "Model Type",
+ "description": "Type of model (llm or embedding)",
+ "default": "llm"
+ },
+ "model": {
+ "type": "string",
+ "title": "Model",
+ "description": "Deprecated: Use 'name' field instead. LLM model name.",
+ "deprecated": true
+ },
+ "model_endpoint_type": {
+ "type": "string",
+ "enum": [
+ "openai",
+ "anthropic",
+ "google_ai",
+ "google_vertex",
+ "azure",
+ "groq",
+ "ollama",
+ "webui",
+ "webui-legacy",
+ "lmstudio",
+ "lmstudio-legacy",
+ "lmstudio-chatcompletions",
+ "llamacpp",
+ "koboldcpp",
+ "vllm",
+ "hugging-face",
+ "mistral",
+ "together",
+ "bedrock",
+ "deepseek",
+ "xai"
+ ],
+ "title": "Model Endpoint Type",
+ "description": "Deprecated: Use 'provider_type' field instead. The endpoint type for the model.",
+ "deprecated": true
+ },
+ "model_endpoint": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Model Endpoint",
+ "description": "Deprecated: The endpoint for the model.",
+ "deprecated": true
+ },
+ "provider_category": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProviderCategory"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Deprecated: The provider category for the model.",
+ "deprecated": true
+ },
+ "model_wrapper": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Model Wrapper",
+ "description": "Deprecated: The wrapper for the model.",
+ "deprecated": true
+ },
+ "context_window": {
+ "type": "integer",
+ "title": "Context Window",
+ "description": "Deprecated: Use 'max_context_window' field instead. The context window size for the model.",
+ "deprecated": true
+ },
+ "put_inner_thoughts_in_kwargs": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Put Inner Thoughts In Kwargs",
+ "description": "Deprecated: Puts 'inner_thoughts' as a kwarg in the function call.",
+ "default": true,
+ "deprecated": true
+ },
+ "temperature": {
+ "type": "number",
+ "title": "Temperature",
+ "description": "Deprecated: The temperature to use when generating text with the model.",
+ "default": 0.7,
+ "deprecated": true
+ },
+ "max_tokens": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Max Tokens",
+ "description": "Deprecated: The maximum number of tokens to generate.",
+ "deprecated": true
+ },
+ "enable_reasoner": {
+ "type": "boolean",
+ "title": "Enable Reasoner",
+ "description": "Deprecated: Whether or not the model should use extended thinking if it is a 'reasoning' style model.",
+ "default": true,
+ "deprecated": true
+ },
+ "reasoning_effort": {
+ "anyOf": [
+ {
+ "type": "string",
+ "enum": ["minimal", "low", "medium", "high"]
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Reasoning Effort",
+ "description": "Deprecated: The reasoning effort to use when generating text reasoning models.",
+ "deprecated": true
+ },
+ "max_reasoning_tokens": {
+ "type": "integer",
+ "title": "Max Reasoning Tokens",
+ "description": "Deprecated: Configurable thinking budget for extended thinking.",
+ "default": 0,
+ "deprecated": true
+ },
+ "frequency_penalty": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Frequency Penalty",
+ "description": "Deprecated: Positive values penalize new tokens based on their existing frequency in the text so far.",
+ "deprecated": true
+ },
+ "compatibility_type": {
+ "anyOf": [
+ {
+ "type": "string",
+ "enum": ["gguf", "mlx"]
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Compatibility Type",
+ "description": "Deprecated: The framework compatibility type for the model.",
+ "deprecated": true
+ },
+ "verbosity": {
+ "anyOf": [
+ {
+ "type": "string",
+ "enum": ["low", "medium", "high"]
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Verbosity",
+ "description": "Deprecated: Soft control for how verbose model output should be.",
+ "deprecated": true
+ },
+ "tier": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Tier",
+ "description": "Deprecated: The cost tier for the model (cloud only).",
+ "deprecated": true
+ },
+ "parallel_tool_calls": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Parallel Tool Calls",
+ "description": "Deprecated: If set to True, enables parallel tool calling.",
+ "default": false,
+ "deprecated": true
+ },
+ "max_context_window": {
+ "type": "integer",
+ "title": "Max Context Window",
+ "description": "The maximum context window for the model"
+ }
+ },
+ "type": "object",
+ "required": [
+ "name",
+ "provider_type",
+ "model",
+ "model_endpoint_type",
+ "context_window",
+ "max_context_window"
+ ],
+ "title": "Model"
+ },
"ModelSettings": {
"properties": {
"model": {
diff --git a/letta/schemas/model.py b/letta/schemas/model.py
index c87b865f7..9af65127f 100644
--- a/letta/schemas/model.py
+++ b/letta/schemas/model.py
@@ -3,7 +3,7 @@ from typing import Annotated, Literal, Optional, Union
from pydantic import BaseModel, Field
from letta.schemas.embedding_config import EmbeddingConfig
-from letta.schemas.enums import ProviderType
+from letta.schemas.enums import ProviderCategory, ProviderType
from letta.schemas.llm_config import LLMConfig
from letta.schemas.response_format import ResponseFormatUnion
@@ -17,33 +17,167 @@ class ModelBase(BaseModel):
model_type: Literal["llm", "embedding"] = Field(..., description="Type of model (llm or embedding)")
-class Model(ModelBase):
+class Model(LLMConfig, ModelBase):
model_type: Literal["llm"] = Field("llm", description="Type of model (llm or embedding)")
max_context_window: int = Field(..., description="The maximum context window for the model")
# supports_token_streaming: Optional[bool] = Field(None, description="Whether token streaming is supported")
# supports_tool_calling: Optional[bool] = Field(None, description="Whether tool calling is supported")
- def _from_llm_config(self, llm_config: LLMConfig) -> "Model":
- return self(
- handle=llm_config.handle,
+ # Deprecated fields from LLMConfig - use new field names instead
+ model: str = Field(..., description="Deprecated: Use 'name' field instead. LLM model name.", deprecated=True)
+ model_endpoint_type: Literal[
+ "openai",
+ "anthropic",
+ "google_ai",
+ "google_vertex",
+ "azure",
+ "groq",
+ "ollama",
+ "webui",
+ "webui-legacy",
+ "lmstudio",
+ "lmstudio-legacy",
+ "lmstudio-chatcompletions",
+ "llamacpp",
+ "koboldcpp",
+ "vllm",
+ "hugging-face",
+ "mistral",
+ "together",
+ "bedrock",
+ "deepseek",
+ "xai",
+ ] = Field(..., description="Deprecated: Use 'provider_type' field instead. The endpoint type for the model.", deprecated=True)
+ context_window: int = Field(
+ ..., description="Deprecated: Use 'max_context_window' field instead. The context window size for the model.", deprecated=True
+ )
+
+ # Additional deprecated LLMConfig fields - kept for backward compatibility
+ model_endpoint: Optional[str] = Field(None, description="Deprecated: The endpoint for the model.", deprecated=True)
+ model_wrapper: Optional[str] = Field(None, description="Deprecated: The wrapper for the model.", deprecated=True)
+ put_inner_thoughts_in_kwargs: Optional[bool] = Field(
+ True, description="Deprecated: Puts 'inner_thoughts' as a kwarg in the function call.", deprecated=True
+ )
+ temperature: float = Field(0.7, description="Deprecated: The temperature to use when generating text with the model.", deprecated=True)
+ max_tokens: Optional[int] = Field(None, description="Deprecated: The maximum number of tokens to generate.", deprecated=True)
+ enable_reasoner: bool = Field(
+ True,
+ description="Deprecated: Whether or not the model should use extended thinking if it is a 'reasoning' style model.",
+ deprecated=True,
+ )
+ reasoning_effort: Optional[Literal["minimal", "low", "medium", "high"]] = Field(
+ None, description="Deprecated: The reasoning effort to use when generating text reasoning models.", deprecated=True
+ )
+ max_reasoning_tokens: int = Field(0, description="Deprecated: Configurable thinking budget for extended thinking.", deprecated=True)
+ frequency_penalty: Optional[float] = Field(
+ None,
+ description="Deprecated: Positive values penalize new tokens based on their existing frequency in the text so far.",
+ deprecated=True,
+ )
+ compatibility_type: Optional[Literal["gguf", "mlx"]] = Field(
+ None, description="Deprecated: The framework compatibility type for the model.", deprecated=True
+ )
+ verbosity: Optional[Literal["low", "medium", "high"]] = Field(
+ None, description="Deprecated: Soft control for how verbose model output should be.", deprecated=True
+ )
+ tier: Optional[str] = Field(None, description="Deprecated: The cost tier for the model (cloud only).", deprecated=True)
+ parallel_tool_calls: Optional[bool] = Field(
+ False, description="Deprecated: If set to True, enables parallel tool calling.", deprecated=True
+ )
+ provider_category: Optional[ProviderCategory] = Field(
+ None, description="Deprecated: The provider category for the model.", deprecated=True
+ )
+
+ @classmethod
+ def from_llm_config(cls, llm_config: "LLMConfig") -> "Model":
+ """Create a Model instance from an LLMConfig"""
+ return cls(
+ # New fields
+ handle=llm_config.handle or f"{llm_config.provider_name}/{llm_config.model}",
name=llm_config.model,
- display_name=llm_config.display_name,
+ display_name=llm_config.display_name or llm_config.model,
provider_type=llm_config.model_endpoint_type,
- provider_name=llm_config.provider_name,
+ provider_name=llm_config.provider_name or llm_config.model_endpoint_type,
+ model_type="llm",
+ max_context_window=llm_config.context_window,
+ # Deprecated fields (copy from LLMConfig for backward compatibility)
+ model=llm_config.model,
+ model_endpoint_type=llm_config.model_endpoint_type,
+ model_endpoint=llm_config.model_endpoint,
+ model_wrapper=llm_config.model_wrapper,
+ context_window=llm_config.context_window,
+ put_inner_thoughts_in_kwargs=llm_config.put_inner_thoughts_in_kwargs,
+ temperature=llm_config.temperature,
+ max_tokens=llm_config.max_tokens,
+ enable_reasoner=llm_config.enable_reasoner,
+ reasoning_effort=llm_config.reasoning_effort,
+ max_reasoning_tokens=llm_config.max_reasoning_tokens,
+ frequency_penalty=llm_config.frequency_penalty,
+ compatibility_type=llm_config.compatibility_type,
+ verbosity=llm_config.verbosity,
+ tier=llm_config.tier,
+ parallel_tool_calls=llm_config.parallel_tool_calls,
+ provider_category=llm_config.provider_category,
)
-class EmbeddingModel(ModelBase):
+class EmbeddingModel(EmbeddingConfig, ModelBase):
model_type: Literal["embedding"] = Field("embedding", description="Type of model (llm or embedding)")
embedding_dim: int = Field(..., description="The dimension of the embedding")
- def _from_embedding_config(self, embedding_config: EmbeddingConfig) -> "Model":
- return self(
- handle=embedding_config.handle,
+ # Deprecated fields from EmbeddingConfig - use new field names instead
+ embedding_model: str = Field(..., description="Deprecated: Use 'name' field instead. Embedding model name.", deprecated=True)
+ embedding_endpoint_type: Literal[
+ "openai",
+ "anthropic",
+ "bedrock",
+ "google_ai",
+ "google_vertex",
+ "azure",
+ "groq",
+ "ollama",
+ "webui",
+ "webui-legacy",
+ "lmstudio",
+ "lmstudio-legacy",
+ "llamacpp",
+ "koboldcpp",
+ "vllm",
+ "hugging-face",
+ "mistral",
+ "together",
+ "pinecone",
+ ] = Field(..., description="Deprecated: Use 'provider_type' field instead. The endpoint type for the embedding model.", deprecated=True)
+
+ # Additional deprecated EmbeddingConfig fields - kept for backward compatibility
+ embedding_endpoint: Optional[str] = Field(None, description="Deprecated: The endpoint for the model.", deprecated=True)
+ embedding_chunk_size: Optional[int] = Field(300, description="Deprecated: The chunk size of the embedding.", deprecated=True)
+ batch_size: int = Field(32, description="Deprecated: The maximum batch size for processing embeddings.", deprecated=True)
+ azure_endpoint: Optional[str] = Field(None, description="Deprecated: The Azure endpoint for the model.", deprecated=True)
+ azure_version: Optional[str] = Field(None, description="Deprecated: The Azure version for the model.", deprecated=True)
+ azure_deployment: Optional[str] = Field(None, description="Deprecated: The Azure deployment for the model.", deprecated=True)
+
+ @classmethod
+ def from_embedding_config(cls, embedding_config: "EmbeddingConfig") -> "EmbeddingModel":
+ """Create an EmbeddingModel instance from an EmbeddingConfig"""
+ return cls(
+ # New fields
+ handle=embedding_config.handle or f"{embedding_config.embedding_endpoint_type}/{embedding_config.embedding_model}",
name=embedding_config.embedding_model,
display_name=embedding_config.embedding_model,
provider_type=embedding_config.embedding_endpoint_type,
provider_name=embedding_config.embedding_endpoint_type,
+ model_type="embedding",
+ embedding_dim=embedding_config.embedding_dim,
+ # Deprecated fields (copy from EmbeddingConfig for backward compatibility)
+ embedding_model=embedding_config.embedding_model,
+ embedding_endpoint_type=embedding_config.embedding_endpoint_type,
+ embedding_endpoint=embedding_config.embedding_endpoint,
+ embedding_chunk_size=embedding_config.embedding_chunk_size,
+ batch_size=embedding_config.batch_size,
+ azure_endpoint=embedding_config.azure_endpoint,
+ azure_version=embedding_config.azure_version,
+ azure_deployment=embedding_config.azure_deployment,
)
diff --git a/letta/server/rest_api/routers/v1/llms.py b/letta/server/rest_api/routers/v1/llms.py
index dead3c6ba..0f97de3e8 100644
--- a/letta/server/rest_api/routers/v1/llms.py
+++ b/letta/server/rest_api/routers/v1/llms.py
@@ -2,9 +2,8 @@ from typing import TYPE_CHECKING, List, Optional
from fastapi import APIRouter, Depends, Query
-from letta.schemas.embedding_config import EmbeddingConfig
from letta.schemas.enums import ProviderCategory, ProviderType
-from letta.schemas.llm_config import LLMConfig
+from letta.schemas.model import EmbeddingModel, Model
from letta.server.rest_api.dependencies import HeaderParams, get_headers, get_letta_server
if TYPE_CHECKING:
@@ -13,7 +12,7 @@ if TYPE_CHECKING:
router = APIRouter(prefix="/models", tags=["models", "llms"])
[email protected]("/", response_model=List[LLMConfig], operation_id="list_models")
[email protected]("/", response_model=List[Model], operation_id="list_models")
async def list_llm_models(
provider_category: Optional[List[ProviderCategory]] = Query(None),
provider_name: Optional[str] = Query(None),
@@ -21,7 +20,12 @@ async def list_llm_models(
server: "SyncServer" = Depends(get_letta_server),
headers: HeaderParams = Depends(get_headers),
):
- """List available LLM models using the asynchronous implementation for improved performance"""
+ """
+ List available LLM models using the asynchronous implementation for improved performance.
+
+ Returns Model format which extends LLMConfig with additional metadata fields.
+ Legacy LLMConfig fields are marked as deprecated but still available for backward compatibility.
+ """
actor = await server.user_manager.get_actor_or_default_async(actor_id=headers.actor_id)
models = await server.list_llm_models_async(
@@ -31,16 +35,23 @@ async def list_llm_models(
actor=actor,
)
- return models
+ # Convert all models to the new Model schema
+ return [Model.from_llm_config(model) for model in models]
[email protected]("/embedding", response_model=List[EmbeddingConfig], operation_id="list_embedding_models")
[email protected]("/embedding", response_model=List[EmbeddingModel], operation_id="list_embedding_models")
async def list_embedding_models(
server: "SyncServer" = Depends(get_letta_server),
headers: HeaderParams = Depends(get_headers),
):
- """List available embedding models using the asynchronous implementation for improved performance"""
+ """
+ List available embedding models using the asynchronous implementation for improved performance.
+
+ Returns EmbeddingModel format which extends EmbeddingConfig with additional metadata fields.
+ Legacy EmbeddingConfig fields are marked as deprecated but still available for backward compatibility.
+ """
actor = await server.user_manager.get_actor_or_default_async(actor_id=headers.actor_id)
models = await server.list_embedding_models_async(actor=actor)
- return models
+ # Convert all models to the new EmbeddingModel schema
+ return [EmbeddingModel.from_embedding_config(model) for model in models]