Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/cute-cases-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@cloudflare/codemode": patch
"@cloudflare/ai-chat": patch
"agents": patch
---

update dependencies
1 change: 0 additions & 1 deletion examples/ai-chat/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export class ChatAgent extends AIChatAgent {
const workersai = createWorkersAI({ binding: this.env.AI });

const result = streamText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system:
"You are a helpful assistant. You can check the weather, get the user's timezone, " +
Expand Down
1 change: 0 additions & 1 deletion examples/codemode/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export class Codemode extends AIChatAgent<Env> {
});

const result = streamText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system:
"You are a helpful project management assistant. " +
Expand Down
1 change: 0 additions & 1 deletion examples/playground/src/demos/ai/chat-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export class ChatAgent extends AIChatAgent<Env> {
const workersai = createWorkersAI({ binding: this.env.AI });

const result = streamText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system:
"You are a helpful assistant running on Cloudflare Workers. " +
Expand Down
1 change: 0 additions & 1 deletion examples/playground/src/demos/ai/codemode-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export class CodemodeAgent extends AIChatAgent<Env> {
const codemode = createCodeTool({ tools: pmTools, executor });

const result = streamText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system:
"You are a helpful assistant with access to a codemode tool. " +
Expand Down
1 change: 0 additions & 1 deletion examples/playground/src/demos/ai/tools-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export class ToolsAgent extends AIChatAgent<Env> {
const workersai = createWorkersAI({ binding: this.env.AI });

const result = streamText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system:
"You are a helpful assistant that demonstrates three kinds of tool execution:\n" +
Expand Down
1 change: 0 additions & 1 deletion examples/resumable-stream-chat/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export class ResumableStreamingChat extends AIChatAgent {
const stream = createUIMessageStream({
execute: async ({ writer }) => {
const result = streamText({
// @ts-expect-error — model not yet in workers-ai-provider types
model: workersai(modelId),
messages: await convertToModelMessages(this.messages)
});
Expand Down
1 change: 0 additions & 1 deletion experimental/forever-chat/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export class ForeverChatAgent extends DurableChatAgent<Env> {
const workersai = createWorkersAI({ binding: this.env.AI });

const result = streamText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system:
"You are a helpful assistant running as a durable agent. " +
Expand Down
2 changes: 0 additions & 2 deletions experimental/gadgets-chat/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export class ChatRoom extends DurableObject<Env> {
// Call the LLM inside the facet's context
const workersai = createWorkersAI({ binding: this.env.AI });
const result = await generateText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system:
"You are a helpful assistant. Each chat room has its own independent " +
Expand Down Expand Up @@ -317,7 +316,6 @@ export class OverseerAgent extends Agent<Env, RoomsState> {
// 3. Stream the LLM response, pushing partial updates to the UI
const workersai = createWorkersAI({ binding: this.env.AI });
const result = streamText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system:
"You are a helpful assistant. Each chat room has its own independent " +
Expand Down
1 change: 0 additions & 1 deletion experimental/gadgets-gatekeeper/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ export class GatekeeperAgent extends AIChatAgent<Env, GatekeeperState> {
const agent = this;

const result = streamText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system: `You are a helpful database administrator assistant. You manage a customer database.

Expand Down
1 change: 0 additions & 1 deletion experimental/gadgets-sandbox/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ export class SandboxAgent extends AIChatAgent<Env, SandboxState> {
const agent = this;

const result = streamText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system: `You are a helpful assistant that can write and execute JavaScript code to work with a customer database.

Expand Down
3 changes: 0 additions & 3 deletions experimental/gadgets-subagents/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ export class PerspectiveAgent extends DurableObject<Env> {
const workersai = createWorkersAI({ binding: this.env.AI });

const result = await generateText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system: perspective.system,
prompt: question
Expand Down Expand Up @@ -310,7 +309,6 @@ export class CoordinatorAgent extends AIChatAgent<Env, SubagentState> {
// Synthesize: ask the LLM to combine the three perspectives
const workersai = createWorkersAI({ binding: this.env.AI });
const synthesisResult = await generateText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system:
"You are a senior advisor synthesizing multiple perspectives into a " +
Expand Down Expand Up @@ -344,7 +342,6 @@ export class CoordinatorAgent extends AIChatAgent<Env, SubagentState> {
const agent = this;

const result = streamText({
// @ts-expect-error -- model not yet in workers-ai-provider type list
model: workersai("@cf/zai-org/glm-4.7-flash"),
system: `You are a coordinator that manages three specialist sub-agents to analyze questions from multiple perspectives.

Expand Down
1 change: 0 additions & 1 deletion guides/human-in-the-loop/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export class HumanInTheLoop extends AIChatAgent {

const result = streamText({
messages: await convertToModelMessages(this.messages),
// @ts-expect-error — model not yet in workers-ai-provider types
model: workersai("@cf/zai-org/glm-4.7-flash"),
tools,
stopWhen: stepCountIs(5)
Expand Down
2 changes: 1 addition & 1 deletion openai-sdk/chess-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"types": "wrangler types --include-runtime false"
},
"dependencies": {
"@cloudflare/vite-plugin": "^1.25.1",
"@cloudflare/vite-plugin": "^1.25.2",
"@vitejs/plugin-react": "^5.1.4",
"chess.js": "^1.4.0",
"react": "^19.2.4",
Expand Down
Loading
Loading