test: respect openai max tokens floor
This commit is contained in:
@@ -18,8 +18,9 @@ describeLive("pi embedded extra params (live)", () => {
|
|||||||
defaults: {
|
defaults: {
|
||||||
models: {
|
models: {
|
||||||
"openai/gpt-5.2": {
|
"openai/gpt-5.2": {
|
||||||
|
// OpenAI Responses enforces a minimum max_output_tokens of 16.
|
||||||
params: {
|
params: {
|
||||||
maxTokens: 8,
|
maxTokens: 16,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -57,7 +58,7 @@ describeLive("pi embedded extra params (live)", () => {
|
|||||||
|
|
||||||
expect(stopReason).toBeDefined();
|
expect(stopReason).toBeDefined();
|
||||||
expect(outputTokens).toBeDefined();
|
expect(outputTokens).toBeDefined();
|
||||||
// Should respect maxTokens from config (8) — allow a small buffer for provider rounding.
|
// Should respect maxTokens from config (16) — allow a small buffer for provider rounding.
|
||||||
expect(outputTokens ?? 0).toBeLessThanOrEqual(12);
|
expect(outputTokens ?? 0).toBeLessThanOrEqual(20);
|
||||||
}, 30_000);
|
}, 30_000);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user