fix(onboard): cap compat probe max_tokens (#66450)

* fix(onboard): cap compat probe max_tokens

* docs(changelog): fix onboarding entry

* Update CHANGELOG.md
This commit is contained in:
Vincent Koc
2026-04-14 11:03:44 +01:00
committed by GitHub
parent f4372613d8
commit e9f5619716
3 changed files with 5 additions and 3 deletions

View File

@@ -202,7 +202,7 @@ describe("promptCustomApiConfig", () => {
const firstCall = fetchMock.mock.calls[0]?.[1] as { body?: string } | undefined;
expect(firstCall?.body).toBeDefined();
expect(JSON.parse(firstCall?.body ?? "{}")).toMatchObject({ max_tokens: 1 });
expect(JSON.parse(firstCall?.body ?? "{}")).toMatchObject({ max_tokens: 16 });
});
it("uses azure responses-specific headers and body for openai verification probes", async () => {
@@ -259,7 +259,7 @@ describe("promptCustomApiConfig", () => {
expect(body).toEqual({
model: "deepseek-v3-0324",
messages: [{ role: "user", content: "Hi" }],
max_tokens: 1,
max_tokens: 16,
stream: false,
});
});

View File

@@ -400,7 +400,8 @@ async function requestOpenAiVerification(params: {
body: {
model: params.modelId,
messages: [{ role: "user", content: "Hi" }],
max_tokens: 1,
// Recent OpenAI-family endpoints reject probes below 16 tokens.
max_tokens: 16,
stream: false,
},
});