October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

OpenRouter or LiteLLM? Route Claude Code Through T3 Code

Set up OpenRouter or LiteLLM in T3 Code’s Claude provider, verify the active route in Claude Code, and understand gateway credentials, billing, and compatibility limits.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To route Claude Code through a gateway in T3 Code, configure the Claude provider’s executable, optional config directory, and gateway environment variables. Use OpenRouter for a hosted route, or point the provider at a LiteLLM gateway you operate. Start a session through that provider and run /status to check the active endpoint and credential source. Gateway credentials use the gateway or upstream account’s billing—not your Claude subscription—and routing through a compatible API does not guarantee that every Claude Code feature works with every model.

What changes when you use a gateway?

T3 Code’s Claude provider is the right scope for this configuration: it lets you set the claude executable, a provider-specific CLAUDE_CONFIG_DIR, and environment variables used when that provider launches Claude Code. An empty config-directory field leaves Claude Code using its normal configuration directory; a separate directory gives the gateway setup distinct Claude state. T3 Code’s guide says this does not change HOME, so changing HOME is not a substitute for setting a config directory. Threads using different config directories are separate Claude environments, not interchangeable account contexts. See the T3 Code Claude provider guide.

As an Amazon Associate I earn from qualifying purchases.

A gateway changes the route for requests and the credential used to authenticate them. It does not turn a Claude subscription into gateway access. Anthropic says that when a gateway credential or apiKeyHelper is active, requests use that credential instead of the developer’s Claude subscription login; subscription usage limits do not apply, and the credential owner pays under the upstream route. A base URL by itself does not replace a subscription credential. Anthropic describes gateways as a way to centralize credentials, usage tracking, budgets, rate limits, audit logs, and provider switching, but says it does not endorse, maintain, or audit third-party gateways. It also does not support routing Claude Code to non-Claude models through a gateway. See Anthropic’s gateway documentation.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a route: hosted OpenRouter or self-hosted LiteLLM

Question OpenRouter LiteLLM
Who operates the gateway? OpenRouter operates the hosted service. You or your organization deploy and maintain the gateway.
What goes in the T3 Code provider? https://openrouter.ai/api, an OpenRouter key in ANTHROPIC_AUTH_TOKEN, and an empty ANTHROPIC_API_KEY. Your LiteLLM gateway root URL, a LiteLLM virtual key, and a configured model alias.
How is the model selected? OpenRouter documents model-role environment variables; consult its current guide for valid variable names and model identifiers. Set ANTHROPIC_MODEL to a model_name configured in LiteLLM. A Claude Code picker ID is not automatically a LiteLLM alias.
Where are usage and billing handled? Requests are charged to OpenRouter credits; usage, including reasoning tokens, appears in its dashboard. Gateway deployment and operation are yours or your organization’s. The upstream route and configured billing determine the charge.
What operational work is involved? Manage the service credential and check OpenRouter activity. Deploy and maintain the proxy, its model configuration, credentials, and operational controls.

Both routes expose an Anthropic-compatible interface, but compatibility does not mean identical behavior across models. OpenRouter and Anthropic both warn that Claude Code is optimized for Anthropic models and may not work correctly with other providers. Neither route is a guarantee that all Claude Code features will work with every model.

#1 Best Overall
Sale
Anker USB C to Ethernet Adapter, Portable 1 Gbps Network Hub
  • The Anker Advantage: Join the 65 million+ powered by our leading technology.
  • Instant Internet: Connect to the internet instantly from virtually any USB-C 3.0 device, and enjoy stable connection speeds of up to 1 Gbps.
  • Lightweight and Compact: The space-saving and portable design measures just over half an inch thick and weighs about the same as a AA battery.
  • Premium Build: Features a sleek aluminum exterior and braided-nylon cable to complement the design of high-end devices.
  • What You Get: PowerExpand USB-C to Gigabit Ethernet Adapter, welcome guide, 18-month worry-free warranty, and friendly customer service.

