Skip to content

feat: add docker agent models command#2304

Merged
dgageot merged 2 commits intodocker:mainfrom
masegraye:task/cagent
Apr 1, 2026
Merged

feat: add docker agent models command#2304
dgageot merged 2 commits intodocker:mainfrom
masegraye:task/cagent

Conversation

@masegraye
Copy link
Copy Markdown
Contributor

Summary

  • Adds docker agent models [list|ls] command to discover models available for --model flag
  • Shows all catalog models for providers with configured credentials by default
  • --all includes providers without credentials, --provider/-p filters by provider, --format json for machine output
  • Bare docker agent models defaults to list (follows Docker CLI conventions)

Motivation

Currently the only way to discover valid --model values is to guess a provider/model combo, read the source, or use the TUI model picker at runtime. This command closes that gap so users can discover what's available before running docker agent new --model or docker agent run --model.

Test plan

  • 5 unit tests covering: default output, provider filter, JSON format, default marker, no-credentials fallback
  • All existing cmd/root tests pass
  • Manual: docker agent models, docker agent models -p openai, docker agent models --all, docker agent models --format json

🤖 Generated with Claude Code

masegraye and others added 2 commits April 1, 2026 07:17
Adds a CLI command to discover models available for --model flag,
so users don't have to guess valid provider/model combinations.

Shows all catalog models for providers with configured credentials
by default. --all includes providers without credentials. Supports
--provider filter and --format json output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove unused env parameter (unparam)
- Use strings.EqualFold for case-insensitive comparison (gocritic)
- Use strings.SplitSeq for range iteration (modernize)
- Fix import ordering: standard > third-party > project (gci)
- Remove trailing blank line

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@masegraye masegraye marked this pull request as ready for review April 1, 2026 14:42
@masegraye masegraye requested a review from a team as a code owner April 1, 2026 14:42
@dgageot dgageot merged commit d3a94ec into docker:main Apr 1, 2026
8 checks passed
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.

2 participants