fix: repair broken Workers AI exercise (1.8/3.8) and wrangler.toml refs#12
Open
SomeoneSomewhereelse wants to merge 1 commit into
Open
fix: repair broken Workers AI exercise (1.8/3.8) and wrangler.toml refs#12SomeoneSomewhereelse wants to merge 1 commit into
SomeoneSomewhereelse wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.
AIbinding inwrangler.toml. Currentwrangler init(confirmed via Cloudflare's docsand two freshly-scaffolded exercise projects) generates
wrangler.jsoncby default;
.tomlis still supported but no longer the recommendedformat for new projects. Updated the binding snippet and all other
wrangler.tomlmentions (projects.mdCron Triggers example,cli-first.md) towrangler.jsonc.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