How to Send Identity and Intent Headers to the Gateway
Learn how to configure identity and intent headers for a shared gateway using eLLM Code. This guide explains how to adjust settings in VS Code, ensuring requests are routed correctly and usage is attributed accurately.
Estimated time: 2 minutes
Difficulty: Intermediate
Why you'd use this
A shared gateway wants to know who is asking and what kind of work it is. eLLM Code sends the developer's identity so usage can be attributed per person, and an intent label such as planning, code edit, review or bug investigation so the gateway can route each request to the most suitable model pool. Both are on by default and harmless for gateways that ignore them; this guide shows where to check and adjust them, and confirms what is never sent.
Before you start
Permissions required:
- None.
You'll need:
- To know whether your gateway attributes by username and whether it routes on intent.
Steps
- Open VS Code settings and search for
ellmCode.send. ellmCode.sendUsername(on by default) puts the operating-system username in the request'suserfield and theX-eLLM-Userheader. To send a different identity, setellmCode.username.ellmCode.sendIntent(on) adds theX-eLLM-Intentheader.ellmCode.sendIntentInBody(on) also includesintentandmodeas JSON body fields; turn this off if your endpoint rejects unknown fields.- Run eLLM: Show Audit Log and send a message. Each request entry records the user identity and intent that were sent.
- Note the two governance flags:
ellmCode.telemetryandellmCode.allowExternalProvidersexist only to state the policy and are always treated as off. The extension contacts your configured endpoint and, only when you confirm a Report Issue, your configured GitLab; nothing else.
What you should see
In the debug trace, the intent on each request changes with the work: planning turns, code edits, test review and documentation are labelled differently, and a gateway that routes on intent can be seen serving them from different pools in the context window report.
Troubleshooting
- Requests fail after enabling body fields: turn
ellmCode.sendIntentInBodyoff; the header alone is enough for routing. - Usage is attributed to the wrong person on a shared machine: set
ellmCode.usernamein user settings, not workspace settings.
Related guides
- How to Show the Audit Log and Debug Trace
- How to Configure a Reasoning Model and Native Tool Calling
person people found this useful.