Răsfoiți Sursa

fix(app): drop patchModel, let default model resolve for review seeds

The dynamic GPT model search was fragile across CI environments.
The e2eURL override routes any model to the mock server, so there's
no need to pick a specific model.
Kit Langton 2 săptămâni în urmă
părinte
comite
1401208cb5
1 a modificat fișierele cu 0 adăugiri și 15 ștergeri
  1. 0 15
      packages/app/e2e/session/session-review.spec.ts

+ 0 - 15
packages/app/e2e/session/session-review.spec.ts

@@ -40,26 +40,12 @@ function edit(file: string, prev: string, next: string) {
   )
   )
 }
 }
 
 
-async function patchModel(sdk: Parameters<typeof withSession>[0]) {
-  const all = await sdk.provider.list().then((res) => res.data?.all ?? [])
-  for (const provider of all) {
-    for (const model of Object.values(provider.models)) {
-      if (!model.id.includes("gpt-")) continue
-      if (model.id.includes("gpt-4")) continue
-      if (model.id.includes("oss")) continue
-      return { providerID: provider.id, modelID: model.id }
-    }
-  }
-  throw new Error("No apply_patch-capable GPT model found for review seed")
-}
-
 async function patchWithMock(
 async function patchWithMock(
   llm: Parameters<typeof test>[0]["llm"],
   llm: Parameters<typeof test>[0]["llm"],
   sdk: Parameters<typeof withSession>[0],
   sdk: Parameters<typeof withSession>[0],
   sessionID: string,
   sessionID: string,
   patchText: string,
   patchText: string,
 ) {
 ) {
-  const model = await patchModel(sdk)
   const callsBefore = await llm.calls()
   const callsBefore = await llm.calls()
   await llm.toolMatch(
   await llm.toolMatch(
     (hit) => bodyText(hit).includes("Your only valid response is one apply_patch tool call."),
     (hit) => bodyText(hit).includes("Your only valid response is one apply_patch tool call."),
@@ -69,7 +55,6 @@ async function patchWithMock(
   await sdk.session.prompt({
   await sdk.session.prompt({
     sessionID,
     sessionID,
     agent: "build",
     agent: "build",
-    model,
     system: [
     system: [
       "You are seeding deterministic e2e UI state.",
       "You are seeding deterministic e2e UI state.",
       "Your only valid response is one apply_patch tool call.",
       "Your only valid response is one apply_patch tool call.",