Skip to content

Support for OpenAI-compatible embedding endpoints #24

Description

@titusz

Several self-hosted embedding servers expose OpenAI-compatible /embeddings endpoints:

The current OpenAI provider has a hardcoded API_BASE_URL. A configurable base_url
would make all these work without needing separate provider implementations.

Possible API

client = Client()
response = client.embed(
    model="BAAI/bge-small-en-v1.5",
    inputs=["Hello world"],
    base_url="http://localhost:7997"  # or via env var
)

Since the request format is already OpenAI-compatible, only the URL routing would change.

Thanks for catsu, the unified API and model metadata catalog are really useful!

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