ExBifrost.Api.Models (ex_bifrost v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged Models.

Summary

Functions

List available models Lists available models. If provider is not specified, lists all models from all configured providers. If a virtual key is provided, Bifrost only lists (and only queries) providers allowed by that virtual key.

Functions

list_models(connection, opts \\ [])

@spec list_models(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.ListModelsResponse.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

List available models Lists available models. If provider is not specified, lists all models from all configured providers. If a virtual key is provided, Bifrost only lists (and only queries) providers allowed by that virtual key.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :provider (ModelProvider): Filter by provider (e.g., openai, anthropic, bedrock)
    • :page_size (integer()): Maximum number of models to return
    • :page_token (String.t): Token for pagination

Returns

  • {:ok, ExBifrost.Model.ListModelsResponse.t} on success
  • {:error, Tesla.Env.t} on failure