Configure T3 Code’s Claude provider

  1. In T3 Code, open Settings and add or edit a Claude provider.
  2. Set the binary path to claude, or use the executable path appropriate to your installation if it is not on the launch environment’s path.
  3. Optionally set a dedicated CLAUDE_CONFIG_DIR for an isolated gateway environment. Create that directory if needed. Leave the field empty to use Claude Code’s normal configuration directory.
  4. Add the route’s environment variables in the provider’s Environment variables section. Do not put environment assignments in Launch arguments.
  5. Mark API tokens and virtual keys as sensitive. T3 Code’s guide says sensitive values are stored as server secrets and are not sent back to the app after saving.

Use OpenRouter as the hosted route

OpenRouter’s Claude Code setup uses an Anthropic-compatible Messages API interface. For this T3 Code provider, use the base URL below—not the /api/v1 URL used for other API styles. The T3 Code guide documents this configuration:

Display name: Claude OpenRouter
Binary path: claude
CLAUDE_CONFIG_DIR: ~/.claude_openrouter_home

ANTHROPIC_BASE_URL=https://openrouter.ai/api
ANTHROPIC_AUTH_TOKEN=<OpenRouter API key; mark sensitive>
ANTHROPIC_API_KEY=
  1. Create ~/.claude_openrouter_home if you use it as the provider’s config directory.
  2. Enter your OpenRouter key as the sensitive value for ANTHROPIC_AUTH_TOKEN, and leave ANTHROPIC_API_KEY empty for this interactive configuration.
  3. If this config directory has previously been used to sign in to Anthropic, start Claude Code in that environment and run /logout before using the gateway key. Cached Anthropic credentials can conflict with the gateway credential.
  4. Save the provider, launch Claude Code through it, then check the route as described below. OpenRouter advises relaunching the CLI after environment changes.

OpenRouter documents environment variables for model roles, but variable names and model identifiers can change. Use its current Claude Code integration guide for those values rather than relying on an old example. Requests are charged to OpenRouter credits, and its Activity Dashboard shows usage, including reasoning tokens.

Rank #2
Sale
UGREEN USB C to Ethernet Adapter, Plug and Play 1Gbps Aluminum Adapter
  • USB-C Meets 1000Mbps Ethernet in Seconds:UGREEN usb c to ethernet adapter supports fast speeds up to 1000Mbps and is backward compatible with 100/10Mbps network. Perfect for work, gaming, streaming, or downloading with a stable, reliable wired connection
  • Extend a Ethernet Port for Your Device:This ethernet to usb c adds a Gigabit RJ45 port to your device. It’s the perfect solution for new laptops without built-in Ethernet, devices with damaged LAN ports, or when WiFi is unavailable or unstable
  • Plug and Play: This Ethernet adapter is driver-free for Windows 11/10/8.1/8, macOS, Chrome OS, and Android. Drivers are required for Windows XP/7/Vista and Linux, and can be easily installed using our instructions. LED indicator shows status at a glance
  • Small Adapter, Big Attention to Detail: The usb c to ethernet features a durable aluminum alloy case for faster heat dissipation than plastic. Its reinforced cable tail and wear-resistant port ensure long-lasting durability. Compact size and easy to carry
  • Widely Compatible: The usbc to ethernet adapter is compatible with most laptops, tablets, smartphones, Nintendo Switch, and Steam Deck with USB-C or Thunderbolt 4/3 port, like MacBook Pro/Air, XPS, iPhone 17/16/15 Pro/Pro Max, Mac Mini, Chromebook, iPad

Point T3 Code at a LiteLLM gateway

