Skip to content

[upgrade] Ask for the model and effort in next upgrade --ci - #102433

Open
devjiwonchoi wants to merge 1 commit into
jiwon/next-upgrade-ci-corefrom
jiwon/next-upgrade-ci-model
Open

devjiwonchoi wants to merge 1 commit into
jiwon/next-upgrade-ci-corefrom
jiwon/next-upgrade-ci-model

Conversation

@devjiwonchoi

Copy link
Copy Markdown
Member

Why?

Setup leaves the model and reasoning effort to the agent CLI's default, so a scheduled run cannot use the model the user picks with --agent.

How?

After the hosted agent, setup asks for the model and effort with the same lists as --agent, read from the agent CLI installed here with a fresh configuration, and Esc goes back one question. The workflow gets the chosen values, and keeps the CLI defaults when no agent CLI is installed.

@github-actions github-actions Bot added created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. tests type: next labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: a5fd580
View workflow run

@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Code review ?

Vercel Agent Verified Review approved this pull request.
a5fd580 • Ran Thu, 26 Nov 2026 20:05:40 GMT • 3m 3s • Read the full report ↗

Summary

next upgrade --ci now asks for a model and a reasoning effort after it asks for the hosted agent. The models are read from whichever agent CLI is installed locally, run with a fresh temporary home. The chosen values go into the workflow's model and effort inputs, and the CLI defaults stay empty. findHarnesses also stops searching relative PATH entries. The whole e2e suite test/e2e/agent-upgrade-ci passed on the head (47/47) against the built package. I didn't run a real Codex or Claude CLI here; the tests use stand-ins.

Questions for the author (2)

  • Discovery runs Codex/Claude with a fresh home and without OPENAI_API_KEY/ANTHROPIC_API_KEY. Does an unauthenticated Codex app-server model/list list the same models an API-key-authenticated run in the workflow accepts, or can it offer ChatGPT-only models that then fail in CI?
  • The discovery environment keeps only PATH, TMPDIR, NODE_ENV and SystemRoot, so proxy and CA settings (HTTPS_PROXY, NODE_EXTRA_CA_CERTS) and Windows variables such as APPDATA and PATHEXT are dropped. Is that deliberate, given that a CLI which fetches its catalog would then quietly fall back to the 'default model' message?
Checked (4)

     Check Location
Holds Only a non-default, pattern-matching model id, and only a lowercase effort with a chosen model, reach the workflow.
Read the guards, and the scalar single-quote escaping at line 286 that renders the values; the 'renders …' e2e cases passed for Codex, Claude, the default model and a bracketed id.
setup-ci.ts:951
Holds Esc goes back one question, Ctrl+C cancels, and an effort the newly picked model doesn't support resets to the model default.
Traced the stage loop against selectOption's undefined (Esc) / null (Ctrl+C) contract; the 'goes back one question with Escape' and interruption e2e tests passed.
setup-ci.ts:853
Holds The temporary discovery home is removed both when discovery is cancelled and on every exit from the question loop.
Read the rmSync calls on the cancel branch and in the finally block; the 'reads the … models a fresh install offers' tests assert the home is gone and passed.
setup-ci.ts:840
Holds findHarnesses ignores relative PATH entries, so next upgrade --agent no longer finds a CLI planted in the project through such an entry.
Read the isAbsolute filter that replaces filter(Boolean).
harness.ts:91
Review steps

     Step Time
Sandbox set up 20.6s
Agent review: 2 commands run 2m 41s
Repros run on the head and the base (0), findings graded (0) 1.6s

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vercel Agent Verified Review reviewed 6869955 and isn’t approving it: its findings need a look first. 1 open finding is listed in its review summary and inline. View the full report

@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch from 6869955 to 7c0acc2 Compare November 26, 2026 06:46

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vercel Agent Verified Review reviewed 7c0acc2 and isn’t approving it: its findings need a look first. 2 open findings are listed in its review summary and inline. View the full report

@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch from 7c0acc2 to 3abeee7 Compare November 26, 2026 07:02

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vercel Agent Verified Review approves 3abeee7: no issues found, and the change meets this repository’s review rules. View the full report

@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch from 3abeee7 to fd3d574 Compare November 26, 2026 07:15

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vercel Agent Verified Review approves fd3d574: no issues found, and the change meets this repository’s review rules. View the full report

@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch from fd3d574 to 1085e0e Compare November 26, 2026 08:10

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vercel Agent Verified Review approves 1085e0e: no issues found, and the change meets this repository’s review rules. View the full report

@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch from 1085e0e to 63bb8c2 Compare November 26, 2026 08:55
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch from 63bb8c2 to 2779504 Compare November 26, 2026 15:49
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch 2 times, most recently from 3222500 to 6b38851 Compare November 26, 2026 16:56
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch from 6b38851 to 1521045 Compare November 26, 2026 17:45
@devjiwonchoi
devjiwonchoi removed this pull request from stack #102434 November 26, 2026 17:48
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch from 1521045 to ccee9c9 Compare November 26, 2026 18:48
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch from ccee9c9 to 23a4276 Compare November 26, 2026 19:30
@devjiwonchoi devjiwonchoi changed the title Ask for the model and effort in next upgrade --ci [upgrade] Ask for the model and effort in next upgrade --ci Nov 26, 2026
After the hosted agent, setup asks for the model and reasoning effort with
the same lists as `--agent`, read from the agent CLI installed here with a
fresh configuration, and Esc goes back one question. The workflow gets the
chosen model and effort, and keeps the CLI defaults when no CLI is installed.
Agent CLIs are found only in absolute PATH directories.
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/next-upgrade-ci-model branch from 23a4276 to a5fd580 Compare November 26, 2026 20:02
@devjiwonchoi
devjiwonchoi removed this pull request from stack #102466 November 26, 2026 20:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. tests type: next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant