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
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/05-Adapters/05-ai-completion-adapters.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,11 +127,14 @@ new CompletionAdapterOpenAIResponses({
127
127
}),
128
128
```
129
129
130
-
You can specify any GPT model you need. The default is `gpt-5-nano`.
130
+
You can specify any GPT model you need. The default is `gpt-5-nano` as it is cheapest though may behave weakly.
131
131
132
-
This adapter uses the OpenAI `responses` API.
132
+
By default, this adapter uses the OpenAI `responses` API (`v1/responses`) unless `useComplitionApi` is set to `true`. If `useComplitionApi` is `true`, it uses the older Chat Completions API (`v1/chat/completions`).
133
133
134
-
OpenAI-compatible providers can use the same adapter by setting `baseUrl`:
134
+
135
+
### Using with OpenAI-compatible API providers (for example based on self-hosted vLLM docker images)
136
+
137
+
Adapter can run OpenAI-compatible providers by setting `baseUrl`, for example you can use OVH AI Endpoints:
135
138
136
139
```ts
137
140
newCompletionAdapterOpenAIResponses({
@@ -145,17 +148,19 @@ new CompletionAdapterOpenAIResponses({
145
148
}),
146
149
```
147
150
148
-
For LangChain agent mode, `useComplitionApi` controls which provider API is used:
149
-
150
-
-`false` uses the OpenAI `responses` API
151
-
-`true` uses the Chat Completions API
152
-
153
151
If `useComplitionApi` is omitted, the adapter keeps the current default behavior:
154
152
155
153
- official OpenAI uses the `responses` API
156
-
- custom `baseUrl` providers use the Chat Completions API
154
+
- custom `baseUrl` providers use the Chat Completions API.
155
+
156
+
This is because many OpenAI-compatible providers do not yet support the `responses` API or support it unstably (for example OVH AI Endpoints still - Apr 2026 does not fully support the `responses`, so `useComplitionApi: false` may work unstably there, though you can re-test it by manually enabling it by setting `useComplitionApi: true` and checking if it works).
157
+
Any 3rd-party API providers might have next reasones of pure `responses` API compatibility:
158
+
159
+
1) If they use vLLM open-source software under the hood they might have outdated version
160
+
2) Custom non-vLLM implmentation might have reliable chat API implementation while give less priority to responses API as it is more complex and new.
161
+
162
+
We recommend you to try responses API first because it gives rich features sets, including summarization and better structured outputs.
157
163
158
-
OVH AI Endpoints still does not fully support the `responses` API, so `useComplitionApi: false` may work unstably there.
0 commit comments