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.

Related

Knowledge base 11 Sep 2026

How to Tune Generation Settings for Your Model

Learn how to fine-tune generation settings for local and self-hosted models to improve performance and accuracy. Adjust parameters like repetition, prompt size, and command timeouts to better match your model's behaviour.

Knowledge base 11 Sep 2026

How to Run the Benchmark Suite

This article provides a detailed guide on running a benchmark suite to test model configurations, including setup requirements, steps for execution, and troubleshooting tips. It's aimed at advanced users looking to evaluate model capabilities before deployment.

Knowledge base 11 Sep 2026

How to Check and Manage the Context Window

Learn how to manage and check the context window for different models, ensuring your conversation fits within token limits. This guide covers reading context readouts, handling large conversations, and adjusting fallback budgets.

Expand 29 Jul 2026

How AI can support pupils with SEND

Explore how AI tools are aiding pupils with special educational needs and disabilities by simplifying text, breaking down tasks, and enhancing accessibility. Learn about the considerations schools should make before implementation.

Expand 29 Jul 2026

AI policy and practice in further education

Further education colleges need distinct AI policies due to their unique mix of vocational courses, diverse age groups, and specific funding and inspection requirements. This guidance highlights the importance of tailored AI approaches in FE settings.