Expand description
Provider inventory: which provider CLIs this node can run and which models each one exposes, read from the CLI itself (or its own config). Nothing is invented: a provider whose CLI does not list models reports only what its help text / config names.
- codex:
codex debug models(JSON catalog; entries withvisibility = "list"). - grok:
grok models(text list;*marks the default). - claude: the model aliases its
--helpnames for--model, plusmodelfrom~/.claude/settings.json. - kimi:
[models.<alias>]anddefault_modelfrom~/.kimi/config.tomlor~/.kimi-code/config.toml.
Structs§
Constants§
Functions§
- account_
kind - The account kind
provider’s CLI is signed in with (codex, claude), from its own status command;Nonewhen the CLI is missing or does not say. - aliases
- Binary names a provider may be installed under, in preference order. The canonical id
(what g4a launches) comes first. Override per provider with
HATCHERY_PROVIDER_BIN_<ID>(absolute path or a name on PATH). - detect
- Detect one provider;
Nonewhen its CLI is not on PATH and not in a standard install directory. - detect_
all - All providers whose CLI this node can run.
- install_
shims - Make every resolvable provider launchable under its canonical name: a node-private shim
dir with
<id> -> <resolved binary>symlinks, prepended to PATH (children inherit it). - parse_
claude_ auth claude auth status --json:authMethodandsubscriptionTypeonly (email, org and the rest are never read out). A third-party API provider (bedrock, vertex) is its own kind.- parse_
claude_ help - Quoted aliases in the
--modelparagraph ofclaude --help. - parse_
codex - parse_
codex_ login codex login status: “Logged in using ChatGPT”, “Logged in using an API key - …”, “Not logged in”. Only the kind is taken; the rest of the line is never kept.- parse_
grok - parse_
kimi_ config - resolve_
binary - Resolve the binary for
provider: optionalHATCHERY_PROVIDER_BIN_<ID>, then each alias on PATH and in the standard install directories.