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 choose a Valar model there yourself. - 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.
~/.valar/copilot/backup.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
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.