Configuration
DIAL Model Provider is configured with environment variables. Every adapter it runs reads the variables it reads when it runs standalone, from one process environment that all adapters share. The process itself adds a few settings. This reference is for platform engineers who deploy DIAL Model Provider; it assumes you know the served paths.
Everything below is checked against DIAL Model Provider 0.1.0-rc.0: its Dockerfile, scripts/docker_entrypoint.sh, scripts/__cacert_entrypoint.sh, and the adapter sources.
Adapter settings
Each adapter's variables, supported models, and per-deployment settings are on its own pages:
| Adapter | Variables | Models |
|---|---|---|
| OpenAI | DIAL OpenAI Adapter configuration | Supported upstreams |
| Bedrock | DIAL Bedrock Adapter configuration | Supported models |
| Vertex AI | DIAL Vertex AI Adapter configuration | Supported models |
| DIAL-to-DIAL | DIAL-to-DIAL adapter | — |
Set the variables of every adapter you use on the one DIAL Model Provider container.
Process settings
| Variable | Default | Description |
|---|---|---|
TIMEOUT_KEEP_ALIVE | 70 | How long an idle HTTP keep-alive connection stays open, in seconds. Passed to Uvicorn as --timeout-keep-alive. See Keep-alive timeout. |
LOG_LEVEL | INFO | The level of the aidial_model_provider, aidial_sdk, aidial_adapter_anthropic, and uvicorn loggers, so one level applies to every adapter in the process. AIDIAL_LOG_LEVEL, which the standalone Bedrock and Vertex AI adapters read, is not read. |
USE_SYSTEM_CA_CERTS | — | Any non-empty value trusts the PEM *.crt files mounted at /certificates, in addition to the system CA bundle. See Private certificate authorities. |
Keep-alive timeout
DIAL Core keeps idle connections in its pool for client.keepAliveTimeout seconds, 60 by default. DIAL Model Provider must keep them open longer, so that Core is always the side that closes first. Keep TIMEOUT_KEEP_ALIVE at Core's client.keepAliveTimeout plus 10 seconds:
DIAL Core client.keepAliveTimeout | TIMEOUT_KEEP_ALIVE |
|---|---|
60 (default) | 70 (default) |
The default covers an unmodified DIAL Core, so change it only when you change client.keepAliveTimeout. Uvicorn's own default of 5 seconds is not safe. DIAL Model Provider would close idle connections before Core expires them, and a request Core writes into a closed connection fails with Connection was closed.
Private certificate authorities
To trust a private CA for outbound TLS, set USE_SYSTEM_CA_CERTS and mount a directory of PEM *.crt files at /certificates:
docker run --rm \
-e USE_SYSTEM_CA_CERTS=1 \
-v "$PWD/certs:/certificates:ro" \
epam/ai-dial-model-provider:0.1.0-rc.0
At startup, the container combines the system CA bundle with those certificates in a file under /tmp and points SSL_CERT_FILE at it, so /tmp must be writable.
Shared variables
The adapters share one environment, so a variable that several adapters read takes one value for all of them. When you merge the environments of standalone adapters, check these variables. Where the defaults differ, the value you set applies to every adapter that reads it.
| Variable | Read by | Defaults |
|---|---|---|
DIAL_URL | OpenAI, Bedrock, Vertex AI, DIAL-to-DIAL | — |
HTTP_MAX_CONNECTIONS | OpenAI, Vertex AI, DIAL-to-DIAL | OpenAI 1000, Vertex AI 250, DIAL-to-DIAL 1000 |
HTTP_MAX_KEEPALIVE_CONNECTIONS | OpenAI, Vertex AI, DIAL-to-DIAL | OpenAI 100, Vertex AI 75, DIAL-to-DIAL 100 |
HTTP_POOL_TIMEOUT | OpenAI, Vertex AI, DIAL-to-DIAL | 10 |
HTTP_TRANSPORT | OpenAI, Vertex AI | aiohttp |
THREAD_POOL_SIZE | OpenAI, Bedrock | OpenAI min(32, CPUs + 4), Bedrock 512 |
CLAUDE_DEFAULT_MAX_TOKENS | OpenAI, Bedrock, Vertex AI | 1536 |
ANTHROPIC_MAX_RETRY_ATTEMPTS | Bedrock, Vertex AI | 0 |
ACCESS_TOKEN_EXPIRATION_WINDOW | OpenAI, Vertex AI | 10 |
AWS_DEFAULT_REGION | Bedrock, Vertex AI | — |
The table lists the variables found in the adapter sources of 0.1.0-rc.0; it is not exhaustive.
Region variables
The standalone Bedrock adapter also accepts the deprecated DEFAULT_REGION for the AWS region. In DIAL Model Provider, that name belongs to the Vertex AI adapter, as the deprecated form of GCP_DEFAULT_REGION. So the Bedrock adapter reads only AWS_DEFAULT_REGION. When it needs a default region and the variable is not set, it fails with AWS_DEFAULT_REGION env variable is not set.
Example
DIAL Model Provider in Docker Compose, serving Bedrock and Vertex AI models with credentials from the environment:
model-provider:
image: epam/ai-dial-model-provider:0.1.0-rc.0
environment:
DIAL_URL: http://core:8080
LOG_LEVEL: INFO
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: <AWS_ACCESS_KEY_ID>
AWS_SECRET_ACCESS_KEY: <AWS_SECRET_ACCESS_KEY>
GCP_PROJECT_ID: <GCP_PROJECT_ID>
GCP_DEFAULT_REGION: us-central1
GOOGLE_APPLICATION_CREDENTIALS: /etc/gcp/key.json
volumes:
- ./gcp-key.json:/etc/gcp/key.json:ro
Further reading
- Migrate from the standalone adapters — merge adapter environments and repoint DIAL Core models
- DIAL OpenAI Adapter configuration — Azure and AWS credentials, deployment categories, and performance settings
- DIAL Bedrock Adapter configuration — AWS credentials, session tags, and resource limits
- DIAL Vertex AI Adapter configuration — Google Cloud credentials, regions, and connections
- Settings: Server and client — DIAL Core's
client.keepAliveTimeoutand other connection settings