### Quick-start Evaluation Install with Helm Source: https://deltallm.readthedocs.io/en/latest/deployment/kubernetes Install DeltaLLM for evaluation using a bundled PostgreSQL and Redis. This is the simplest setup for a first-time install. ```bash helm install deltallm deltallm/deltallm \ --version \ --namespace deltallm \ --create-namespace \ -f https://deltawi.github.io/deltallm/values-eval-.yaml \ --set secret.values.masterKey="$DELTALLM_MASTER_KEY" \ --set secret.values.saltKey="$DELTALLM_SALT_KEY" \ --set-string env[0].name=PLATFORM_BOOTSTRAP_ADMIN_EMAIL \ --set-string env[0].value=admin@example.com \ --set-string env[1].name=PLATFORM_BOOTSTRAP_ADMIN_PASSWORD \ --set-string env[1].value='ChangeMe123!' ``` -------------------------------- ### Copy Example Configuration File Source: https://deltallm.readthedocs.io/en/latest/configuration Use this command to copy the example configuration file to your project for local modification. ```bash cp config.example.yaml config.yaml ``` -------------------------------- ### Install Backend Dependencies with pip Source: https://deltallm.readthedocs.io/en/latest/getting-started/installation Create a virtual environment and install backend dependencies using pip and the requirements.txt file. ```bash python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` -------------------------------- ### Copy Example Config and Set Environment Variable Source: https://deltallm.readthedocs.io/en/latest/getting-started/installation Copy the example configuration file and set the DELTALLM_CONFIG_PATH environment variable to point to it. ```bash cp config.example.yaml config.yaml export DELTALLM_CONFIG_PATH=./config.yaml ``` -------------------------------- ### Start the DeltaLLM Backend API Source: https://deltallm.readthedocs.io/en/latest/getting-started/installation Run this command to start the backend API server. It will be accessible at http://localhost:8000. ```bash uv run uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload ``` -------------------------------- ### Install Backend Dependencies with uv Source: https://deltallm.readthedocs.io/en/latest/getting-started/installation Use uv to install development dependencies, leveraging the provided uv.lock file for reproducible builds. ```bash uv sync --dev ``` -------------------------------- ### Start Single Instance Deployment Source: https://deltallm.readthedocs.io/en/latest/getting-started/docker Starts a single instance of DeltaLLM using Docker Compose. Ensure config.yaml is edited with your settings. ```bash # Edit config.yaml with your API keys and settings docker compose --profile single up -d --build ``` -------------------------------- ### Start the DeltaLLM Admin UI Source: https://deltallm.readthedocs.io/en/latest/getting-started/installation Navigate to the 'ui' directory and run these commands to start the admin UI development server. It will be accessible at http://localhost:5000. ```bash cd ui npm ci npm run dev ``` -------------------------------- ### Example of Forwarded Header Source: https://deltallm.readthedocs.io/en/latest/admin-ui/mcp An example demonstrating how an authorization header would be prefixed for forwarding through DeltaLLM's MCP. ```text x-deltallm-mcp-github-authorization: Bearer ... ``` -------------------------------- ### Example Success Payload for Tools List Source: https://deltallm.readthedocs.io/en/latest/api/mcp This is an example of a successful response when listing available tools, showing the structure of tool information returned. ```JSON { "jsonrpc": "2.0", "id": 2, "result": { "tools": [ { "name": "docs.search", "description": "Search docs", "inputSchema": { "type": "object", "properties": { "query": {"type": "string"} }, "required": ["query"] } } ] } } ``` -------------------------------- ### Start Docker Compose Deployment Source: https://deltallm.readthedocs.io/en/latest/deployment/docker Command to start the DeltaLLM application in detached mode using Docker Compose. ```bash docker compose up -d ``` -------------------------------- ### Start DeltaLLM Gateway Source: https://deltallm.readthedocs.io/en/latest/getting-started/quickstart Starts the DeltaLLM backend server. Redis can optionally be started for distributed caching and rate limiting. ```bash # Optional: start Redis for distributed caching and rate limiting redis-server --daemonize yes python -m uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload ``` -------------------------------- ### MCP Tool Namespace Example Source: https://deltallm.readthedocs.io/en/latest/features/mcp DeltaLLM namespaces MCP tools using the format 'server_key.tool_name'. This example shows how a 'search' tool on the 'docs' server is exposed. ```text server_key.tool_name ``` ```text docs.search ``` -------------------------------- ### Chat Example with MCP Tool Source: https://deltallm.readthedocs.io/en/latest/api/mcp Use this example to send a chat completion request that includes an MCP tool definition. Ensure the 'tools' parameter is correctly formatted with 'type', 'server', 'allowed_tools', and 'require_approval'. ```curl curl http://localhost:8000/v1/chat/completions \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o-mini", "messages": [ { "role": "user", "content": "Use the docs MCP search tool to look up DeltaLLM." } ], "tools": [ { "type": "mcp", "server": "docs", "allowed_tools": ["search"], "require_approval": "never" } ], "tool_choice": "required" }' ``` -------------------------------- ### Start High Availability Deployment Source: https://deltallm.readthedocs.io/en/latest/getting-started/docker Starts a high-availability deployment with two DeltaLLM instances behind an Nginx load balancer using Docker Compose. ```bash docker compose --profile ha up -d --build ``` -------------------------------- ### Example of Forwarded Authorization Header Source: https://deltallm.readthedocs.io/en/latest/features/mcp This specific example illustrates how to forward an authorization header to an MCP server, using 'github' as the server key and 'authorization' as the header name. ```text x-deltallm-mcp-github-authorization: Bearer ... ``` -------------------------------- ### Production Install with External Services Source: https://deltallm.readthedocs.io/en/latest/deployment/kubernetes Install DeltaLLM in production mode using an external PostgreSQL and Redis. This requires editing the downloaded `values-production.yaml` file to point to existing secrets. ```bash helm install deltallm deltallm/deltallm \ --version \ --namespace deltallm \ --create-namespace \ -f values-production.yaml \ --set secret.existingSecret=deltallm-app-secrets ``` -------------------------------- ### Example Rate Limit Configuration Source: https://deltallm.readthedocs.io/en/latest/features/rate-limiting This JSON object shows an example configuration for various rate limits, including requests per minute (rpm), requests per hour (rph), requests per day (rpd), tokens per minute (tpm), and tokens per day (tpd). Use this to set burst tolerance and cost control limits. ```json { "rpm_limit": 60, "rph_limit": 500, "rpd_limit": 2000, "tpm_limit": 100000, "tpd_limit": 1000000 } ``` -------------------------------- ### Responses Example with MCP Tool Source: https://deltallm.readthedocs.io/en/latest/api/mcp This example demonstrates how to make a responses request that incorporates an MCP tool. The 'tools' field should specify the tool's 'type', 'server', 'allowed_tools', and 'require_approval'. ```curl curl http://localhost:8000/v1/responses \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o-mini", "input": "Search the docs for DeltaLLM.", "tools": [ { "type": "mcp", "server": "docs", "allowed_tools": ["search"], "require_approval": "never" } ], "tool_choice": "required" }' ``` -------------------------------- ### Example DeltaLLM Deployment Configuration Source: https://deltallm.readthedocs.io/en/latest/configuration/models This configuration demonstrates setting up a vLLM gateway deployment with custom upstream authentication headers. Ensure `auth_header_format` contains the `{api_key}` placeholder. ```yaml model_list: - model_name: support-vllm deltallm_params: provider: vllm model: vllm/meta-llama/Llama-3.1-8B-Instruct api_key: os.environ/VLLM_GATEWAY_KEY api_base: https://vllm.example/v1 auth_header_name: X-API-Key auth_header_format: "{api_key}" model_info: mode: chat ``` -------------------------------- ### Prepare Input File for Batch Requests Source: https://deltallm.readthedocs.io/en/latest/features/batching Create a JSONL file where each line represents a batch request. Examples show formats for embeddings and chat completions. ```json {"custom_id": "doc-1", "url": "/v1/embeddings", "body": {"model": "text-embedding-3-small", "input": "DeltaLLM is an LLM gateway"}} {"custom_id": "doc-2", "url": "/v1/embeddings", "body": {"model": "text-embedding-3-small", "input": "It supports async batch processing"}} {"custom_id": "doc-3", "url": "/v1/embeddings", "body": {"model": "text-embedding-3-small", "input": "Batching reduces cost for high-volume workloads"}} ``` ```json {"custom_id": "chat-1", "url": "/v1/chat/completions", "body": {"model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Summarize DeltaLLM in one sentence."}]}} {"custom_id": "chat-2", "url": "/v1/chat/completions", "body": {"model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Write a short support reply."}]}} ``` -------------------------------- ### Install Presidio-enabled DeltaLLM Image Source: https://deltallm.readthedocs.io/en/latest/deployment/kubernetes Install the Presidio-enabled variant of DeltaLLM for evaluation. This uses the same eval values file but specifies a different image tag. ```bash helm install deltallm deltallm/deltallm \ --version \ --namespace deltallm \ --create-namespace \ -f https://deltawi.github.io/deltallm/values-eval-.yaml \ --set secret.values.masterKey="$DELTALLM_MASTER_KEY" \ --set secret.values.saltKey="$DELTALLM_SALT_KEY" \ --set-string env[0].name=PLATFORM_BOOTSTRAP_ADMIN_EMAIL \ --set-string env[0].value=admin@example.com \ --set-string env[1].name=PLATFORM_BOOTSTRAP_ADMIN_PASSWORD \ --set-string env[1].value='ChangeMe123!' \ --set image.tag=v-presidio ``` -------------------------------- ### First Model Deployment Example Source: https://deltallm.readthedocs.io/en/latest/configuration/models This snippet defines a public model name `gpt-4o-mini` and configures it to use an OpenAI deployment with specified API key, base URL, and timeout. ```yaml model_list: - model_name: gpt-4o-mini deltallm_params: provider: openai model: openai/gpt-4o-mini api_key: os.environ/OPENAI_API_KEY api_base: https://api.openai.com/v1 timeout: 60 ``` -------------------------------- ### Example Inline Deployment Payload Source: https://deltallm.readthedocs.io/en/latest/admin-ui/models This JSON payload demonstrates how to configure an inline deployment for a vLLM provider, including custom authentication headers. ```json { "model_name": "support-vllm", "deltallm_params": { "provider": "vllm", "model": "vllm/meta-llama/Llama-3.1-8B-Instruct", "api_key": "gateway-key", "api_base": "https://vllm.example/v1", "auth_header_name": "X-API-Key", "auth_header_format": "{api_key}" }, "model_info": { "mode": "chat" } } ``` -------------------------------- ### Install Presidio Engine from Source Source: https://deltallm.readthedocs.io/en/latest/features/guardrails Installs the Presidio engine for local development from source. This command adds the necessary dependencies for the full Presidio engine. ```bash uv sync --dev --extra guardrails-presidio ``` -------------------------------- ### Install DeltaLLM with Helm Source: https://deltallm.readthedocs.io/en/latest/deployment/kubernetes Install or upgrade the DeltaLLM Helm chart using the evaluation values file and custom generated keys. This command deploys DeltaLLM with bundled PostgreSQL and Redis. ```bash helm upgrade --install deltallm ./helm \ --namespace deltallm \ --create-namespace \ -f helm/values-eval.yaml \ --set secret.values.masterKey="$DELTALLM_MASTER_KEY" \ --set secret.values.saltKey="$DELTALLM_SALT_KEY" ``` -------------------------------- ### GET /health/readiness - Readiness Probe Source: https://deltallm.readthedocs.io/en/latest/api/health This endpoint checks if all dependencies are connected and the gateway is ready to serve traffic. It returns `200 OK` when ready, and `503 Service Unavailable` otherwise. ```http GET /health/readiness ``` -------------------------------- ### Bootstrap Model Deployments from Config Source: https://deltallm.readthedocs.io/en/latest/configuration/models Enables seeding the database with model definitions from `config.yaml`. This is typically used for initial setup. After the first seed, this should be set back to `false`. ```yaml general_settings: model_deployment_source: db_only model_deployment_bootstrap_from_config: true ``` -------------------------------- ### Create Virtual API Key Source: https://deltallm.readthedocs.io/en/latest/features/authentication Create a virtual API key for applications. This key can be scoped and limited, for example, by setting a maximum budget. Requires authentication with the master key. ```bash curl -X POST http://localhost:8000/ui/api/keys \ -H "Authorization: Bearer YOUR_MASTER_KEY" \ -H "Content-Type: application/json" \ -d '{ "key_name": "production-app", "team_id": "team-production", "max_budget": 50.00 }' ``` -------------------------------- ### ElevenLabs Text-to-Speech Deployment (Inline Credentials) Source: https://deltallm.readthedocs.io/en/latest/configuration/models Configure an ElevenLabs text-to-speech deployment using inline credentials. This setup routes calls through DeltaLLM's OpenAI-compatible endpoints to ElevenLabs' native API. ```yaml model_list: - model_name: elevenlabs-tts deltallm_params: provider: elevenlabs model: elevenlabs/eleven_multilingual_v2 api_key: os.environ/ELEVENLABS_API_KEY api_base: https://api.elevenlabs.io/v1 model_info: mode: audio_speech default_params: voice_id: 21m00Tcm4TlvDq8ikWAM output_format: mp3_44100_128 ``` -------------------------------- ### ElevenLabs Speech-to-Text Deployment (Inline Credentials) Source: https://deltallm.readthedocs.io/en/latest/configuration/models Configure an ElevenLabs speech-to-text deployment using inline credentials. This setup routes calls through DeltaLLM's OpenAI-compatible endpoints to ElevenLabs' native API. ```yaml model_list: - model_name: elevenlabs-stt deltallm_params: provider: elevenlabs model: elevenlabs/scribe_v2 api_key: os.environ/ELEVENLABS_API_KEY api_base: https://api.elevenlabs.io/v1 model_info: mode: audio_transcription default_params: timestamps_granularity: word diarize: true ``` -------------------------------- ### Minimal Starter Configuration Source: https://deltallm.readthedocs.io/en/latest/configuration/general This example shows a minimal starter configuration for general settings, sourcing sensitive information like master keys, salt keys, database URLs, and admin credentials from environment variables. It also sets session timeouts and model deployment sources. ```yaml general_settings: master_key: os.environ/DELTALLM_MASTER_KEY salt_key: os.environ/DELTALLM_SALT_KEY database_url: os.environ/DATABASE_URL redis_url: os.environ/REDIS_URL platform_bootstrap_admin_email: os.environ/PLATFORM_BOOTSTRAP_ADMIN_EMAIL platform_bootstrap_admin_password: os.environ/PLATFORM_BOOTSTRAP_ADMIN_PASSWORD auth_session_ttl_hours: 12 model_deployment_source: db_only model_deployment_bootstrap_from_config: true governance_notifications_enabled: false budget_notifications_enabled: false key_lifecycle_notifications_enabled: false ``` -------------------------------- ### Initialize Prisma and Apply Database Schema Source: https://deltallm.readthedocs.io/en/latest/getting-started/installation Use these commands to generate Prisma client artifacts, fetch binaries, and apply the schema to your local database. ```bash uv run prisma generate --schema=./prisma/schema.prisma uv run prisma py fetch uv run prisma db push --schema=./prisma/schema.prisma ``` -------------------------------- ### Build and Serve UI from Backend Source: https://deltallm.readthedocs.io/en/latest/getting-started/installation Build the frontend UI and serve it alongside the backend API for a single-process local preview. This is useful for local development and testing. ```bash cd ui npm run build cd .. uv run uvicorn src.main:app --host 0.0.0.0 --port 5000 ``` -------------------------------- ### General Settings for Quick Path Source: https://deltallm.readthedocs.io/en/latest/configuration Configure essential connection and deployment settings for a simplified runtime. Secrets should be managed via environment variables. ```yaml general_settings: master_key: os.environ/DELTALLM_MASTER_KEY salt_key: os.environ/DELTALLM_SALT_KEY database_url: os.environ/DATABASE_URL redis_url: os.environ/REDIS_URL model_deployment_source: db_only model_deployment_bootstrap_from_config: true ``` -------------------------------- ### Recommended Admin UI Login Variables Source: https://deltallm.readthedocs.io/en/latest/getting-started/docker Configure these variables to set up an initial platform admin account for logging into the Admin UI. ```yaml PLATFORM_BOOTSTRAP_ADMIN_EMAIL=admin@example.com PLATFORM_BOOTSTRAP_ADMIN_PASSWORD=ChangeMe123! ``` -------------------------------- ### Model List Response Example Source: https://deltallm.readthedocs.io/en/latest/api/proxy This is an example of the JSON response when listing available models. It shows the structure including the object type, and a list of model details. ```json { "object": "list", "data": [ { "id": "gpt-4o-mini", "object": "model", "owned_by": "deltallm" } ] } ``` -------------------------------- ### Readiness Probe Source: https://deltallm.readthedocs.io/en/latest/api/health Checks that all dependencies are connected. Returns `200 OK` when ready to serve traffic, `503 Service Unavailable` otherwise. ```APIDOC ## GET /health/readiness ### Description Checks that all dependencies are connected. Returns `200 OK` when ready to serve traffic, `503 Service Unavailable` otherwise. ### Method GET ### Endpoint /health/readiness ``` -------------------------------- ### Required Environment Variables Source: https://deltallm.readthedocs.io/en/latest/getting-started/docker These are the essential environment variables required for the starter config.yaml. Ensure DELTALLM_MASTER_KEY and DELTALLM_SALT_KEY are unique and not placeholders. ```yaml DELTALLM_MASTER_KEY=sk-your-master-key DELTALLM_SALT_KEY=your-random-salt-key OPENAI_API_KEY=sk-your-openai-key ``` -------------------------------- ### GET /auth/login Source: https://deltallm.readthedocs.io/en/latest/api/admin Initiates the Single Sign-On (SSO) login flow. ```APIDOC ## GET /auth/login ### Description Initiates the Single Sign-On (SSO) login flow. ### Method GET ### Endpoint /auth/login ``` -------------------------------- ### POST /auth/mfa/enroll/start Source: https://deltallm.readthedocs.io/en/latest/api/admin Initiates the Multi-Factor Authentication (MFA) enrollment process. ```APIDOC ## POST /auth/mfa/enroll/start ### Description Starts the Multi-Factor Authentication (MFA) enrollment process. ### Method POST ### Endpoint /auth/mfa/enroll/start ``` -------------------------------- ### GET /auth/sso-config Source: https://deltallm.readthedocs.io/en/latest/api/admin Retrieves the Single Sign-On (SSO) configuration settings. ```APIDOC ## GET /auth/sso-config ### Description Retrieves the Single Sign-On (SSO) configuration settings. ### Method GET ### Endpoint /auth/sso-config ``` -------------------------------- ### GET /auth/me Source: https://deltallm.readthedocs.io/en/latest/api/admin Inspects the current session state for the authenticated user. ```APIDOC ## GET /auth/me ### Description Inspects the current session state for the authenticated user. ### Method GET ### Endpoint /auth/me ``` -------------------------------- ### Quick Path Router Settings Source: https://deltallm.readthedocs.io/en/latest/configuration/router A minimal configuration for most first deployments, setting basic routing strategy, retries, timeouts, and cooldown. ```yaml router_settings: routing_strategy: simple-shuffle num_retries: 1 retry_after: 1 timeout: 600 cooldown_time: 60 allowed_fails: 0 ``` -------------------------------- ### Get Deployment Source: https://deltallm.readthedocs.io/en/latest/api/admin Retrieves details for a specific model deployment by its ID. ```APIDOC ## GET /ui/api/models/{deployment_id} ### Description Get one deployment ### Method GET ### Endpoint /ui/api/models/{deployment_id} ### Parameters #### Path Parameters - **deployment_id** (string) - Required - The ID of the deployment to retrieve. ``` -------------------------------- ### GET /auth/callback Source: https://deltallm.readthedocs.io/en/latest/api/admin Completes the Single Sign-On (SSO) login process after redirection. ```APIDOC ## GET /auth/callback ### Description Completes the Single Sign-On (SSO) login process after redirection. ### Method GET ### Endpoint /auth/callback ``` -------------------------------- ### Client Request with Tags Source: https://deltallm.readthedocs.io/en/latest/features/routing Example of a client request specifying tags for tag-based routing. ```json { "model": "gpt-4o-mini", "messages": [{"role": "user", "content": "hello"}], "metadata": {"tags": ["eu"]} } ``` -------------------------------- ### Get Batch Status and Progress Source: https://deltallm.readthedocs.io/en/latest/features/batching Fetches the current status and progress details of a specific batch job. ```APIDOC ## GET /v1/batches/{batch_id} ### Description Get batch status and progress. ### Method GET ### Endpoint /v1/batches/{batch_id} ### Parameters #### Path Parameters - **batch_id** (string) - Required - The ID of the batch to retrieve status for. ``` -------------------------------- ### Get One Event Source: https://deltallm.readthedocs.io/en/latest/features/audit-log Retrieves a single audit event by its ID, including any stored payload records. ```APIDOC ## GET /ui/api/audit/events/{event_id} ### Description Retrieves a specific audit event by its unique identifier, including associated payload records if available. ### Method GET ### Endpoint /ui/api/audit/events/{event_id} ### Parameters #### Path Parameters - **event_id** (string) - Required - The unique identifier of the audit event to retrieve. ### Response #### Success Response (200) - **event_id** (string) - Unique identifier for the event. - **occurred_at** (string) - Timestamp when the event occurred. - **organization_id** (string) - The ID of the organization. - **actor_type** (string) - The type of the actor (e.g., USER, SYSTEM). - **actor_id** (string) - The ID of the actor. - **action** (string) - The type of action performed. - **resource_type** (string) - The type of resource affected. - **resource_id** (string) - The ID of the resource affected. - **request_id** (string) - The ID of the request. - **correlation_id** (string) - The correlation ID for the event. - **status** (string) - The status of the action (e.g., SUCCESS, FAILURE). - **latency_ms** (integer) - The latency of the operation in milliseconds. - **input_tokens** (integer) - Number of input tokens. - **output_tokens** (integer) - Number of output tokens. - **error_type** (string) - Type of error, if any. - **error_code** (string) - Error code, if any. - **metadata** (object) - Additional metadata associated with the event. - **content_stored** (boolean) - Indicates if content was stored for this event. - **payloads** (object) - Stored payload records associated with the event, if any. ``` -------------------------------- ### Create Deployment Referencing a Named Credential Source: https://deltallm.readthedocs.io/en/latest/admin-ui/named-credentials This example shows how to create a deployment that uses a previously created named credential. When using a named credential, provider-specific connection fields should be omitted from the deployment payload. ```bash curl http://localhost:4002/ui/api/models \ -H "Authorization: Bearer $DELTALLM_MASTER_KEY" \ -H "Content-Type: application/json" \ -d '{ "model_name": "support-vllm", "named_credential_id": "cred-123", "deltallm_params": { "provider": "vllm", "model": "vllm/meta-llama/Llama-3.1-8B-Instruct" }, "model_info": { "mode": "chat" } }' ``` -------------------------------- ### Generate Security Keys Source: https://deltallm.readthedocs.io/en/latest/getting-started/installation Generate unique DELTALLM_MASTER_KEY and DELTALLM_SALT_KEY using Python and OpenSSL. These are required for DeltaLLM to start. ```bash export DELTALLM_MASTER_KEY="$(python3 -c 'import secrets; print(\"sk-\" + secrets.token_hex(20) + \"A1\")')" export DELTALLM_SALT_KEY="$(openssl rand -hex 32)" ``` -------------------------------- ### Apply Prisma Schema Source: https://deltallm.readthedocs.io/en/latest/getting-started/docker Applies the Prisma schema to the database on startup for the DeltaLLM container. ```bash prisma db push --schema=./prisma/schema.prisma --accept-data-loss ``` -------------------------------- ### Get Named Credential Source: https://deltallm.readthedocs.io/en/latest/admin-ui/named-credentials Retrieves the details of a specific named credential, including its usage count and linked deployments. ```APIDOC ## GET /ui/api/named-credentials/{credential_id} ### Description Retrieves the details of a specific named credential. ### Method GET ### Endpoint /ui/api/named-credentials/{credential_id} ### Parameters #### Path Parameters - **credential_id** (string) - Required - The ID of the credential to retrieve. ### Response #### Success Response (200) - **credential_id** (string) - The unique identifier for the credential. - **name** (string) - The name of the credential. - **provider** (string) - The provider of the service. - **connection_config** (object) - Configuration details for the connection (sensitive fields redacted). - **credentials_present** (boolean) - Indicates if credentials are set. - **usage_count** (integer) - The number of times the credential has been used. - **linked_deployments** (array) - A list of deployments linked to this credential. #### Response Example ```json { "credential_id": "cred-123", "name": "vLLM Shared Gateway", "provider": "vllm", "connection_config": { "api_key": "***REDACTED***", "api_base": "https://vllm.example/v1", "auth_header_name": "X-API-Key", "auth_header_format": "{api_key}" }, "credentials_present": true, "usage_count": 5, "linked_deployments": ["deploy-abc", "deploy-xyz"] } ``` ``` -------------------------------- ### Example Response Shape for Named Credential Creation Source: https://deltallm.readthedocs.io/en/latest/admin-ui/named-credentials This is the expected JSON response structure when a named credential is successfully created. ```json { "credential_id": "cred-123", "name": "vLLM Shared Gateway", "provider": "vllm", "connection_config": { "api_key": "***REDACTED***", "api_base": "https://vllm.example/v1", "auth_header_name": "X-API-Key", "auth_header_format": "{api_key}" }, "credentials_present": true, "usage_count": 0 } ``` -------------------------------- ### Export DeltaLLM Base URL and Master Key Source: https://deltallm.readthedocs.io/en/latest/getting-started/mcp-quickstart Set environment variables for the DeltaLLM base URL and your master key. Use `http://localhost:4002` for Docker quick starts or `http://localhost:8000` for local backends. ```bash export BASE="http://localhost:4002" export MASTER_KEY="YOUR_MASTER_KEY" ``` -------------------------------- ### Build and Run Deltallm Docker Image Source: https://deltallm.readthedocs.io/en/latest/getting-started/docker Builds the Deltallm Docker image and runs a container with specified ports, environment variables, and volume mounts. Ensure the database is reachable and keys are set. ```bash docker build -t deltallm . docker run -p 4002:4000 \ -e DATABASE_URL="postgresql://..." \ -e DELTALLM_MASTER_KEY="sk-your-key" \ -e DELTALLM_SALT_KEY="your-salt-key" \ -v ./config.yaml:/app/config/config.yaml:ro \ deltallm ``` -------------------------------- ### Prometheus Scrape Configuration Source: https://deltallm.readthedocs.io/en/latest/features/observability Example Prometheus configuration to scrape metrics from DeltaLLM. Ensure Prometheus is configured to access the `/metrics` endpoint. ```yaml scrape_configs: - job_name: deltallm scrape_interval: 15s static_configs: - targets: ["localhost:8000"] metrics_path: /metrics ``` -------------------------------- ### Configure Environment Variables for Local Development Source: https://deltallm.readthedocs.io/en/latest/getting-started/installation Set essential environment variables for database connection, security, API keys, and admin credentials. Ensure DELTALLM_MASTER_KEY and DELTALLM_SALT_KEY are unique and not placeholder values. ```bash export DATABASE_URL="postgresql://postgres:postgres@localhost:5432/deltallm" export DELTALLM_MASTER_KEY="sk-local-1234567890abcdefghijklmnop" export DELTALLM_SALT_KEY="$(openssl rand -hex 32)" export OPENAI_API_KEY="sk-your-provider-key" export PLATFORM_BOOTSTRAP_ADMIN_EMAIL="admin@example.com" export PLATFORM_BOOTSTRAP_ADMIN_PASSWORD="ChangeMe123!" ```