]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
arg: Add LLAMA_ARG_API_KEY_FILE environment variable for --api-key-file (#23167)
authorMikolaj Kucharski <redacted>
Thu, 28 May 2026 14:25:40 +0000 (14:25 +0000)
committerGitHub <redacted>
Thu, 28 May 2026 14:25:40 +0000 (16:25 +0200)
common/arg.cpp
tools/server/README.md

index bdc2e9eb4fc9f14b87b335a00f410e70b6c04cee..f6fdd4fa63f7aad9addc6be0c3a301bc9b8e9ea0 100644 (file)
@@ -2998,7 +2998,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
             }
             key_file.close();
         }
-    ).set_examples({LLAMA_EXAMPLE_SERVER}));
+    ).set_examples({LLAMA_EXAMPLE_SERVER}).set_env("LLAMA_ARG_API_KEY_FILE"));
     add_opt(common_arg(
         {"--ssl-key-file"}, "FNAME",
         "path to file a PEM-encoded SSL private key",
index 0d20ced879f70ece059183bf99eed22a9a853673..b975088e4ae9e93ee7eae051d2685785c1571600 100644 (file)
@@ -201,7 +201,7 @@ For the full list of features, please refer to [server's changelog](https://gith
 | `--embedding, --embeddings` | restrict to only support embedding use case; use only with dedicated embedding models (default: disabled)<br/>(env: LLAMA_ARG_EMBEDDINGS) |
 | `--rerank, --reranking` | enable reranking endpoint on server (default: disabled)<br/>(env: LLAMA_ARG_RERANKING) |
 | `--api-key KEY` | API key to use for authentication, multiple keys can be provided as a comma-separated list (default: none)<br/>(env: LLAMA_API_KEY) |
-| `--api-key-file FNAME` | path to file containing API keys (default: none) |
+| `--api-key-file FNAME` | path to file containing API keys, one per line (default: none)<br/>(env: LLAMA_ARG_API_KEY_FILE) |
 | `--ssl-key-file FNAME` | path to file a PEM-encoded SSL private key<br/>(env: LLAMA_ARG_SSL_KEY_FILE) |
 | `--ssl-cert-file FNAME` | path to file a PEM-encoded SSL certificate<br/>(env: LLAMA_ARG_SSL_CERT_FILE) |
 | `--chat-template-kwargs STRING` | sets additional params for the json template parser, must be a valid json object string, e.g. '{"key1":"value1","key2":"value2"}'<br/>(env: LLAMA_ARG_CHAT_TEMPLATE_KWARGS) |