-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Description
The client.models.listembeddingmodels()
method returns None
instead of the actual list of embedding models from the API.
Current Behavior
from letta_client import Letta
client = Letta(project="...", token="...")
result = client.models.listembeddingmodels()
print(result) # None
Expected Behavior
The method should return a list of EmbeddingConfig
objects matching the API response:
[
EmbeddingConfig(
embedding_endpoint_type="openai",
embedding_endpoint="https://embeddings.letta.com/",
embedding_model="letta-free",
embedding_dim=1536,
embedding_chunk_size=300,
handle="letta/letta-free",
batch_size=32,
azure_endpoint=None,
azure_version=None,
azure_deployment=None
),
# ... more models
]
Root Cause
In /src/letta_client/models/raw_client.py
, the listembeddingmodels
method returns HttpResponse(response=_response, data=None)
instead of parsing the JSON response into List[EmbeddingConfig]
.
Suggested Fix
Since this is an auto-generated client from Fern, the API definition should be updated to specify that the /v1/models/embedding
endpoint returns List[EmbeddingConfig]
instead of None
.
Related PR
PR: #24 - Demonstrates the fix by updating the generated client to properly parse the response.
Version: 0.1.319
Metadata
Metadata
Assignees
Labels
No labels