Home Explore Blog CI



ragit

docs/commands/ls-models.txt
c38dde766b424b5850e462a47b2ebc40956665408c65e0490000000300000352
rag-ls-models(1)
==========

NAME
----
rag-ls-models - Show information about models

SYNOPSIS
--------
[verse]
'rag ls-models' [--name-only | --stat-only] [--json | -j] [--selected] [<model>]

DESCRIPTION
-----------
It lists the ai models defined in `.ragit/models.json`. If `--selected` is set,
it filters out models that are not selected. If it fails to find the selected
model (e.g. something's wrong with the config file), it will show you the
lowest cost model. This is the default behavior in selecting models. When you
run `rag build` or `rag query`, it will also fallback to the lowest cost model
if it cannot find a model.

If `--json` is set, it dumps a valid json to stdout. Its schema is,

- no flags: `[model: object]`
- `--name-only`: `[name: string]`
- `--stat-only`: `{ "models": integer }`

`--selected` doesn't change the schema.

Chunks
ed023ef1 (1st chunk of `docs/commands/ls-models.txt`)
Title: rag-ls-models Command
Summary
The rag-ls-models command displays information about AI models defined in the .ragit/models.json file, with options to filter, select, and output data in JSON format. It can list all models, filter out unselected models, or show only specific details such as model names or statistics, and it also provides a fallback to the lowest cost model if the selected model is not found.