io.enterpriseai.resources.LitellmClient
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/LitellmClient.java. Back to the Java SDK reference index.
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 LitellmClient
Generated LiteLLM configuration.
Constructor LitellmClient
LitellmClient(Transport transport)
Creates the client on the shared transport; EnterpriseAIClient builds it and exposes it through the accessor of the same name.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
transport | Transport | yes | Transport shared by the sub-clients of one client. |
LitellmClient.config
JsonNode config()
Generate the LiteLLM configuration. LiteLLM proxy configuration generated from the visible models and the enabled providers (a tenant provider wins over a shared one of the same type). It never holds a secret value: credentials are os.environ/<NAME> references resolved by the LiteLLM deployment. Requires tenant_admin, platform_admin, ai_platform_engineer, security_officer or auditor.
Route: /v1/litellm/config (GET).
This element takes no parameter.
Returns: JsonNode. Decoded JSON answer of the operation "Generate the LiteLLM configuration".
Raises: the typed errors of the transport (Errors).
LitellmClient.sync
JsonNode sync()
Push the configuration to LiteLLM. Makes the LiteLLM proxy hold exactly the generated model list: models created by the Control Plane and no longer wanted are removed, missing ones are added; models added by hand in LiteLLM are left alone. Without EAI_LITELLM_URL nothing is pushed (mode: in_process). A transport error answers 502 upstream_error. Audited (litellm.sync). Requires tenant_admin, platform_admin or ai_platform_engineer.
Route: /v1/litellm/sync (POST).
This element takes no parameter.
Returns: JsonNode. Decoded JSON answer of the operation "Push the configuration to LiteLLM".
Raises: the typed errors of the transport (Errors).