mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 09:10:42 +00:00
Move mock and live provider behavior behind provider-owned definitions so suite, manual, Matrix, and transport lanes share defaults, auth staging, model config, and standalone server startup. Add AIMock as a first-class local provider mode while keeping mock-openai as the scenario-aware deterministic lane.
22 lines
559 B
TypeScript
22 lines
559 B
TypeScript
import type { QaProviderMode } from "./model-selection.js";
|
|
import { getQaProvider } from "./providers/index.js";
|
|
|
|
type QaLiveTimeoutProfile = {
|
|
providerMode: QaProviderMode;
|
|
primaryModel: string;
|
|
alternateModel: string;
|
|
};
|
|
|
|
export function resolveQaLiveTurnTimeoutMs(
|
|
profile: QaLiveTimeoutProfile,
|
|
fallbackMs: number,
|
|
modelRef = profile.primaryModel,
|
|
) {
|
|
return getQaProvider(profile.providerMode).resolveTurnTimeoutMs({
|
|
primaryModel: profile.primaryModel,
|
|
alternateModel: profile.alternateModel,
|
|
modelRef,
|
|
fallbackMs,
|
|
});
|
|
}
|