Skip to content

client.models.listembeddingmodels() returns None instead of list of embedding models #25

Description

@adar2378

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions