Adding two new notebooks to the forgebook for model migration code updates - #66
Merged
Merged
Conversation
new notebook
nicholasdbrady
added a commit
that referenced
this pull request
Jul 8, 2026
…tributors (#67) * Fix fork PR preview deploy via workflow_run split, gated to forgebook-contributors Fork-based PRs always get a read-only GITHUB_TOKEN on pull_request events, regardless of the author's actual repo/team write access, causing the gh-pages deploy step to 403 (seen on PR #63 and #66). - preview.yml: trimmed to unprivileged build/validate/test; uploads the built site and PR metadata as artifacts instead of deploying directly. - preview-deploy.yml (new): workflow_run consumer with write access; only ever touches the pre-built static artifact, never PR code. Gates the actual gh-pages deploy + preview comment on forgebook-contributors team membership, via a maintainer-owned PAT (FORGEBOOK_TEAM_READ_TOKEN secret) since the default GITHUB_TOKEN can't read team membership. - preview-cleanup.yml (new): moved the PR-close cleanup job here on pull_request_target, since it has the same fork-token problem but is safe to run privileged (no PR code execution, just deletes a directory on the maintainer-controlled gh-pages branch). - CONTRIBUTING.md: note that auto-deployed previews require team membership; others still get build/test signal plus a comment. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix CodeQL code-injection findings: pass step outputs via env, not inline template github-script steps interpolated step outputs directly into the JS source via ${{ }} template expressions, which CodeQL flags as a code-injection risk since the value flows from a workflow_run artifact. Switched all occurrences (pr_number and author) to pass through env: and read via process.env instead, which is the standard mitigation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
added 2 commits
July 13, 2026 15:33
- Fix token audience: use `cognitiveservices.azure.com/.default` for OpenAI and `ai.azure.com/.default` for Anthropic on Foundry - Add `minimal` as a valid `reasoning_effort` value for gpt-5.1 - Narrow the request translator to target gpt-5.1 explicitly instead of a broad reasoning-model prefix list - Add credential-free unit tests for request translation and Anthropic message conversion - Add helper functions for Anthropic message translation and tool-contract validation - Complete the Claude tool round-trip example cell - Harden eval harness: catch adapter exceptions and validate tool arguments against JSON Schema - Remove empty code cell from the gpt-5.5→Claude notebook
nicholasdbrady
enabled auto-merge (squash)
July 13, 2026 22:59
nicholasdbrady
disabled auto-merge
July 14, 2026 22:04
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.
Description
This PR adds two new model-migration recipes to the Forgebook cookbook and registers a new author (Meera Kurup).
migrate-gpt-4o-mini-to-gpt-5-1— the minimal, mechanical code diff to port a Chat Completions app fromgpt-4o-minito thegpt-5.1reasoning model: renamemax_completion_tokens, drop the sampling paramsgpt-5.1rejects, addreasoning_effort/verbosity, and account forreasoning_tokens. Includes a compatibility shim for incremental migration and a live demonstration of the400a naive port produces.migrate-gpt-5-5-to-claude-opus-4-8— a cross-provider migration behind one provider-neutral adapter, with tool-schema translation, post-hoc structured-output validation/retry, streaming normalization, eval-gate promotion checks, and a staged rollout plan.authors.yaml— addsmeerakurup(name + title) so both recipes are credited.Review focus
migrate-gpt-5-5-to-claude-opus-4-8: endpoint shape, SDK (AnthropicFoundry), Marketplace/CCU billing, and especially the Entra audiencehttps://ai.cognitiveservices.com/.defaultused for keyless Anthropic calls — please confirm this against the Foundry Claude docs, since a wrong audience 401s every call.Checklist
Notebook contributions
notebooks/directoryregistry.yamlwith all required fields (slug,path,title,authors)authors.yaml(with at leastnameandtitle)tags.yamlcd scripts && npx tsx validate-registry.tsnotebooks/media/<slug>/with descriptive alt textnotebooks/data/<slug>/when applicableSite changes
Only notebooks changed — no site code touched, so this section is N/A.
cd site && npm run buildcd site && npx astro check