Skip to content

feat(cli): add codemie models list command (EPMCDME-11631)#239

Merged
TarasSpashchenko merged 2 commits intomainfrom
feat/epmcdme-11631-models-list-command
Apr 7, 2026
Merged

feat(cli): add codemie models list command (EPMCDME-11631)#239
TarasSpashchenko merged 2 commits intomainfrom
feat/epmcdme-11631-models-list-command

Conversation

@TarasSpashchenko
Copy link
Copy Markdown
Collaborator

Summary

Adds a new codemie models list CLI command that displays all AI models available to the user based on their current provider/auth configuration. Resolves EPMCDME-11631.

Changes

  • New command codemie models list — loads the active profile via ConfigLoader, resolves the provider's ProviderModelFetcher through ProviderRegistry.getModelProxy(), and prints a formatted table of model ID, name, and description
  • Bedrock fixBedrockModelProxy.fetchModels() now honours runtime config fields (awsRegion, awsProfile, apiKey, awsSecretAccessKey) instead of the hardcoded singleton defaults, so users with non-default regions or profiles get correct results
  • LiteLLM fixLiteLLMModelProxy is now registered in litellm/index.ts; fetchModels() uses config.baseUrl and config.apiKey so the runtime profile values are respected
  • Error messages — distinct messages for "no provider configured" vs "provider does not support model listing"

Impact

Before: no way to discover available models without leaving the CLI.

After:

$ codemie models list

Provider: litellm

ID                                       NAME                               DESCRIPTION
claude-3-5-sonnet                        claude-3-5-sonnet                  ...
gpt-4o                                   gpt-4o                             ...

2 model(s) available.

Supported providers: Ollama, AWS Bedrock, LiteLLM, CodeMie SSO (ai-run-sso).

Checklist

  • Self-reviewed
  • Manual testing performed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)

TarasSpashchenko and others added 2 commits April 7, 2026 14:27
Introduce a new `codemie models list` sub-command that displays all AI
models available under the user's current provider/auth configuration.

- Add src/cli/commands/models.ts with createModelsCommand() factory;
  resolves active provider via ConfigLoader and fetches models through
  ProviderRegistry.getModelProxy(), prints a padded-column table
- Register the command in src/cli/index.ts
- Fix BedrockModelProxy.fetchModels() to honour runtime config fields
  (awsRegion, awsProfile, apiKey, awsSecretAccessKey) instead of the
  hardcoded singleton defaults
- Register LiteLLMModelProxy in litellm/index.ts so litellm profiles
  are served by the new command
- Make LiteLLMModelProxy.fetchModels() use config.baseUrl / config.apiKey
  so runtime profile values override the empty singleton defaults

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
@TarasSpashchenko TarasSpashchenko requested a review from 8nevil8 April 7, 2026 12:30
@TarasSpashchenko TarasSpashchenko merged commit 5a03ff6 into main Apr 7, 2026
5 checks passed
@TarasSpashchenko TarasSpashchenko deleted the feat/epmcdme-11631-models-list-command branch April 7, 2026 13:09
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