Skip to main content

enterprise_ai.llm.providers

Source: sdks/python/src/enterprise_ai/llm/providers/__init__.py. Back to the Python SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Class ProvidersClient​

/v1/providers and /v1/adapters.

Resource

ProvidersClient.adapters​

adapters() -> Any

List the specialized adapters. Specialized adapters of the gateway (image generation, speech to text, text to speech, video generation...) with their modality, label in the language of the request and in both languages, status (configured when their address is set, else not_configured) and the controls applied to them. Requires a reader role.

Route: /v1/adapters (GET).

This element takes no parameter.

Returns: Any. Decoded JSON answer of the operation "List the specialized adapters".

Raises: the typed errors of the transport (Errors).

ProvidersClient.catalog​

catalog() -> Any

Read the provider catalog. Every provider type the platform supports, with the fields and credentials it needs, labels in the language of the request, the configured providers of each type, and how its models are found (api: listing API, manual_only: typed by the administrator). Requires a reader role.

Route: /v1/providers/catalog (GET).

This element takes no parameter.

Returns: Any. Decoded JSON answer of the operation "Read the provider catalog".

Raises: the typed errors of the transport (Errors).

ProvidersClient.create​

create(provider: str, name: str | None = None, base_url: str | None = None, credentials: dict[str, Any] | None = None, **extra: Any) -> Any

Create a model provider. Creates a provider for the tenant, or a shared one with scope: platform (platform_admin only), and answers 201 without the credentials. Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/providers (POST).

NameTypeDefaultRequiredDescription
providerstryesProvider kind, such as openai, anthropic, aws_bedrock, ollama, vllm or custom.
namestr | NoneNonenoDisplay name of the configured provider.
base_urlstr | NoneNonenoBase URL of the provider API, for self hosted or compatible endpoints.
credentialsdict[str, Any] | NoneNonenoCredentials of the provider; stored server side and never returned.
**extraAnynoExtra fields merged into the request body.

Returns: Any. Decoded JSON answer of the operation "Create a model provider".

Raises: the typed errors of the transport (Errors).

ProvidersClient.delete​

delete(provider_id: str) -> Any

Delete a model provider. Deletes the provider and answers 204; a shared provider needs platform_admin (403 platform_only). Audited (provider.delete). Unknown or invisible provider: 404 provider_not_found. Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/providers/{pid} (DELETE).

NameTypeDefaultRequiredDescription
provider_idstryesIdentifier (UUID) of the provider.

Returns: Any. Decoded JSON answer of the operation "Delete a model provider".

Raises: the typed errors of the transport (Errors).

ProvidersClient.disable​

disable(provider_id: str) -> Any

Disable a provider (kill switch). Kill switch of the provider: the gateway refuses its models at once (403 provider_disabled) and discovery is refused (409). A shared provider needs platform_admin. Audited (provider.disable). Requires tenant_admin, platform_admin, ai_platform_engineer or security_officer.

Route: /v1/providers/{pid}/disable (POST).

NameTypeDefaultRequiredDescription
provider_idstryesIdentifier (UUID) of the provider.

Returns: Any. Decoded JSON answer of the operation "Disable a provider (kill switch)".

Raises: the typed errors of the transport (Errors).

ProvidersClient.discover_models​

discover_models(provider_id: str) -> Any

Discover the models of a provider. Models the configured provider really serves, from its own listing API with the stored credentials and through the outbound guard (never a made up list). Each candidate carries what the provider returns (context window, maximum output, modalities, prices) completed with platform hints, a suggested registry id and category, and whether it is already registered; up to 1000 candidates. Providers without a listing API answer manual_only. A disabled provider answers 409 provider_disabled. Audited (provider.discover). Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/providers/{pid}/models/discover (POST).

NameTypeDefaultRequiredDescription
provider_idstryesIdentifier (UUID) of the provider.

Returns: Any. Decoded JSON answer of the operation "Discover the models of a provider".

Raises: the typed errors of the transport (Errors).

ProvidersClient.enable​

enable(provider_id: str) -> Any

Enable a disabled provider. Lifts the kill switch of the provider. A shared provider needs platform_admin. Audited (provider.enable). Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/providers/{pid}/enable (POST).

NameTypeDefaultRequiredDescription
provider_idstryesIdentifier (UUID) of the provider.

Returns: Any. Decoded JSON answer of the operation "Enable a disabled provider".

Raises: the typed errors of the transport (Errors).

ProvidersClient.get​

get(provider_id: str) -> Any

Get a configured provider. One provider without its credentials. A provider of another tenant, or an id that is not a UUID, answers 404 provider_not_found. Requires a reader role.

Route: /v1/providers/{pid} (GET).

NameTypeDefaultRequiredDescription
provider_idstryesIdentifier (UUID) of the provider.

Returns: Any. Decoded JSON answer of the operation "Get a configured provider".

Raises: the typed errors of the transport (Errors).

ProvidersClient.list​

list(**page: Any) -> Any

List the configured providers. Shared providers and the providers of the caller's tenant, with their type, address, configuration, regions, retention, state and last test; credentials are never returned (only the names of the fields that are set). Requires a reader role.

Route: /v1/providers (GET).

NameTypeDefaultRequiredDescription
**pageAnynoPagination options: limit (maximum number of providers per page) and cursor (cursor of the page to read).

Returns: Any. Decoded JSON answer of the operation "List the configured providers".

Raises: the typed errors of the transport (Errors).

ProvidersClient.test​

test(provider_id: str) -> Any

Test a provider connection. Calls the listing endpoint of the provider with its stored credentials (for signed protocols such as Bedrock and Vertex, checks that the credential set is complete) and answers ok, the HTTP status, a detail and the models seen. The result is stored as the connection state and audited (provider.test). Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/providers/{pid}/test (POST).

NameTypeDefaultRequiredDescription
provider_idstryesIdentifier (UUID) of the provider.

Returns: Any. Decoded JSON answer of the operation "Test a provider connection".

Raises: the typed errors of the transport (Errors).

ProvidersClient.update​

update(provider_id: str, **changes: Any) -> Any

Update a model provider. Changes the configuration, address, regions, retention or credentials of a provider. New credentials are written to the secret store and reset the connection state until the next test. A remote address must use TLS (422 tls_required) and pass the outbound address rules; an unknown credential field answers 422. A shared provider needs platform_admin. Audited (provider.update, without values). Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/providers/{pid} (PATCH).

NameTypeDefaultRequiredDescription
provider_idstryesIdentifier (UUID) of the provider.
**changesAnynoFields of the provider to change, sent as the PATCH body.

Returns: Any. Decoded JSON answer of the operation "Update a model provider".

Raises: the typed errors of the transport (Errors).