-
Notifications
You must be signed in to change notification settings - Fork 332
Open
Description
https://github.com/cloudflare/agents/blob/main/packages/codemode/src/ai.ts#L70
It appears CodeMode is pinned to gpt-4.1. I was surprised to find this wasn't configurable. It would be beneficial to allow the codemode function to take in a model, same as streamText for example.
import { codemode } from "agents/codemode/ai";
const {system, tools} = codemode({
model: openai("gpt-5"), //<---- new functionality
system: "You are a helpful assistant",
tools: {
// tool definitions
},
// ...config
})
const stream = streamText({
model: openai("gpt-5"),
system,
tools,
messages: [
{ role: "user", content: "Write a function that adds two numbers" }
]
})Metadata
Metadata
Assignees
Labels
No labels