Skip to content

Commit d7f462c

Browse files
authored
Clarify where the LLM API key files should be. #9758
1 parent 6296016 commit d7f462c

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

docs/en_US/ai_tools.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ Select your preferred LLM provider from the dropdown:
5151
Use Claude models from Anthropic, or any Anthropic-compatible API provider.
5252

5353
* **API URL**: Custom API endpoint URL (leave empty for default: https://api.anthropic.com/v1).
54-
* **API Key File**: Path to a file containing your Anthropic API key (obtain from https://console.anthropic.com/). Optional when using a custom URL with a provider that does not require authentication.
54+
* **API Key File**: Path to a file containing your Anthropic API key (obtain from https://console.anthropic.com/). This path refers to the filesystem where the pgAdmin server is running (e.g., inside the container if using Docker). The ``~`` prefix is expanded to the home directory of the user running the pgAdmin server process. Optional when using a custom URL with a provider that does not require authentication.
5555
* **Model**: Select from available Claude models (e.g., claude-sonnet-4-20250514).
5656

5757
**OpenAI**
5858
Use GPT models from OpenAI, or any OpenAI-compatible API provider (e.g.,
5959
LiteLLM, LM Studio, EXO, or other local inference servers).
6060

6161
* **API URL**: Custom API endpoint URL (leave empty for default: https://api.openai.com/v1). Include the ``/v1`` path prefix if required by your provider.
62-
* **API Key File**: Path to a file containing your OpenAI API key (obtain from https://platform.openai.com/). Optional when using a custom URL with a provider that does not require authentication.
62+
* **API Key File**: Path to a file containing your OpenAI API key (obtain from https://platform.openai.com/). This path refers to the filesystem where the pgAdmin server is running (e.g., inside the container if using Docker). The ``~`` prefix is expanded to the home directory of the user running the pgAdmin server process. Optional when using a custom URL with a provider that does not require authentication.
6363
* **Model**: Select from available GPT models (e.g., gpt-4).
6464

6565
**Ollama**

docs/en_US/preferences.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ Use the fields on the *AI* panel to configure your LLM provider:
5252
to use an Anthropic-compatible API provider.
5353

5454
* Use the *API Key File* field to specify the path to a file containing your
55-
Anthropic API key. The API key may be optional when using a custom API URL
55+
Anthropic API key. This path refers to the filesystem where the pgAdmin
56+
server is running (e.g., inside the container if using Docker). The ``~``
57+
prefix is expanded to the home directory of the user running the pgAdmin
58+
server process. The API key may be optional when using a custom API URL
5659
with a provider that does not require authentication.
5760

5861
* Use the *Model* field to select from the available Claude models. Click the
@@ -68,7 +71,10 @@ Use the fields on the *AI* panel to configure your LLM provider:
6871
(e.g., ``http://localhost:1234/v1``).
6972

7073
* Use the *API Key File* field to specify the path to a file containing your
71-
OpenAI API key. The API key may be optional when using a custom API URL
74+
OpenAI API key. This path refers to the filesystem where the pgAdmin
75+
server is running (e.g., inside the container if using Docker). The ``~``
76+
prefix is expanded to the home directory of the user running the pgAdmin
77+
server process. The API key may be optional when using a custom API URL
7278
with a provider that does not require authentication.
7379

7480
* Use the *Model* field to select from the available GPT models. Click the

web/pgadmin/llm/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ def register_preferences(self):
123123
category_label=gettext('Anthropic'),
124124
help_str=gettext(
125125
'Path to a file containing your Anthropic API key. '
126+
'This path must be on the server hosting pgAdmin, '
127+
'e.g. inside the container when using Docker. '
126128
'The file should contain only the API key. The API key '
127129
'may be optional when using a custom API URL with a '
128130
'provider that does not require authentication.'
@@ -185,6 +187,8 @@ def register_preferences(self):
185187
category_label=gettext('OpenAI'),
186188
help_str=gettext(
187189
'Path to a file containing your OpenAI API key. '
190+
'This path must be on the server hosting pgAdmin, '
191+
'e.g. inside the container when using Docker. '
188192
'The file should contain only the API key. The API key '
189193
'may be optional when using a custom API URL with a '
190194
'provider that does not require authentication.'

0 commit comments

Comments
 (0)