The VS Code integration uses the
copilot harness, so the command is valar copilot. valar vscode is an alias you can use interchangeably; attribution is recorded under the copilot harness either way.Prerequisites
- VS Code (the stable build) with GitHub Copilot Chat signed in, and a version new enough to offer the Custom Endpoint provider. Insiders and forks keep their own config and are not routed.
- A Valar coding key (
vlrcode_…) and thevalarCLI (install).
Enable routing
Run once per machine:What gets written
The CLI registers a provider group in Copilot Chat’s model config,chatLanguageModels.json, in the VS Code user directory (~/Library/Application Support/Code/User on macOS, ~/.config/Code/User on Linux), plus one file per additional VS Code profile under profiles/*/. The file is a JSON array of provider groups; the CLI adds a group named Valar:
- Registers a Valar group under the built-in
customendpointvendor, withapiType: "messages"so the group speaks the Anthropic Messages dialect. The group’smodelslist is the picker; you can switch to any Valar model there. - Writes the full per-model endpoint
https://api.valarhq.ai/v1/messageson each model, since this vendor has no separate base-URL field. - Carries the coding key in the
x-api-keyrequest header rather than the vendor’sapiKeyfield. That field is stored in the OS keychain and cannot be populated by an external writer, so the key rides as a request header instead; the gateway authenticates it like a bearer token. - Adds
X-Valar-Harness: copilot,X-Valar-Client-IdandX-Valar-Cli-Versionto each model’srequestHeadersfor attribution. - Sets
"chat.defaultModel": "valar-auto"in the profile’ssettings.json, so each new conversation starts on Valar Auto rather than on Copilot’s own Auto. Only that one setting is added or changed; your comments and the rest of the file are left exactly as they were. If you already chose a default model there (anything other thanauto), it is kept, andontells you that conversations started on it do not go through Valar.
~/.valar/copilot/backup.json, and the previous chat.defaultModel of each settings.json it changes to ~/.valar/copilot/default-model.json. A VS Code profile you create later is routed by the next on and un-routed by off on the Valar marker, without a snapshot of its own.
The client id defaults to your OS username, so the header reads
X-Valar-Client-Id: jdoe. Use --user-id RANDOM for an opaque vc_… id instead. See per-engineer attribution.Turn off routing
chat.defaultModel back to what it was (a value you changed while routed is kept). Reload the VS Code window if the Valar models are still listed in Copilot Chat.
Next steps
Model routing
How cohorts and the split decide which model serves each request.
Analytics
Per-engineer usage and savings, attributed by client id.