Conversation
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>
There was a problem hiding this comment.
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.rscommand 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>, |
There was a problem hiding this comment.
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).
|
@DOsinga you had approved the forked PR of this, can you approve this one to get it in? |
just shifting: #6838 from a PR to a branch