request-logger: add Grok support - #54
Open
gokhan wants to merge 1 commit into
Open
Conversation
Add Grok as a catalogue agent in the Copilot shape: one xAI provider, GROK_CLI_CHAT_PROXY_BASE_URL, a /v1 suffix, and the OpenAI Responses renderer. A grok.com login and an XAI_API_KEY both talk to cli-chat-proxy.grok.com; GROK_MODELS_BASE_URL is a different override and is warned about, not set. Tests cover host, command, Windows env syntax, and the custom-target template. Driven against a live grok -p turn through the proxy.
gokhan
force-pushed
the
request-logger-grok-support
branch
from
August 27, 2026 21:01
44375bc to
62716f8
Compare
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
Adds Grok (the xAI coding CLI) to the request-logger catalogue, in the same shape as Copilot: one provider, one env override, no config file.
cli-chat-proxy.grok.com, so it can be logged. A grok.com login and anXAI_API_KEYboth talk to that host; the API key is a credential fallback, not a different route.GROK_CLI_CHAT_PROXY_BASE_URL=http://localhost:PORT/v1 grok. The/v1suffix is required: Grok appends/responses(and/models) to the defaulthttps://cli-chat-proxy.grok.com/v1.GROK_MODELS_BASE_URLis a different override (it switches the CLI onto API-key auth against a custom/v1/modelsendpoint). The command never sets it; a warning tells the student to unset it if it is already in the environment, or the logs folder stays empty.Test plan
npx vitest run request-logger— 296 tests pass, including new Grok coverage: catalogue order,needsProvider, host,/v1suffix, OpenAI renderer, POSIX and PowerShell commands,GROK_MODELS_BASE_URLnot set, custom-target template reuse,customTargetNeedsModelfalsenpx prettier --checkon changed filesgrok -pturn through the proxy:POST /v1/responsesreturned 200, capture has tools + prompt + reply; GETs (/v1/models,/v1/settings) were forwarded and not logged