Home Explore Blog CI



ragit

1st chunk of `docs/commands/ls-models.txt`
ed023ef1bcf1d593d943c17d2f169211be05a6d33d62ea690000000100000352
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.

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.