Cookbook review pr

From sgl-project/sglang · View interactive version

Cookbook review pr is an AI agent skill from the GitHub repository sgl-project/sglang. Review a pull request against the SGLang Cookbook (docs/, Mintlify) contribution checklist — the config-driven format (per-model config + benchmarks JSX consumed by the shared _deployment.jsx / _playground.jsx engines). Run with /cookbook-review-pr <PR number>.

How to use this skill

Skill file

Cookbook Review PR

Fetch the diff, run the checklist, report what you find. The cookbook is config-driven:

shared engines (_deployment.jsx, _playground.jsx) with NO model-specific code; each

model is a data config (+ optional benchmarks) under src/snippets/configs/<vendor>/

plus an MDX page. This checklist targets that layout. Field-schema detail lives in

.claude/skills/cookbook-add-model/references/authoring-reference.md — defer to it rather

than restating.

Usage

/cookbook-review-pr <PR number>

Steps

  1. gh pr view <N> --repo sgl-project/sglang --json title,body,files,author,baseRefName,headRefName,commits,reviews
  2. gh pr diff <N> --repo sgl-project/sglang
  3. gh pr list --repo sgl-project/sglang --state open --search "<model name>" (duplicate check)
  4. Run every checklist item against the diff.
  5. Output per-file verdicts + overall recommendation.

Checklist

1. File hygiene

(config + benchmarks), docs/cookbook/**/*.mdx, docs/docs.json,

docs/cookbook/<category>/intro.mdx (vendor card), docs/cards/logos/<vendor>.png

(new vendor only). Flag stray files (settings.local.json, lockfiles, IDE configs).

for unrelated commits accidentally included.

model-add PR (adding a model is data-only). Engine edits = a separate axis/feature PR

(see cookbook-add-model/references/engine-axis.md); review them against that checklist.

2. Config quality (the per-model `config`)

fragment refs, or IIFE (Mintlify re-evals at hydration → ReferenceError).

model-specific GPU the shared catalog lacks must be declared in config.hardware

({id,label,vram,vendor}), not added to the engine catalog — unless the platform is

genuinely shared, which is an engine change the PR body has to argue (and the

cookbook-add-model hardware table moves with it). A new catalog entry is inert for

other pages: each filters the catalog by its own supportedHardware.

2 → low-latency + high-throughput; 3 → the full trio. Tiers apply per

(hw × variant × quant) combination: a single-recipe combination must park under its

semantically honest tier (clear slant → that tier, e.g. a workstation card under

low-latency; no slant → balanced, e.g. a CPU platform) — **flag a no-slant recipe

parked under low-latency/high-throughput**. Mixed unions

like [low-latency, balanced, high-throughput] with per-selection greying are fine. Also

flag model-specific ids (e.g. mtp), and flag an INVERTED speculative mapping — the

deterministic default is MTP/spec-decoding ON → low-latency, OFF → high-throughput

(at saturation the draft+verify overhead outweighs the speedup); the reverse needs an

explicit maintainer-confirmed justification in the PR. The MDX strategy bullets describe serving semantics

in the DSv4 style (single-user chat / typical multi-user / batch jobs), not internal

toggles.

hw|quant key (resolved before the plain hw) is valid when one quant on a shared GPU needs

a different image (e.g. an FP4 dev build) — don't flag those.

