Version: pgAdmin 4.9.15
Related commit: https://github.com/pgadmin-org/pgadmin4/commit/24485fe9649860dcb632bb8029d4fa8efbafbc04
Related issue: https://github.com/pgadmin-org/pgadmin4/issues/9900
Summary
The fix for #9900 introduced a hardcoded allow‑list of LLM provider URLs, which breaks all custom OpenAI‑compatible endpoints, including:
This is a regression from 4.9.14, where custom endpoints worked correctly.
It only allows these hardcoded urls: https://github.com/pgadmin-org/pgadmin4/blob/master/web/config.py#L1055-L1066:
# Allowed LLM API URLs
# A list of scheme://host:port entries that LLM API requests are allowed
# to connect to. Only URLs matching an entry in this list will be permitted.
# This prevents SSRF attacks via user-controlled API URL fields.
# Set to an empty list to disable URL restriction (not recommended).
# Add entries for custom providers (LiteLLM, LM Studio, corporate proxies).
ALLOWED_LLM_API_URLS = [
'https://api.anthropic.com:443',
'https://api.openai.com:443',
'http://localhost:11434', # Ollama default
'http://localhost:12434', # Docker Model Runner default
]
To Reproduce
Steps to reproduce the behavior:
- Go to AI>AI Configuration
- Select OpenAI as Default Provider
- Go to AI>OpenAI
- API Key File: Configure the path of your API key file
- API URL: Configure your custom LiteLLM URL
- Model: Configure your preferred Model
Expected behavior
The AI Assistant should work without errors as it was working before on PgAdmin 4.9.14
Error message
It defaults to OpenAI
Additional context
Add any other context about the problem here.
CC @dpage
Version: pgAdmin 4.9.15
Related commit: https://github.com/pgadmin-org/pgadmin4/commit/24485fe9649860dcb632bb8029d4fa8efbafbc04
Related issue: https://github.com/pgadmin-org/pgadmin4/issues/9900
Summary
The fix for #9900 introduced a hardcoded allow‑list of LLM provider URLs, which breaks all custom OpenAI‑compatible endpoints, including:
This is a regression from 4.9.14, where custom endpoints worked correctly.
It only allows these hardcoded urls: https://github.com/pgadmin-org/pgadmin4/blob/master/web/config.py#L1055-L1066:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The AI Assistant should work without errors as it was working before on PgAdmin 4.9.14
Error message
It defaults to OpenAI
Additional context
Add any other context about the problem here.
CC @dpage