Llm Models Custom Providers Retrieve

Retrieve, update, and delete individual custom LLM providers Supports both internal (JWT) and public (API key) authentication. - Internal API: Returns all fields - Public API: Hides internal fields (litellm_provider_id, is_managed, moderation) Access control (layered): 1. SuperAdminMixin: Routes queryset (superadmins see all, users see own org) + auto-registers ObjectOwnershipPermission for object-level ownership checks 2. Server-side org assignment: Prevents cross-org writes via request body Endpoints: Platform (JWT auth, uses numeric pk): GET /llm_models/custom_providers/{pk}/ - Retrieve a specific custom provider PATCH /llm_models/custom_providers/{pk}/ - Update a specific custom provider DELETE /llm_models/custom_providers/{pk}/ - Delete a specific custom provider Public API (API key auth, uses provider_id string): GET /api/providers/{provider_id}/ - Retrieve a specific custom provider PATCH /api/providers/{provider_id}/ - Update a specific custom provider DELETE /api/providers/{provider_id}/ - Delete a specific custom provider Args (PATCH): - provider_name (Optional): Updated provider name - litellm_provider_id (Optional): Updated base provider ID - moderation (Optional): Updated moderation setting - extra_kwargs (Optional): Updated additional configuration (all credentials live here) * api_key: Updated provider API key * base_url: Updated custom base URL for the provider's API * temperature: Updated default temperature setting * max_tokens: Updated default max tokens setting * timeout: Updated request timeout in seconds Returns (GET): { "id": 123, "provider_id": "my-custom-openai", "provider_name": "My Custom OpenAI Provider", "litellm_provider_id": "openai", "moderation": "filtered", "extra_kwargs": { "api_key": "sk-custom-key-123", "base_url": "https://api.my-custom-provider.com/v1", "temperature": 0.7, "max_tokens": 4096 }, "organization": 456, "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T11:00:00Z" } Returns (PATCH): { "id": 123, "provider_id": "my-custom-openai", "provider_name": "My Updated Custom OpenAI Provider", "extra_kwargs": { "api_key": "sk-updated-key-456", "base_url": "https://api.my-updated-provider.com/v1", "temperature": 0.8, "max_tokens": 8192 }, ... }

Authentication

AuthorizationBearer
JWT access token or Respan API key

Path parameters

idintegerRequired

Response

provider_namestring<=255 characters
provider_idstring<=255 characters
created_atdatetime or nullRead-only
updated_atdatetime or nullRead-only
idstringRead-only
projectstring or null
extra_kwargsany
respan_discount_ratedouble
models_sync_configany