Skip to content

Support workers types Ai type #11

@zhawtof

Description

@zhawtof

Putting env.AI as a parameter no longer works with Cloudflare Workers V4 Typescript. Now that we're generating types, this no longer is accepting the proper types for AI

await runWithTools(env.AI, '@cf/meta/llama-3.3-70b-instruct-fp8-fast', ...

Argument of type 'Ai<AiModels>' is not assignable to parameter of type 'import(".../node_modules/.pnpm/@cloudflare+workers-types@4.20250327.0/node_modules/@cloudflare/workers-types/index").Ai<import(".../node_modules/.pnpm/@cloudflare+workers-types@4.20250327.0/node_modules/@cloudflare/workers-types/index").AiModels>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions