mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:50:43 +00:00
test(qa-lab): seed broken-turn recovery scenarios (#66416)
This commit is contained in:
@@ -21,6 +21,16 @@ describe("resolveEffectiveExecutionContract", () => {
|
||||
).toBe("strict-agentic");
|
||||
});
|
||||
|
||||
it("auto-activates on the mock-openai qa lane", () => {
|
||||
expect(
|
||||
resolveEffectiveExecutionContract({
|
||||
config: emptyConfig,
|
||||
provider: "mock-openai",
|
||||
modelId: "mock-openai/gpt-5.4",
|
||||
}),
|
||||
).toBe("strict-agentic");
|
||||
});
|
||||
|
||||
it("auto-activates on gpt-5o and variants without a separator", () => {
|
||||
for (const modelId of ["gpt-5", "gpt-5o", "gpt-5o-mini"]) {
|
||||
expect(
|
||||
|
||||
@@ -39,14 +39,16 @@ const STRICT_AGENTIC_MODEL_ID_PATTERN = /^gpt-5(?:[.o-]|$)/i;
|
||||
* Supported provider + model combinations where strict-agentic is the intended
|
||||
* runtime contract. Kept as a narrow helper so both the execution-contract
|
||||
* resolver and the `update_plan` auto-enable gate converge on the same
|
||||
* definition of "GPT-5-family openai/openai-codex run".
|
||||
* definition of "GPT-5-family openai/openai-codex run". The embedded
|
||||
* `mock-openai` QA lane intentionally piggybacks on that contract so repo QA
|
||||
* can exercise the same incomplete-turn recovery rules end to end.
|
||||
*/
|
||||
export function isStrictAgenticSupportedProviderModel(params: {
|
||||
provider?: string | null;
|
||||
modelId?: string | null;
|
||||
}): boolean {
|
||||
const provider = normalizeLowercaseStringOrEmpty(params.provider ?? "");
|
||||
if (provider !== "openai" && provider !== "openai-codex") {
|
||||
if (provider !== "openai" && provider !== "openai-codex" && provider !== "mock-openai") {
|
||||
return false;
|
||||
}
|
||||
const modelId = typeof params.modelId === "string" ? params.modelId : "";
|
||||
|
||||
Reference in New Issue
Block a user