docs: use Luna xhigh in V4 examples - #284
MagMueller wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
8c1558b to
92f6fd0
Compare
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/cloud/guides/2fa.mdx">
<violation number="1" location="docs/cloud/guides/2fa.mdx:66">
P3: After the human presses Enter, this promise resolves but nothing pauses or closes `process.stdin`. Attaching the `data` listener put it into flowing mode, so a TTY stdin never ends and a copy-pasted script that finishes after `nextRun = await client.runs.create(...)` lingers at a blank prompt instead of exiting. This also diverges from the shipped pattern in human-in-the-loop.mdx, which uses `readline/promises` with `rl.question(...)` then `rl.close()` to relinquish stdin. Mirror that pattern here.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| const ready = await client.runs.waitForEvent(first.id, "browser.ready"); | ||
| await client.runs.waitForCompletion(first.id); | ||
| console.log(ready.data.live_view_url); | ||
| await new Promise((resolve) => { |
There was a problem hiding this comment.
P3: After the human presses Enter, this promise resolves but nothing pauses or closes process.stdin. Attaching the data listener put it into flowing mode, so a TTY stdin never ends and a copy-pasted script that finishes after nextRun = await client.runs.create(...) lingers at a blank prompt instead of exiting. This also diverges from the shipped pattern in human-in-the-loop.mdx, which uses readline/promises with rl.question(...) then rl.close() to relinquish stdin. Mirror that pattern here.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/cloud/guides/2fa.mdx, line 66:
<comment>After the human presses Enter, this promise resolves but nothing pauses or closes `process.stdin`. Attaching the `data` listener put it into flowing mode, so a TTY stdin never ends and a copy-pasted script that finishes after `nextRun = await client.runs.create(...)` lingers at a blank prompt instead of exiting. This also diverges from the shipped pattern in human-in-the-loop.mdx, which uses `readline/promises` with `rl.question(...)` then `rl.close()` to relinquish stdin. Mirror that pattern here.</comment>
<file context>
@@ -57,7 +60,12 @@ const first = await client.runs.create({
+const ready = await client.runs.waitForEvent(first.id, "browser.ready");
await client.runs.waitForCompletion(first.id);
+console.log(ready.data.live_view_url);
+await new Promise((resolve) => {
+ process.stdin.once("data", resolve);
+});
</file context>
Replace Grok 4.5 in the current V4 code examples with GPT-5.6 Luna and explicit xhigh reasoning. Keep Grok in the supported-model catalog and comparison copy.
Also finish the existing human-handoff example correction: use the SDK's paginated browser.ready helper and wait for explicit human confirmation before continuing the same session. The observability example was already fixed on main, so this PR does not duplicate it.
Verification used the real Python V4 request builder with a synthetic body, checked the exact handoff snippets against the shipped helper names, and ran the docs link checker. No hosted run or provider call was made.
Summary by cubic
Updates the V4 code examples to use
gpt-5.6-lunawith explicit xhigh reasoning instead ofgrok-4.5; Grok stays in the supported-model catalog and comparison copy. Also finishes the human-handoff example correction: it now uses the SDK'swait_for_event/waitForEventhelper and waits for explicit human confirmation before continuing the session.Written for commit 92f6fd0. Summary will update on new commits.