Switching models in GitHub Copilot CLI | demo
By GitHub
Key Concepts
- GitHub Copilot CLI: A command-line interface for interacting with large language models (LLMs) to assist with software development tasks.
- LLMs (Large Language Models): Powerful AI models like Claude Opus, GPT-4, and GPT-5.2 Codeex used for code generation, planning, and execution.
- Model Selection: The ability to choose between different LLMs based on cost, reasoning ability, and specific capabilities.
- Reasoning Effort: A parameter controlling how deeply an LLM analyzes a problem before generating a response (High, Medium, Low).
- Next.js: A React framework for building web applications.
- Tool Calls: The ability of an LLM to utilize external tools, such as web search, to gather information.
- Branching (Git): Creating a separate line of development in a version control system.
Planning a Next.js Upgrade with GitHub Copilot CLI
Scott Hanssome demonstrates using the GitHub Copilot CLI in PowerShell (also compatible with Linux/WSL) to plan and execute an upgrade of a Next.js application. He begins by initializing the CLI and selecting the GPT-5.2 Codeex model, setting the reasoning effort to “High”. The application in question is an administrative backend for a podcast, built with Next.js (believed to be version 15, but needing confirmation).
He uses the dictation app Handy (utilizing the Parakeet voice model) to input the prompt: “What’s the latest version of Next.js? Make a plan for upgrading this admin application.” The Copilot CLI then initiates a planning phase, leveraging the selected model to formulate an upgrade strategy.
A key feature highlighted is the ability to view the LLM’s reasoning process. By expanding the output, Hanssome reveals that Codeex is actively performing a web search to determine the latest stable Next.js version. The search confirms Next.js 16.1.2 was released in January 2026. The CLI then presents a detailed work plan for the upgrade.
Executing the Upgrade Plan with Model Switching
Following the plan generation, Hanssome switches the active model to Claude Opus. He instructs the CLI to create a new branch for the upgrade and execute the previously generated plan.
The CLI prompts for confirmation to create a new branch and to approve URLs it needs to access – specifically, the official Next.js upgrade guide. This demonstrates the CLI’s ability to automate not only planning but also the initial steps of implementation, including branch creation and accessing relevant documentation. The execution of the plan by Claude Opus is then initiated, and the process is left to run.
Technical Details & Resources
- Models Used: GPT-5.2 Codeex (for planning), Claude Opus (for execution). Other models available include Haiku (lower cost).
- Framework: Next.js (React framework).
- Podcast Backend: Built with Next.js, administrative interface. Podcast frontend is built with .NET.
- Dictation Tool: Handy (Parakeet voice model).
- GitHub Copilot CLI Access: Available via Brew (macOS), Windgit (Windows), and at copilot.github.com.
- Tooling: PowerShell (demonstrated), Git (for branching).
Key Takeaways
The demonstration showcases the power of the GitHub Copilot CLI as a tool for automating software development tasks. The ability to select different LLMs based on specific needs (planning vs. execution, cost vs. reasoning) and to view the reasoning process behind the AI’s suggestions are significant advantages. The CLI streamlines the upgrade process by automating plan creation, branch management, and documentation access, ultimately increasing developer productivity. The integration of tool calls, like web search, ensures the LLM operates with up-to-date information.
Chat with this Video
AI-PoweredHi! I can answer questions about this video "Switching models in GitHub Copilot CLI | demo". What would you like to know?