mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-07-09 17:19:02 +00:00
fix(test): restore openai model selection in ACP set_config_option test (#5721)
PR #5676 (an unrelated v5 settings-migration fix) inadvertently reverted the model-selection assertion in the ACP integration test back to a flaky form that asserts the session's current model is present in availableModels. In CI (no real auth) the default current model is not in availableModels, so the assertion fails with "expected false to be true", breaking the Release workflow's "Integration Tests (No Sandbox)" job and gating the Publish Release step. Restore the robust form that explicitly picks an openai model from availableModels (matching the version that shipped in every successful release since March), which avoids the auth-dependent current-model mismatch.
This commit is contained in:
parent
2fd2104fa1
commit
9993c6f413
1 changed files with 8 additions and 8 deletions
|
|
@ -508,17 +508,17 @@ function setupAcpTest(
|
|||
expect(modelOption).toBeDefined();
|
||||
expect(modelOption!.currentValue).toBeTruthy();
|
||||
|
||||
const modelId = modelOption!.currentValue;
|
||||
expect(
|
||||
newSession.models.availableModels.some(
|
||||
(model) => model.modelId === modelId,
|
||||
),
|
||||
).toBe(true);
|
||||
// Test: Set model using set_config_option
|
||||
// Use openai model to avoid auth issues
|
||||
const openaiModel = newSession.models.availableModels.find((model) =>
|
||||
model.modelId.includes('openai'),
|
||||
);
|
||||
expect(openaiModel).toBeDefined();
|
||||
|
||||
const setModelResult = (await sendRequest('session/set_config_option', {
|
||||
sessionId: newSession.sessionId,
|
||||
configId: 'model',
|
||||
value: modelId,
|
||||
value: openaiModel!.modelId,
|
||||
})) as {
|
||||
configOptions: Array<{
|
||||
id: string;
|
||||
|
|
@ -535,7 +535,7 @@ function setupAcpTest(
|
|||
(opt) => opt.id === 'model',
|
||||
);
|
||||
expect(updatedModelOption).toBeDefined();
|
||||
expect(updatedModelOption!.currentValue).toBe(modelId);
|
||||
expect(updatedModelOption!.currentValue).toBe(openaiModel!.modelId);
|
||||
} catch (e) {
|
||||
if (stderr.length) {
|
||||
console.error('Agent stderr:', stderr.join(''));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue