Skip to content

Commit 38c7cfe

Browse files
committed
docs: document TLS/mTLS configuration for model providers
1 parent 66d1068 commit 38c7cfe

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/config.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,26 @@ Number of times Codex will attempt to reconnect when a streaming response is int
174174

175175
How long Codex will wait for activity on a streaming response before treating the connection as lost. Defaults to `300_000` (5 minutes).
176176

177+
#### TLS and mTLS configuration
178+
179+
Model providers accept an optional `tls` block for custom CA certificates or mutual TLS. Relative paths are resolved against the directory containing the config file:
180+
181+
```toml
182+
[model_providers.my-secure-provider.tls]
183+
ca-certificate = "certs/ca.pem"
184+
client-certificate = "certs/client.pem"
185+
client-private-key = "certs/client-key.pem"
186+
```
187+
188+
Paths can also be read from environment variables (which take precedence if set). Paths from environment variables must be absolute:
189+
190+
```toml
191+
[model_providers.my-secure-provider.tls]
192+
ca-certificate-env = "MY_CA_CERT_PATH"
193+
client-certificate-env = "MY_CLIENT_CERT_PATH"
194+
client-private-key-env = "MY_CLIENT_KEY_PATH"
195+
```
196+
177197
### model_provider
178198

179199
Identifies which provider to use from the `model_providers` map. Defaults to `"openai"`. You can override the `base_url` for the built-in `openai` provider via the `OPENAI_BASE_URL` environment variable.

0 commit comments

Comments
 (0)