Skip to content

feat: add waza models command to list available models#208

Merged
spboyer merged 4 commits into
mainfrom
squad/141-models-command
Apr 21, 2026
Merged

feat: add waza models command to list available models#208
spboyer merged 4 commits into
mainfrom
squad/141-models-command

Conversation

@spboyer
Copy link
Copy Markdown
Member

@spboyer spboyer commented Apr 21, 2026

Closes #141

What

Adds a new waza models command that queries the Copilot SDK for available models and displays them as a formatted table.

Table output

MODEL ID          NAME              VISION    CONTEXT WINDOW
──────────────────────────────────────────────────────────────
claude-sonnet-4   Claude Sonnet 4   no        200k
gpt-4o            GPT-4o            yes       128k

2 models available

JSON output (--json flag)

For scripting and piping.

Changes

  • internal/execution/copilot_client_wrappers.go — Added ListModels to CopilotClient interface + wrapper implementation
  • cmd/waza/cmd_models.go — New command with table/JSON output, auth error handling
  • cmd/waza/cmd_models_test.go — 7 tests: table, JSON, empty, auth error, not authenticated, backend error, token formatting
  • cmd/waza/root.go — Register models subcommand
  • Mocks regenerated for both internal/execution and cmd/waza
  • site/src/content/docs/reference/cli.mdx — CLI reference updated

Auth handling

If not authenticated, the command returns:

Error: not authenticated — run "copilot login" first

Testing

  • go test ./... — all pass
  • go vet ./... — clean
  • cd site && npm run build — clean

Working as Linus (Backend Developer)

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

- Create focused 5-minute Quick Start page at site/src/content/docs/quick-start.mdx
- Add installation options (binary, from source, azd extension)
- Include authentication, first skill creation, minimal eval YAML
- Add Mermaid workflow diagram
- Include workflow steps: install → auth → create → write → run → view
- Place Quick Start as first item in sidebar navigation
- Update homepage to prominently link Quick Start guide
- Site builds successfully with 17 pages

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a new `waza models` command that queries the Copilot SDK for
available models and displays them as a formatted table (or JSON with
--json flag). The table shows model ID, name, vision support, and
context window size.

Changes:
- Add ListModels to CopilotClient interface and copilotClientWrapper
- Add ListModels method on CopilotEngine
- Regenerate gomock mocks for both internal and cmd packages
- Register `models` subcommand in root.go
- Handle auth errors gracefully ("run copilot login first")
- Add 7 tests covering table output, JSON, empty list, auth errors,
  backend errors, and token formatting
- Update CLI reference docs (site/src/content/docs/reference/cli.mdx)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot enabled auto-merge (squash) April 21, 2026 19:28
@spboyer spboyer force-pushed the squad/141-models-command branch from f597ac5 to 9e6f107 Compare April 21, 2026 19:28
spboyer and others added 2 commits April 21, 2026 15:33
Run gofmt to fix formatting issues flagged by CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add //nolint:errcheck for fmt.Fprintln/Fprintf calls matching
existing patterns in cmd_check.go. Run gofmt on both files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@spboyer spboyer merged commit 47166fa into main Apr 21, 2026
5 of 6 checks passed
@spboyer spboyer deleted the squad/141-models-command branch April 21, 2026 21:03
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.

There's no way, within waza, way to get the list of models to enter

2 participants