Skip to content

Commit 2b19b4a

Browse files
committed
docs: update docs for completion adapters
1 parent 5317633 commit 2b19b4a

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

adminforth/documentation/docs/tutorial/05-Adapters/05-ai-completion-adapters.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,14 @@ new CompletionAdapterOpenAIResponses({
127127
}),
128128
```
129129

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.
131131

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`).
133133

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:
135138

136139
```ts
137140
new CompletionAdapterOpenAIResponses({
@@ -145,17 +148,19 @@ new CompletionAdapterOpenAIResponses({
145148
}),
146149
```
147150

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-
153151
If `useComplitionApi` is omitted, the adapter keeps the current default behavior:
154152

155153
- 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.
157163

158-
OVH AI Endpoints still does not fully support the `responses` API, so `useComplitionApi: false` may work unstably there.
159164

160165

161166

0 commit comments

Comments
 (0)