Models and routing
Configure a model source that supports the complete workflow before extending the route configuration. A standard Cloud workflow requires only sign-in and originrouter agent setup --cloud; later sections cover private providers, remote devices, and per-slot routes.
Routing selects the model source for each request. Commands continue to execute on the target CLI, while Cloud, remote-device, and local-provider paths have different data-handling scopes. Read Data and execution boundaries before configuring them.
Use App Provider Control when you need a direct view of devices, model switches, and effective state.
Recommended: OriginRouter Cloud
Sign in to the OriginRouter account
originrouter login
Account authorization is required before the CLI can read Cloud models and write account-level routes.
Initialize Cloud routes
originrouter agent setup --cloud
This writes account-available Cloud routes for Claude and Codex.
List available Cloud models
originrouter route cloud models
This lists the Cloud models available to the current account. Confirm the model ID here before selecting one.
Inspect the effective Claude route
originrouter route show claude
This shows the effective source and model for Claude's main and small slots.
Inspect the effective Codex route
originrouter route show codex
This shows the effective source and model for Codex's main slot.
Override Claude's Cloud model
originrouter route cloud set claude.main --model <model-id>
This assigns the specified Cloud model to Claude's main slot.
Override Codex's Cloud model
originrouter route cloud set codex.main --model <model-id>
This assigns the specified Cloud model to Codex's main slot.
Understand route slots
Claude has main and small slots, and both must use the same provider. Codex has only main. Use route show for the effective configuration and route list for all entries.
Optional: local provider
Before you start
The local path replaces Cloud routes. First complete the local runtime setup in CLI overview and install, including originrouter setup.
Configuration order
Explicitly clear the current Agent routes before creating a provider. Otherwise the new configuration can conflict with implicit Cloud routes.
Switch to native route configuration
originrouter agent setup --native
Prepares native configuration mode for local-provider routes. Continue by configuring the provider and model slot.
Prepare provider credentials
export ANTHROPIC_API_KEY='replace-with-your-key'
The example uses an environment variable for the secret. Production deployments should inject credentials through a secret manager or controlled runtime, rather than writing them to shell history or a repository.
Create a local provider
originrouter provider add team-anthropic \
--type proxy \
--engine litellm \
--litellm-provider anthropic \
--api-key os.environ/ANTHROPIC_API_KEY \
--model claude-sonnet-4-6
This creates a local provider named team-anthropic and references the runtime secret through os.environ/ANTHROPIC_API_KEY. Use provider show afterward to inspect the redacted result.
Write the provider into the Claude route
originrouter route set claude \
--provider team-anthropic \
--main-model claude-sonnet-4-6 \
--small-model claude-sonnet-4-6
This sets Claude's main and small slots together. The example uses one model, so both slots remain on the same model.
Start the local proxy
originrouter proxy start --port 4000
The local proxy must be running before the CLI can send requests through the configured provider.
Inspect the effective Claude route
originrouter route show claude
Confirm that both main and small point to the intended provider and model.
To configure a distinct small model, first add and enable a second model in App Provider Control or the Local API. Enable remote use only when required, then run route set claude ... --small-model <enabled-model>.
The CLI currently has no standalone provider model add command.
os.environ/NAME stores an environment-variable name, not the secret. The same user environment that starts the proxy or service must be able to read it.
Optional: remote device
Prerequisites
The target device must be online, running Remote Share, and sharing at least one enabled model that allows remote use.
Configuration order
Complete service, device trust, and model authorization as described in Remote access, then query eligible devices:
Sign in and list remote devices
originrouter login
originrouter route remote devices
login establishes the account session. route remote devices lists remote devices and models eligible for routing. Record the target device and model IDs before setting a route.
Write a remote model into the Codex route
originrouter route remote set codex.main --device <device-id> --model <model-id>
This writes the selected remote-device model into Codex's main slot. The target device must remain online and authorize the model through Remote Share.
Inspect and recover
List local providers
originrouter provider list
Confirm the names of local providers configured on the current device.
Check a provider
originrouter doctor provider <provider-name>
Check the selected provider's fields and inference capability.
List all routes
originrouter route list
View all saved route entries.
Inspect the effective Claude route
originrouter route show claude
Inspect Claude's final slot sources and models.
Inspect the effective Codex route
originrouter route show codex
Inspect Codex's final slot source and model.
Restart the proxy
originrouter proxy restart
If a provider or route change is not effective, restart the local proxy and repeat the model request.
provider list/show primarily confirms the provider and redacted fields. It does not fully expose each model's enabled or remoteEnabled state. Check model switches in App Provider Control or the Local API.
If you see route model ... is not enabled, enable that model first.
If Claude's two slots use different providers, rewrite both slots with the grouped command above.