Repository navigation
docs(cli): fix droid exec tutorial output format, models, and reasoning default - #77
Closed
lukealvoeiro wants to merge 1 commit into
Closed
lukealvoeiro wants to merge 1 commit into
lukealvoeiro wants to merge 1 commit into
Conversation
…ng default Use the documented --output-format stream-json instead of the hidden deprecated debug alias, describe its JSON Lines events accurately, replace the invalid glm-4.7 and gpt-5-codex model ids, and state that -r defaults per model. Mirrored in the Japanese page. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Contributor
|
Droid finished @lukealvoeiro's task —— View job LGTM. No actionable issues found in the tutorial updates or security review. 0 inline comments posted |
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.
Gap
DOC-N52 (F, P2). The "Building Interactive Apps with Droid Exec" tutorial (EN + JP) has three wrong facts:
--output-format debugand says droid then emits SSE (event: tool_call/data: ...). In factdebugis a hidden, deprecated alias ofstream-json, and droid writes JSON Lines to stdout. The SSE events come from the example app's server, not from droid.glm-4.7andgpt-5-codex. Both are rejected by the CLI.lowis the default reasoning effort for-r. The real default depends on the model.Evidence
docs/guides/building/droid-exec-tutorial.mdx:72,79,102,194(debug and SSE),:81-82,108-109,314,379(glm-4.7,gpt-5-codex),:114,315("low (default)"). The JP mirror has the same lines.apps/cli):src/entrypoints/exec/assertValidOptions.ts:24-34:'debug'is listed with the comment "deprecated alias for 'stream-json'". It is not in the--helpformat list (text|json|stream-json|stream-jsonrpc|acp).src/exec/types.ts:204-305: the JSONL event types aresystem/init,message,reasoning,tool_call,tool_result,errorandcompletion.src/entrypoints/exec/help.ts:114:-r, --reasoning-effort <level> Reasoning effort (defaults per model).droid exec -o debug 'hi'prints{"type":"system","subtype":"init",...,"reasoning_effort":"high"}then{"type":"error","source":"cli",...}: JSON Lines, not SSE, identical to-o stream-json.droid exec --model glm-4.7 xfails withInvalid model: glm-4.7and lists the available models.droid exec -o stream-json -m gpt-5-codex hifails withInvalid model: gpt-5-codex(exit 1)."reasoning_effort":"high"when-ris omitted for several models, notlow.Why it matters
Readers copying the snippets rely on a hidden, deprecated output format, expect droid to emit SSE and write the wrong parser, hit
Invalid modelimmediately, and are told the wrong reasoning default.Fix
--output-format stream-jsoneverywhere and describe it as JSON Lines.glm-4.7withglm-5.3andgpt-5-codexwithgpt-5.3-codex.low; state that supported levels vary by model and that omitting-ruses the model default.DROID_REASONINGin.envis now optional.Validation
grep -n 'debug\|glm-4\|gpt-5-codex'on both pages: no matches.json.loadson both pages.droid exec --output-format stream-json -m glm-5.3 hi,... -m gpt-5.3-codex hi,... -m claude-sonnet-4-5-20250929 hi,... -m glm-5.3 -r low hi.Factory-AI/examples/droid-chatrepo (which the snippets are "simplified from") still usesdebug/glm-4.7/gpt-5-codex; it likely needs a matching fix.Found by the scheduled CLI arguments audit.