LiteLLM documents Claude Code integration through the Anthropic Messages API at /v1/messages. Put the gateway root URL in the T3 Code provider; Claude Code uses the Messages API path. The example below uses local placeholder values—replace them with your actual gateway root, virtual key, and configured model alias.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ANTHROPIC_BASE_URL="http://localhost:4000"
ANTHROPIC_AUTH_TOKEN="<LiteLLM virtual key>"
ANTHROPIC_MODEL="<model_name from LiteLLM config>"
  • Match the model alias. The value of ANTHROPIC_MODEL must exist as a model_name in your LiteLLM configuration. Claude Code’s model-picker identifiers and LiteLLM aliases are not necessarily the same. Selecting a built-in Anthropic ID in the picker can fail if that exact identifier is not configured in LiteLLM.
  • Avoid an unintended key. If your shell exports a real ANTHROPIC_API_KEY, LiteLLM advises unsetting it for the session so the intended virtual key is used.
  • Plan to operate the service. LiteLLM describes both an open-source library with a unified interface to model providers and a self-hosted AI Gateway/Proxy, with documented options including container deployment, virtual keys, budgets, logging, and an admin interface. Deployment and ongoing maintenance belong to you or your organization. See LiteLLM’s Claude Code setup and LiteLLM Getting Started for current configuration and deployment details.

Verify the active route in Claude Code

  1. Launch a session using the intended T3 Code Claude provider, not a different provider or a shell-launched session with unrelated environment variables.
  2. Run /status inside Claude Code. Confirm that the Anthropic base URL is the intended gateway URL and that the token source is the expected environment variable.
  3. For OpenRouter, check its Activity Dashboard for the request. For LiteLLM, check the logging or usage view enabled in your gateway deployment.
  4. If /status shows a Claude account login, an unexpected base URL, or a different token source, review the selected T3 Code provider and its environment values. For OpenRouter, clear a stale login with /logout in the relevant config directory when appropriate, reload the environment, and relaunch the CLI.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What gateways change—and what they do not

With a gateway credential active, billing follows that credential’s route: for example, the organization’s Anthropic Console account, a cloud-provider account, or gateway service credits. It does not consume Claude subscription usage limits. A gateway can centralize provider credentials and operational controls, but it adds another service whose availability, configuration, logging, and compatibility someone must manage.

Rank #3
Amazon Basics Aluminum USB-C to RJ45 Gigabit Ethernet Adapter, Portable, Fast Network, Grey, 2.07 x 0.81 x 0.6 inches
  • Adapter for converting a USB 3.1 Type-C port to a RJ45 Gigabit Ethernet port
  • Integrated Ethernet port supports 10M/100M/1000M bandwidth; offers instant Internet connection to the host
  • USB-C input allows for reversible plugging; offers complete compatibility with current computers and devices; compatible with Nintendo Switch
  • Ready to use, right out of the box; no external power adapter needed
  • Slim, compact size and lightweight aluminum housing for easy portability

Anthropic says it does not maintain or audit third-party gateway products and does not support routing Claude Code to non-Claude models through a gateway. A compatible endpoint is not proof that a non-Anthropic model will behave like Claude or support all Claude Code features. Treat model compatibility as specific to the gateway, model, and feature you use—not as a blanket property of the API format.

Quick Recap

