Developer runs Claude Code on Grok 4.5 via API gateway with three environment variables
A developer who regularly uses Claude Code with Opus 4.8 decided to test xAI's Grok 4.5, released on July 8, within the same terminal environment. Two factors motivated the experiment: Grok 4.5 is xAI's first model explicitly built for coding and agentic tasks, and third-party benchmarks showed it completing an agentic indexing task using roughly 14,000 output tokens compared to around 67,000 for a rival flagship model. The setup relied on Claude Code's ability to route requests to any endpoint that speaks Anthropic's native messaging protocol, using an API gateway called byesu that exposes Anthropic-compatible access to multiple models including Grok 4.5. Just three environment variables — setting the base URL, API key, and model name — were enough to redirect Claude Code's requests to Grok 4.5 without any additional client software. The developer noted a few minor gotchas, including stripping trailing path segments from the base URL and trying an alternate variable name for the API key if authentication fails.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in