Skip to content

Comments

feat: mattjoyce model list command#7341

Open
michaelneale wants to merge 5 commits intomainfrom
micn/mattjoyce-model-list-command
Open

feat: mattjoyce model list command#7341
michaelneale wants to merge 5 commits intomainfrom
micn/mattjoyce-model-list-command

Conversation

@michaelneale
Copy link
Collaborator

just shifting: #6838 from a PR to a branch

mattjoyce and others added 4 commits February 7, 2026 12:55
Add a new CLI command to list available models from providers.

Features:
- Lists models from configured provider by default
- `--all` flag to show models from all providers
- `--provider <name>` to filter by specific provider
- Positional filter argument for name substring matching
- `-v/--verbose` shows context size and marks default model with *
- `--format json` for machine-readable output with is_default field
- Helpful message when no provider is configured

Examples:
  goose model list
  goose model list --all
  goose model list claude --all
  goose model list --provider anthropic -v
  goose model list --format json
Signed-off-by: matt joyce <matt.joyce@gmail.com>
Signed-off-by: matt joyce <matt.joyce@gmail.com>
Signed-off-by: matt joyce <matt.joyce@gmail.com>
Copilot AI review requested due to automatic review settings February 19, 2026 03:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new goose model command to list and manage models from providers. It shifts work from PR #6838 into a branch. The command provides two main functions: listing available models from providers (with filtering and formatting options) and displaying information about the currently configured provider and model.

Changes:

  • Adds new model.rs command module with model listing and current model display functionality
  • Integrates the model command into the CLI structure with command routing
  • Registers the new module in the commands module list

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
crates/goose-cli/src/commands/model.rs New module implementing model listing and current model display with support for JSON/text output formats and various filtering options
crates/goose-cli/src/cli.rs Adds Model command variant with verbose flag and subcommand routing, plus command name mapping
crates/goose-cli/src/commands/mod.rs Registers the new model module

verbose: bool,

#[command(subcommand)]
command: Option<ModelCommand>,
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The ModelCommand enum is referenced but not defined. Based on the usage in handle_model_subcommand, this enum needs to be defined with at least a List variant that contains fields: filter, provider, all, verbose, and format. Add the enum definition following the pattern of other command enums like SessionCommand (around line 462).

Copilot uses AI. Check for mistakes.
@michaelneale
Copy link
Collaborator Author

@DOsinga you had approved the forked PR of this, can you approve this one to get it in?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants