How to Send Identity and Intent Headers to the Gateway

By Paul Flanders · · Intermediate

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

  1. Open VS Code settings and search for ellmCode.send.
  2. ellmCode.sendUsername (on by default) puts the operating-system username in the request's user field and the X-eLLM-User header. To send a different identity, set ellmCode.username.
  3. ellmCode.sendIntent (on) adds the X-eLLM-Intent header. ellmCode.sendIntentInBody (on) also includes intent and mode as JSON body fields; turn this off if your endpoint rejects unknown fields.
  4. Run eLLM: Show Audit Log and send a message. Each request entry records the user identity and intent that were sent.
  5. Note the two governance flags: ellmCode.telemetry and ellmCode.allowExternalProviders exist 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.sendIntentInBody off; the header alone is enough for routing.
  • Usage is attributed to the wrong person on a shared machine: set ellmCode.username in 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.