You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds command-line options to the "guidellm benchmark" command to support
custom authentication headers and skipping SSL verification when
communicating with the target system.
New options:
--target-header: Allows specifying a custom header(s) for the target.
--target-skip-ssl-verify: A flag to disable SSL certificate verification for the target.
These options provide more flexibility for benchmarking targets in
various environments, such as those with self-signed certificates or
custom authentication mechanisms. The names were chosen to align with
the existing --target argument to make it clear these apply to requests
made to the target.
The implementation now follows the following precedence for setting request headers:
1. Headers from the `--target-header` CLI option (highest priority).
2. Headers defined in a `.env` file or as environment variables.
3. Default headers derived from other parameters like `api_key`, `organization`, or `project` (lowest
priority).
This commit also adds documentation and tests for these new features,
covering both CLI usage and configuration via environment variables or a
`.env` file.
This page provides a reference for the `guidellm` command-line interface. For more advanced configuration, including environment variables and `.env` files, see the [Configuration Guide](./configuration.md).
4
+
5
+
## `guidellm benchmark run`
6
+
7
+
This command is the primary entrypoint for running benchmarks.
8
+
9
+
### Target Configuration
10
+
11
+
These options configure how `guidellm` connects to the system under test.
12
+
13
+
| Option | Description |
14
+
| --- | --- |
15
+
|`--target <URL>`|**Required.** The endpoint of the target system, e.g., `http://localhost:8080`. |
16
+
|`--target-header <HEADER>`| A header to send with requests to the target. This option can be specified multiple times to send multiple headers. The header should be in the format `"Header-Name: Header-Value"`. For example: `--target-header "Authorization: Bearer my-secret-token"`|
17
+
|`--target-skip-ssl-verify`| A flag to disable SSL certificate verification when connecting to the target. This is useful for development environments with self-signed certificates, but should be used with caution in production. |
The `guidellm` application can be configured using command-line arguments, environment variables, or a `.env` file. This page details the file-based and environment variable configuration options.
4
+
5
+
## Configuration Methods
6
+
7
+
Settings are loaded with the following priority (highest priority first):
8
+
1. Command-line arguments.
9
+
2. Environment variables.
10
+
3. Values in a `.env` file in the directory where the command is run.
11
+
4. Default values.
12
+
13
+
## Environment Variable Format
14
+
15
+
All settings can be configured using environment variables. The variables must be prefixed with `GUIDELLM__`, and nested settings are separated by a double underscore `__`.
16
+
17
+
For example, to set the `api_key` for the `openai` backend, you would use the following environment variable:
18
+
```bash
19
+
export GUIDELLM__OPENAI__API_KEY="your-api-key"
20
+
```
21
+
22
+
### Target Configuration
23
+
24
+
You can configure the connection to the target system using environment variables. This is an alternative to using the `--target-*` command-line flags.
25
+
26
+
| Environment Variable | Description | Example |
27
+
| --- | --- | --- |
28
+
|`GUIDELLM__OPENAI__HEADERS`| A JSON string representing a dictionary of headers to send to the target. These headers will override any default headers (like `Authorization` from `api_key`). |`export GUIDELLM__OPENAI__HEADERS='{"Authorization": "Bearer my-token", "X-Custom-Header": "value"}'`|
29
+
|`GUIDELLM__OPENAI__ORGANIZATION`| The OpenAI organization to use for requests. |`export GUIDELLM__OPENAI__ORGANIZATION="org-12345"`|
30
+
|`GUIDELLM__OPENAI__PROJECT`| The OpenAI project to use for requests. |`export GUIDELLM__OPENAI__PROJECT="proj-67890"`|
31
+
|`GUIDELLM__OPENAI__VERIFY_SSL`| Set to `false` or `0` to disable SSL certificate verification. |`export GUIDELLM__OPENAI__VERIFY_SSL=false`|
32
+
33
+
### Using a `.env` file
34
+
35
+
You can also place these variables in a `.env` file in your project's root directory:
0 commit comments