fix(runtime): reduce provider timeout warning noise
This commit is contained in:
parent
48782c76a5
commit
67a2c9ebac
2 changed files with 15 additions and 7 deletions
|
|
@ -1529,22 +1529,24 @@ export class ClaudeMultimodelBridgeService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.warn(
|
const summaryStatusError = error instanceof Error ? error.message : String(error);
|
||||||
`Provider-scoped summary runtime status unavailable for ${providerId}: ${
|
|
||||||
error instanceof Error ? error.message : String(error)
|
|
||||||
}`
|
|
||||||
);
|
|
||||||
if (
|
if (
|
||||||
this.isRuntimeStatusTimeoutError(error) &&
|
this.isRuntimeStatusTimeoutError(error) &&
|
||||||
this.shouldUseLegacyProviderTimeoutFallback(providerId)
|
this.shouldUseLegacyProviderTimeoutFallback(providerId)
|
||||||
) {
|
) {
|
||||||
|
logger.debug(
|
||||||
|
`Provider-scoped summary runtime status unavailable for ${providerId}: ${summaryStatusError}`
|
||||||
|
);
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`Provider-scoped summary runtime status timed out for ${providerId}, falling back to scoped legacy probes: ${
|
`Provider-scoped summary runtime status timed out for ${providerId}, falling back to scoped legacy probes: ${
|
||||||
error instanceof Error ? error.message : String(error)
|
summaryStatusError
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
return this.getProviderStatusFromLegacyProbesOrError(binaryPath, providerId, error);
|
return this.getProviderStatusFromLegacyProbesOrError(binaryPath, providerId, error);
|
||||||
}
|
}
|
||||||
|
logger.warn(
|
||||||
|
`Provider-scoped summary runtime status unavailable for ${providerId}: ${summaryStatusError}`
|
||||||
|
);
|
||||||
return createRuntimeStatusErrorProviderStatus(providerId, error);
|
return createRuntimeStatusErrorProviderStatus(providerId, error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -413,11 +413,17 @@ describe('ClaudeMultimodelBridgeService', () => {
|
||||||
'model list --json --provider codex',
|
'model list --json --provider codex',
|
||||||
]);
|
]);
|
||||||
expect(execCliMock.mock.calls[0][2]?.timeout).toBe(5000);
|
expect(execCliMock.mock.calls[0][2]?.timeout).toBe(5000);
|
||||||
expect(vi.mocked(console.warn).mock.calls.map((call) => call.join(' '))).toEqual(
|
const warnMessages = vi.mocked(console.warn).mock.calls.map((call) => call.join(' '));
|
||||||
|
expect(warnMessages).toEqual(
|
||||||
expect.arrayContaining([
|
expect.arrayContaining([
|
||||||
expect.stringContaining('Provider-scoped summary runtime status timed out for codex'),
|
expect.stringContaining('Provider-scoped summary runtime status timed out for codex'),
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
expect(warnMessages).not.toEqual(
|
||||||
|
expect.arrayContaining([
|
||||||
|
expect.stringContaining('Provider-scoped summary runtime status unavailable for codex:'),
|
||||||
|
])
|
||||||
|
);
|
||||||
vi.mocked(console.warn).mockClear();
|
vi.mocked(console.warn).mockClear();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue