CommandsConsole
city console model
Dedicated management for console-global language models (provider/model)
city console model
Dedicated model management command group for language models only.
Design Rules
createis the only interactive command.- All others (
list/pause/update/test) are non-interactive for automation. - Provider
apiKeyis stored in~/.ship/ship.dband encrypted on write.
Usage
# Interactive create (choose provider or model)
city console model create
# List
city console model list
# Read details
city console model get provider <providerId>
city console model get model <modelId>
# Pause model (enabled defaults to true)
city console model pause <modelId>
city console model pause <modelId> --enabled false
# Discover provider models (optionally auto-add)
city console model discover <providerId>
city console model discover <providerId> --auto-add true --prefix openai_
# Update provider
city console model update provider <providerId> --api-key '${OPENAI_API_KEY}'
# Update model
city console model update model <modelId> --name gpt-4o-mini --provider openai_main
# Remove provider/model
city console model remove provider <providerId>
city console model remove model <modelId>
# Bind model to project (set ship.json.model.primary)
city console model use <modelId> --path /path/to/agent
# Test provider
city console model test provider <providerId>
# Test model (real call)
city console model test model <modelId>create Behavior
- Supports creating either
providerormodel. - After provider creation, you can immediately run connectivity test.
- For providers with model discovery support, remote model list can be fetched and auto-added in batch.
Automation Commands
get: read a single provider/model detail.discover: fetch provider model list and optionally--auto-addto local pool.remove: remove provider/model (provider removal fails if referenced).use: bind projectship.json.model.primaryto a model ID.
pause Behavior
pausemarks a model as paused.- Paused models cannot be loaded as runtime
model.primary. - Useful for incident isolation, cost control, or maintenance windows.
test Behavior
test provider: checks provider connectivity and tries model discovery.test model: performs a real model invocation using current config.
Related Commands
Example Output (Based on Current Implementation)
The examples below are aligned with current command implementations in package/src (including default output mode and field structure). Placeholder values are used for environment-specific fields.
$ city console model list
{
"success": true,
"providers": [
{
"id": "<providerId>",
"type": "openai",
"apiKey": "***masked***",
"apiKeyMasked": "sk-xx***xxxx"
}
],
"models": [
{
"id": "<modelId>",
"providerId": "<providerId>",
"name": "<upstreamModelName>",
"isPaused": false
}
],
"providerIds": ["<providerId>"],
"modelIds": ["<modelId>"]
}$ city console model pause <modelId>
{
"success": true,
"modelId": "<modelId>",
"isPaused": true
}