Skip to content

Commit daa3529

Browse files
authored
Change AI model in tests (#11035)
* Change AI model in tests * Update snapshots * Remove quotes
1 parent cf16deb commit daa3529

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

packages/vite-plugin-cloudflare/e2e/fixtures/remote-bindings/entry-worker/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default {
1111
},
1212
];
1313

14-
const content = await env.AI.run("@hf/thebloke/zephyr-7b-beta-awq", {
14+
const content = await env.AI.run("@cf/meta/llama-3.1-8b-instruct-fast", {
1515
messages,
1616
});
1717
if ("response" in content) {

packages/wrangler/e2e/get-platform-proxy.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe("getPlatformProxy()", () => {
3636
},
3737
];
3838
39-
const content = await env.AI.run("@hf/thebloke/zephyr-7b-beta-awq", {
39+
const content = await env.AI.run("@cf/meta/llama-3.1-8b-instruct-fast", {
4040
messages,
4141
});
4242

packages/wrangler/e2e/remote-binding/dev-remote-bindings.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ describe.skipIf(!CLOUDFLARE_ACCOUNT_ID)(
147147

148148
await expect(fetchText(url)).resolves.toMatchInlineSnapshot(`
149149
"LOCAL<WORKER>: Hello from a local worker!
150-
REMOTE<AI>: "This is a response from Workers AI."
150+
REMOTE<AI>: This is a response from Workers AI.
151151
"
152152
`);
153153
});
@@ -169,8 +169,8 @@ describe.skipIf(!CLOUDFLARE_ACCOUNT_ID)(
169169

170170
const { url } = await worker.waitForReady();
171171

172-
await expect(fetchText(url)).resolves.toMatchInlineSnapshot(
173-
`""This is a response from Workers AI.""`
172+
await expect(fetchText(url)).resolves.toContain(
173+
"This is a response from Workers AI."
174174
);
175175

176176
// This should only include logs from the user Wrangler session (i.e. a single list of attached bindings, and only one ready message)

packages/wrangler/e2e/remote-binding/workers/ai.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
},
1010
];
1111

12-
const content = await env.AI.run("@hf/thebloke/zephyr-7b-beta-awq", {
12+
const content = await env.AI.run("@cf/meta/llama-3.1-8b-instruct-fast", {
1313
messages,
1414
});
1515

packages/wrangler/e2e/remote-binding/workers/local-service-binding-and-remote-ai.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ export default {
1313
},
1414
];
1515

16-
const { response } = await env.AI.run("@hf/thebloke/zephyr-7b-beta-awq", {
17-
messages,
18-
});
16+
const { response } = await env.AI.run(
17+
"@cf/meta/llama-3.1-8b-instruct-fast",
18+
{
19+
messages,
20+
}
21+
);
1922

2023
return new Response(
2124
`LOCAL<WORKER>: ${localWorkerText}\nREMOTE<AI>: ${response}\n`

packages/wrangler/e2e/start-worker-auth-opts.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe("startWorker - auth options", { sequential: true }, () => {
3636
},
3737
];
3838
39-
const content = await env.AI.run("@hf/thebloke/zephyr-7b-beta-awq", {
39+
const content = await env.AI.run("@cf/meta/llama-3.1-8b-instruct-fast", {
4040
messages,
4141
});
4242

0 commit comments

Comments
 (0)