SaleBestseller No. 1
Anker USB C to Ethernet Adapter, Portable 1 Gbps Network Hub
Anker USB C to Ethernet Adapter, Portable 1 Gbps Network Hub
The Anker Advantage: Join the 65 million+ powered by our leading technology.
$15.53
Bestseller No. 3
Amazon Basics Aluminum USB-C to RJ45 Gigabit Ethernet Adapter, Portable, Fast Network, Grey, 2.07 x 0.81 x 0.6 inches
Amazon Basics Aluminum USB-C to RJ45 Gigabit Ethernet Adapter, Portable, Fast Network, Grey, 2.07 x 0.81 x 0.6 inches
Adapter for converting a USB 3.1 Type-C port to a RJ45 Gigabit Ethernet port; Ready to use, right out of the box; no external power adapter needed
$23.99
Best Value
BENFEI USB-C to Ethernet Adapter, USB Type-C (Thunderbolt 3/4) to RJ45 Gigabit Ethernet LAN Network Adapter Compatible with iPhone 15 Pro/Max, MacBook Pro/Air 2023, iPad Pro,iMac, S23, XPS 17 and More
  • 【Reliable & Endurance Connectivity】Designed specifically for plug-and-play connection between USB-C devices and wired network, provides gigabit ethernet connectivity even when wireless connectivity is Inconsistent or over extended.
  • 【Surfing at Full Speed】Obtain stable connection speeds up to 1Gbps; downward compatible with 100Mbps/10Mbps networks. Our Type-C to LAN Gigabit Ethernet (RJ45) Network Adapter supports large downloads at maximum speeds without interruption.✅ To reach 1Gbps, make sure to use CAT6 & up Ethernet cables.
  • 【Compact & Friendly Design】Compact and lightweight, with a user-friendly non-slip design for easier plug and unplug. Braided nylon cable for extra durability. Premium aluminum casing for better heat insulation. Fits snugly with the USB-C ports on your devices, better signal transfer protection.
  • 【Wide Compatibility】Compatible with iPhone 15 Series, MacBook Pro 16''/15” (2023/2022/2021/2020/2019/2018/2017), MacBook (2019/2018/2017), MacBook Air 13” (2022/2018), iPad Pro (2022/2020/2018); XPS 13/15/17; Surface Book 2; Google Pixelbook, Chromebook, Pixel, Pixel 2; Asus ZenBook. Compatible with Samsung S20/S10/S9/S8/S8+, Note 8/9, Galaxy Tablet Tab A 10.5, and many other USB-C laptops, tablets, and smartphones. (NOT compatible with Nintendo Switch.)
  • 【18 MONTH WARRANTY】: Exclusive BENFEI Unconditional 18-month Warranty ensures long-time satisfaction of your purchase; Friendly and easy-to-reach customer service to solve your problems timely
Rank #4
Sale
TP-Link USB C to Ethernet Adapter (UE300C), Compact, Plug & Play
  • 𝐇𝐢𝐠𝐡-𝐒𝐩𝐞𝐞𝐝 𝐔𝐒𝐁-𝐂 𝐄𝐭𝐡𝐞𝐫𝐧𝐞𝐭 𝐀𝐝𝐚𝐩𝐭𝐞𝐫 - Instantly transform your laptop or tablet’s USB-C port into a reliable wired connection with a 10/100/1000 Mbps RJ45 Ethernet port. Perfect for replacing unstable Wi-Fi in situations that require uninterrupted connectivity, such as online meetings, gaming, and media streaming.
  • 𝐔𝐒𝐁-𝐂 𝟑.𝟎 𝐟𝐨𝐫 𝐅𝐚𝐬𝐭𝐞𝐫, 𝐌𝐨𝐫𝐞 𝐒𝐭𝐚𝐛𝐥𝐞 𝐂𝐨𝐧𝐧𝐞𝐜𝐭𝐢𝐨𝐧𝐬 - Experience full Gigabit Ethernet performance over your laptop’s USB-C 3.0 port and elevate your browsing experience to transfer files, play games, video chat, and stream HD videos seamlessly. (To reach 1Gbps, please use CAT6 or up Ethernet cables.)
  • 𝐔𝐥𝐭𝐫𝐚-𝐂𝐨𝐦𝐩𝐚𝐜𝐭 𝐚𝐧𝐝 𝐅𝐨𝐥𝐝𝐚𝐛𝐥𝐞 𝐃𝐞𝐬𝐢𝐠𝐧 - At just 2.8 x 1.0 x 0.6 inches, the UE300C slips easily into your laptop bag or pocket. The lightweight yet durable build makes it perfect for travel, remote work, or quick setup in conference rooms.
  • 𝐏𝐥𝐮𝐠 𝐚𝐧𝐝 𝐏𝐥𝐚𝐲- No driver required for Windows 11/10/8.1/8/7, macOS, Chrome OS, and Linux (Ubuntu). Simply connect and enjoy instant wired internet access without complicated setup.
  • 𝐁𝐫𝐨𝐚𝐝 𝐃𝐞𝐯𝐢𝐜𝐞 𝐂𝐨𝐦𝐩𝐚𝐭𝐢𝐛𝐢𝐥𝐢𝐭𝐲- Works seamlessly with most USB-C devices, including MacBook Pro/Air, iPad Pro, Dell XPS, Surface Laptop, Chromebook, and more—making it a versatile network upgrade for home, office, or on-the-go use.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.