mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-29 03:01:50 +03:00
test: increase live-model retry token budget for reasoning-first providers
This commit is contained in:
@@ -141,7 +141,7 @@ async function completeOkWithRetry(params: {
|
|||||||
apiKey: string;
|
apiKey: string;
|
||||||
timeoutMs: number;
|
timeoutMs: number;
|
||||||
}) {
|
}) {
|
||||||
const runOnce = async () => {
|
const runOnce = async (maxTokens: number) => {
|
||||||
const res = await completeSimpleWithTimeout(
|
const res = await completeSimpleWithTimeout(
|
||||||
params.model,
|
params.model,
|
||||||
{
|
{
|
||||||
@@ -156,7 +156,7 @@ async function completeOkWithRetry(params: {
|
|||||||
{
|
{
|
||||||
apiKey: params.apiKey,
|
apiKey: params.apiKey,
|
||||||
reasoning: resolveTestReasoning(params.model),
|
reasoning: resolveTestReasoning(params.model),
|
||||||
maxTokens: 64,
|
maxTokens,
|
||||||
},
|
},
|
||||||
params.timeoutMs,
|
params.timeoutMs,
|
||||||
);
|
);
|
||||||
@@ -167,11 +167,13 @@ async function completeOkWithRetry(params: {
|
|||||||
return { res, text };
|
return { res, text };
|
||||||
};
|
};
|
||||||
|
|
||||||
const first = await runOnce();
|
const first = await runOnce(64);
|
||||||
if (first.text.length > 0) {
|
if (first.text.length > 0) {
|
||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
return await runOnce();
|
// Some providers (for example Moonshot Kimi and MiniMax M2.5) may emit
|
||||||
|
// reasoning blocks first and only return text once token budget is higher.
|
||||||
|
return await runOnce(256);
|
||||||
}
|
}
|
||||||
|
|
||||||
describeLive("live models (profile keys)", () => {
|
describeLive("live models (profile keys)", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user