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
feat(core): add api_format option to OpenAI/Azure targets
Add api_format field ("chat" | "responses") to OpenAI and Azure target
configs. Defaults to "chat" (Chat Completions API) which is universally
supported by all OpenAI-compatible endpoints. Users can opt in to the
Responses API by setting api_format: responses.
Closes#896
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: apps/web/src/content/docs/docs/targets/llm-providers.mdx
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,52 @@ sidebar:
7
7
8
8
LLM provider targets call language model APIs directly. These are used both as evaluation targets and as grader targets for scoring.
9
9
10
+
## OpenAI
11
+
12
+
```yaml
13
+
targets:
14
+
- name: openai-target
15
+
provider: openai
16
+
api_key: ${{ OPENAI_API_KEY }}
17
+
model: gpt-4o
18
+
```
19
+
20
+
| Field | Required | Description |
21
+
|-------|----------|-------------|
22
+
| `api_key` | Yes | OpenAI API key |
23
+
| `model` | Yes | Model identifier |
24
+
| `base_url` | No | Custom base URL for OpenAI-compatible endpoints |
25
+
| `api_format` | No | API format: `chat`(default) or `responses` |
26
+
27
+
### `api_format`
28
+
29
+
Controls which OpenAI API endpoint is used:
30
+
31
+
| Value | Endpoint | When to use |
32
+
|-------|----------|-------------|
33
+
| `chat` (default) | `/chat/completions` | All OpenAI-compatible endpoints (GitHub Models, local proxies, etc.) |
34
+
| `responses` | `/responses` | Only `api.openai.com` — opt in to the Responses API |
35
+
36
+
Most users should leave this unset. The default `chat` format is universally supported. Use `responses` only when you need Responses API features on `api.openai.com` directly.
37
+
38
+
```yaml
39
+
# OpenAI-compatible endpoint (default chat format works)
0 commit comments