NVL72) — NOT every multi-N hw (standard-IB DeepEP / Marlin multi-node don't need it).

Hints render above BOTH run modes, so flag one that reads as docker-only ("add these

docker run flags") — docker run flags belong in the hardware entry's

multiNodeDockerFlags, which the engine emits into the Docker command itself.

template's model field is a free-form input prefilled from this value; if the config

omits the github block, the engine falls back to deepseek-ai/deepseek-v4 and the

page's submissions get mislabeled.

(attention TP/CP/DP-Attn, moe backend+EP for MoE models, parsers, speculative,

pdDisagg, hicache) — flag a missing general axis unless the model genuinely cannot

use it. Model-specific axes only where applicable (MegaMoE backend + megamoeQuant

only on Blackwell MoE, gated by requiresHw; hisparse only DSA-style). Knobs that are

meaningless for a subset of variants/hw are disabled with a reason, not silently live

(e.g. MoE knobs greyed on dense variants). No empty/stub axes.

placeholder is filled (grep -rn '__[A-Z_]*__' on the new config/benchmarks/MDX returns

nothing).

greyed "coming soon"; AMD was pruned or kept on purpose (not a leftover template family).

3. Cells / 5-dim matrix

commonFlags reference (Mintlify won't inline it).

(the renderer injects them from match.nodes).

Playground-only feature added on top of the base command (DSv4 convention);

flag any cell that bakes them in.

(e.g. MegaMoE W4A4 — DSv4 gates it behind the Playground's megamoeQuant)

and lossy --kv-cache-dtype (e.g. fp8_e4m3 over a higher-precision-KV

checkpoint): flag for explicit maintainer confirmation. Output quality

should be exactly what the quant chip declares, so absent a recorded

sign-off in the PR (e.g. carried verbatim from a measured legacy recipe's

default command), request the flag move to Playground/tips.

the DSv4 cells do), then parallelism, then MoE, then tuning, --host/--port

last (the playground's insert anchors assume this).

(BF16 ≈ params×2 GB, FP8 ≈ ×1, FP4 ≈ ×0.5; MoE uses total weight, not active params).

4. Benchmarks

ships NO default eval set; without it the accuracy rows silently don't render.

defaultAccuracy / per-cell accuracy / benchmarkCommands.accuracy keys all

∈ config.accuracyLabels.

that only released FP8/FP4 is a factual bug.

from the sglang serve deploy command, and should carry --flush-cache: bench_serving's

random prompts are deterministic, so a warm rerun hits the radix cache and inflates

throughput — speed numbers are measured cache-cold.

guessed/placeholder value (no leftover 0.0.0).

percentile the TTFT/TPOT values actually are — the card renders TTFT (<pct>). A benchmarks

entry may carry its own latencyPercentile to override the page value per cell

(entry → config → "P50"): on a P50 page, kept legacy Mean cells must set it — a

sglang_version tag alone doesn't convey the percentile. ("Mean" is temporary — legacy

data is being re-measured to P50.)

= output tok/s/GPU × (isl+osl)/osl, shown by the card as-is. Flag output-only values.

column must be produced by the SAME harness — flag a page that, say, measures one

platform's GSM8K with a historical raw completion harness and another's with

sgl-eval run gsm8k --num-examples 1319 and shows both as one "GSM8K %"

(the scores aren't comparable). Either standardize on one harness (matching

benchmarkCommands.accuracy) or require an explicit per-entry note. Common when folding

a second contributor's measurements (e.g. an AMD/ROCm PR) into the page.

5. Doc ↔ config parity (the #1 finding)

equal what the engine emits from the corresponding cell — same flags, same order. Drift

here is the most common review miss.

5b. ComfyUI section (diffusion pages)

reader must not have to guess whether the model is reachable from ComfyUI.

A model-specific key is only correct when the plugin really treats it specially — an entry

in executor_class_dict

(python/sglang/multimodal_gen/apps/ComfyUI_SGLDiffusion/core/generator.py) or a dedicated

node. Otherwise the generic image / video key is the honest one; a model-specific key

without matching plugin support makes the page claim support that does not exist.

facts drift from the plugin.

6. Commands / port

python3 -m sglang.launch_server (deprecated). The engine already emits sglang serve;

guard against prose/cells reintroducing the old launcher.

Launch port must match client/curl port on the same page.

7. Frontmatter

prop, not copied from another vendor) — NOT metatags.description (non-canonical; the

top-level field is what renders as the subtitle and SEO meta — see mintlify-authoring).

other model page has. Leave mode unset (the Deploy/Playground panels self-cap at 900px, so

the default column holds them fine). mode: wide belongs only on category intro.mdx grids.

pages should be dropped in the same PR (grep -RlE "^tag: NEW" docs/cookbook/).

"↑ Switch base" and "Open the Playground →" scroll. No numbered headings for these two.

8. Navigation & homepage

navigation → Cookbook → Autoregressive Models, root-relative, no .mdx:

cookbook/<category>/<Vendor>/<Model>.

flagship; new vendors get a new <Card> + a logo at docs/cards/logos/<vendor>.png —

940×525 RGBA transparent, icon-only (no wordmark), lowercase filename, tracked via

git add -f (*.png is gitignored repo-wide). Card order matches the docs.json nav order.

9. Links & factual

(don't copy from another model). Docker images from lmsysorg/sglang; no sgl-project-dev.

The image tag is a real build (a release the author ran, or :dev/nightly) — not a

guessed version.

or ../-relative links. docs.sglang.io is canonical.

not ${VAR} (a bash no-op).

--reasoning-parser X / --tool-call-parser Y named in prose or in

playgroundFeatures.parsers flags is a registered key in

python/sglang/srt/parser/reasoning_parser.py (DetectorMap) /

python/sglang/srt/function_call/function_call_parser.py (ToolCallParserEnum) —

prose naming a near-miss id (e.g. the reasoning id where the tool id differs) is a

factual bug. --…-parser auto is acceptable ONLY if the template-detection rules

(python/sglang/srt/parser/template_detection.py) actually resolve THIS model's

chat template to the right parser — no rule match means auto silently disables the

parser; when in doubt require explicit ids (the DSv4 page pins explicit ids).

9b. MDX authoring (Mintlify) — detail in `cookbook-add-model/references/mintlify-authoring.md`

blocks (> [!NOTE]), markdown pipe tables (use JSX <table>), inline <details>,

or unknown components. <CardGroup>/<Card> only on category intro.mdx, not model pages.

the opening fence); a fenced block nested inside another uses four backticks outside.

example wrapped in an <Accordion>, its real output in a following

<Accordion title="Example Output"> (Pending update... only with user

acknowledgement). Flag bare/inline example blocks and **Output Example:** headings.

(reasoning_content + content) vs inline <think> tags parsed out of content.

generation_config.json defaults); listing them in §1 informationally is fine.

10. Quantization rules

is legitimate ONLY when the vendor published an MXFP4 checkpoint for it (e.g.

amd/Qwen3.5-397B-A17B-MXFP4 on MI355X) — verify the HF repo resolves; otherwise the

AMD FP4 chip must be absent/disabled.

accuracy-degrading flag — see §3 (needs explicit maintainer sign-off; default

home is Playground/tips).

11. Scope

(e.g. an "H200 FP8" PR that adds a flag to ALL cells). Unmentioned side-fixes belong in

the PR body.

12. Duplicate PRs

risk on docs.json + the vendor card; flag a superseded older PR by the same author.

13. Build / validate

cd docs
mint validate
mint broken-links

Optional: mint dev for a visual smoke test.

14. Reviewer feedback

addressed? Unresolved requested-changes should be flagged.

15. Grammar & spelling

Flag each with the exact wrong text + correction.

Output

Per file:

Overall: APPROVE / REQUEST CHANGES / BLOCKED

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.