mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
feat(models): tech preview – openclaw models sync openrouter
Adds opt-in CLI command to fetch OpenRouter /models catalog and write matching model definitions into models.json. Shared parsing extracted into openrouter-catalog.ts to avoid duplication with model-scan. Draft POC – do not merge.
This commit is contained in:
@@ -22,6 +22,7 @@ openclaw models status
|
||||
openclaw models list
|
||||
openclaw models set <model-or-alias>
|
||||
openclaw models scan
|
||||
openclaw models sync openrouter
|
||||
```
|
||||
|
||||
`openclaw models status` shows the resolved default/fallbacks plus an auth overview.
|
||||
@@ -54,6 +55,18 @@ Options:
|
||||
- `--probe-max-tokens <n>`
|
||||
- `--agent <id>` (configured agent id; overrides `OPENCLAW_AGENT_DIR`/`PI_CODING_AGENT_DIR`)
|
||||
|
||||
### `models sync openrouter`
|
||||
|
||||
Fetches the OpenRouter `/models` catalog and writes it to the agent `models.json`
|
||||
file (under `OPENCLAW_AGENT_DIR`/`PI_CODING_AGENT_DIR`, or the default agent path).
|
||||
Restart the gateway after syncing so `/model` and the picker reload the catalog.
|
||||
|
||||
Options:
|
||||
|
||||
- `--free-only` (only include free models)
|
||||
- `--provider <name>` (filter by provider prefix)
|
||||
- `--json` (machine-readable output)
|
||||
|
||||
## Aliases + fallbacks
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user