Repository navigation
ENG-1784: Tag CLI harness traffic with X-Requesty-Client - #35
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Every harness the CLI configures or launches now sends X-Requesty-Client: requesty-cli/<version>, which the router stores in chat_interactions.extra as Client. Hermes headers move from model.default_headers, which Hermes skips in anthropic_messages mode, to the provider's extra_headers, and use X-Title instead of X-Origin-Title. Co-Authored-By: thibault <thibault.jaigu@gmail.com>
devin-ai-integration
Bot
requested review from
lavicosa,
nickc128,
requesty-JohnCosta27 and
requesty-ditti
as code owners
September 30, 2026 10:02
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
AI CostNo spend detected for branch Updated 2026-09-30T10:17Z · last 30 days · data from Requesty |
Collaborator
|
Let's break up the headers into something like: |
…sion Co-Authored-By: thibault <thibault.jaigu@gmail.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Right now nothing tells a harness the CLI set up apart from one set up by hand:
X-Title/HTTP-Referercarry the same values our docs tell people to paste in. This PR makes every harness the CLI configures or launches sendThe router already copies
X-Requesty-*headers intochat_interactions.extrawith the prefix removed (Client,Client-Version). So no backend change is needed, and CLI adoption becomes:Where each harness gets them (configure + launch):
model_providers.requesty.http_headers(config, and-coverrides on launch)provider.requesty.options.headersheaders; Pi launch passesREQUESTY_CLIENT_VERSIONto the embedded extensionANTHROPIC_CUSTOM_HEADERS(Name: Valuelines) insettings.jsonenv and the launch env.withRequestyClientHeaderskeeps any headers the user already has and replaces older client/version linescustom_providers[requesty].extra_headersHermes fix. The CLI used to write
model.default_headers, but Hermes skips those whenapi_mode: anthropic_messages(client_lifecycle.py). That is the mode we configure, so those headers were never sent. Providerextra_headersis applied on that route too (anthropic_adapter.py, docs). The title header was alsoX-Origin-Title, which the router doesn't read. It is nowX-Title: Hermes Agent, matching the backend'stypes.TitleHermes.When merging into an existing Hermes config, an old
model.default_headersblock is left alone. It has no effect inanthropic_messagesmode.Known gaps
requesty hermes(launch without configure) is not tagged. It uses--provider customplusCUSTOM_BASE_URL, and Hermes has no environment variable for headers.ANTHROPIC_CUSTOM_HEADERSon versions that support it. Older versions ignore the variable, so nothing breaks.Checks:
gofmt -l .(clean),go vet ./...,go test ./...,go build.Link to Devin session: https://app.devin.ai/sessions/70942c1e50ba4f32803b5988575ced4a
Open in Devin Desktop: https://app.devin.ai/desktop/session/70942c1e50ba4f32803b5988575ced4a?variant=devin
Requested by: @Thibault00