mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:00:44 +00:00
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:
@@ -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,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user