Skip to content

fix: repair broken Workers AI exercise (1.8/3.8) and wrangler.toml refs#12

Open
SomeoneSomewhereelse wants to merge 1 commit into
masterfrom
fix/lesson-1.8-workers-ai-exercise
Open

fix: repair broken Workers AI exercise (1.8/3.8) and wrangler.toml refs#12
SomeoneSomewhereelse wants to merge 1 commit into
masterfrom
fix/lesson-1.8-workers-ai-exercise

Conversation

@SomeoneSomewhereelse

Copy link
Copy Markdown
Collaborator

Summary

  • Exercise 7 (AI on the Edge / Workers AI) in lessons 1.8 and 3.8 (archived)
    shipped a code sample that fails TypeScript strict-mode compilation
    (request.json() destructured without a type assertion) and references
    @cf/meta/llama-2-7b-chat-int8, a model Cloudflare deprecated 2026-05-30.
    Verified end-to-end against a live Worker: fixed sample now compiles and
    a deployed test correctly translates Hebrew input.
  • Both files instructed learners to configure the AI binding in
    wrangler.toml. Current wrangler init (confirmed via Cloudflare's docs
    and two freshly-scaffolded exercise projects) generates wrangler.jsonc
    by default; .toml is still supported but no longer the recommended
    format for new projects. Updated the binding snippet and all other
    wrangler.toml mentions (projects.md Cron Triggers example,
    cli-first.md) to wrangler.jsonc.
  • Added an instructor-only note (HTML comment, not read to the learner)
    above exercise 7 telling the tutor to verify the model ID against
    https://developers.cloudflare.com/workers-ai/models/ before teaching,
    since Cloudflare's model catalog changes over time and this exact
    snippet has already gone stale once.

🤖 Generated with Claude Code

https://claude.ai/code/session_017wcZjBvcxcoXvTHPCR16uE

Exercise 7 (AI on the Edge / Workers AI) in lessons 1.8 and 3.8 (archived)
shipped a code sample that fails TypeScript strict-mode compilation and
references a Workers AI model deprecated by Cloudflare; also updates
stale wrangler.toml references to wrangler.jsonc, the current default.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017wcZjBvcxcoXvTHPCR16uE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant