Skip to content

Commit 632e2d3

Browse files
committed
Add FAQ section addressing openai.PermissionDeniedError for custom LLM endpoints
1 parent 7999375 commit 632e2d3

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

FAQ.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# FAQ
2+
3+
## API / Errors
4+
5+
### Why do I get `openai.PermissionDeniedError: Your request was blocked` with my custom LLM endpoint?
6+
This usually happens if you are using a proxy (e.g., Cloudflare or a corporate firewall) and it blocks requests that look like automated agents.
7+
8+
#### Solution:
9+
Override the default OpenAI request headers to include a valid `User-Agent` in ModelAuditor:
10+
11+
```python
12+
extra_kwargs={"default_headers": {"User-Agent": "SimpleAudit-test/1.0"}} # for model calls
13+
# or
14+
judge_extra_kwargs={"default_headers": {"User-Agent": "SimpleAudit-test/1.0"}} # for judge calls
15+
```

0 commit comments

Comments
 (0)