Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon 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 Now×
FREEDOM251

Freedom251 › Blog

How to Route Codex Through a Custom Responses API Endpoint

By Freedom251 Team · · 12 min read

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

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Codex can send inference requests to a custom service when that service implements the Responses API. The reliable setup is to configure the provider identity, Responses wire protocol, exact model ID, endpoint or region, and the provider’s own credentials, then verify the running session rather than trusting a saved file. In the CLI, /status shows the active provider; desktop and VS Code users must restart after configuration or environment changes and begin a new session. A small inference request, combined with provider-side logs when available, confirms that the endpoint, credentials and model work together.

This guide separates those settings, gives a documented Amazon Bedrock example, and explains what a successful route check does—and does not—prove.

As an Amazon Associate I earn from qualifying purchases.

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

What must a custom provider support?

A custom provider must expose an endpoint that implements the Responses API, not merely an endpoint for a different API dialect. In an OpenAI engineering article dated January 23, 2026, Michael Bolin wrote: “The Responses API endpoint that the Codex CLI uses is configurable, so it can be used with any endpoint that implements the Responses API.” That establishes the compatibility requirement, but it does not mean every compatible endpoint supports every Codex feature.

Before changing Codex, collect five values from the provider’s documentation:

Popular on Amazon
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
  • Provider identity: the provider ID Codex should select.
  • Endpoint and protocol: the Responses API base URL or provider-specific endpoint, plus wire_api = "responses" when that provider’s configuration requires it.
  • Model identifier: the exact string accepted by that provider, including any regional or vendor prefix.
  • Authentication: an API key, environment variable, or SDK credential chain specified by the provider.
  • Region or other routing fields: required by some hosted services, especially when a model is available only in selected regions.

Do not assume that a service advertising “OpenAI-compatible” requests supports the Responses API. Ask whether it accepts the Responses request and response objects Codex sends, and whether it supports the tools or modalities your workflow needs.

Which Codex settings determine the route?

Codex routing is easier to troubleshoot when each setting has one job. A provider name, endpoint, wire protocol, model and credential are separate controls; changing one does not automatically change the others.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Setting What it controls What to verify
Provider ID The configured backend Codex selects It matches the provider stanza and the value shown by the running client
Endpoint Where Responses requests are sent The URL is the provider’s Responses endpoint, not a Chat Completions-only path
wire_api The request protocol Codex uses Set to responses where the provider configuration calls for it
Model The model requested at that endpoint Use the provider’s exact model ID, including punctuation and prefixes
Credentials How the endpoint authenticates requests Use the provider’s documented key or credential chain; do not substitute an unrelated key
Region Where a hosted provider resolves the model and request Choose a region in which the selected model is available

The defaults depend on how Codex is signed in and which local mode is selected. The January 2026 engineering article lists https://chatgpt.com/backend-api/codex/responses for ChatGPT login, https://api.openai.com/v1/responses for an OpenAI API key, and http://localhost:11434/v1/responses when running --oss with Ollama 0.13.4+ or LM Studio 0.3.39+. These examples can change as clients evolve, so treat them as documented defaults for that article rather than permanent constants.

What should I prepare before editing config.toml?

Have the provider’s complete connection details ready before opening the file. A partially configured provider can look valid while still using a different model, endpoint or credential source.

  • Confirm that the provider implements the Responses API and obtain its current endpoint documentation.
  • Copy the exact model identifier from the provider’s model list.
  • Record whether authentication uses an environment variable, a provider-specific API key, or an SDK credential chain.
  • Record any mandatory region, account, project or tenancy setting.
  • Check the Codex client version required by the provider’s integration guide.
  • Know how you will inspect the active route: CLI /status, application status information, or provider-side request logs.

Codex commonly reads user configuration from ~/.codex/config.toml. The exact provider stanza and endpoint key are provider-specific; copy those names from the provider’s current Codex instructions instead of inventing fields from another backend.

How do I connect Codex to a custom Responses API provider?

Use this sequence for a provider other than the documented Bedrock integration. It avoids treating a model name or API key as a substitute for a complete route definition.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Identify the route. Write down the provider ID, Responses endpoint, model ID, authentication method and region, if any. Confirm that the endpoint accepts Responses API requests.
  2. Open the user configuration. Edit ~/.codex/config.toml with a plain-text editor. Preserve existing provider entries so you do not accidentally change the route used by another profile.
  3. Add or select the provider using its documented field names. Set the provider identity and endpoint details exactly as the provider specifies. Where the setup requires it, set wire_api = "responses".
  4. Set the model explicitly. Use the provider’s complete model identifier. Avoid a familiar short name if the provider requires a vendor prefix, version suffix or regional name.
  5. Configure credentials through the provider’s supported mechanism. Export the required environment variable or install the SDK credentials before launching Codex. A key for another service does not authenticate this route unless the provider explicitly says it does.
  6. Set region or equivalent routing data. If the provider resolves models by region, use a region where the selected model is enabled. Keep the region and model pair together when you document the configuration.
  7. Save, then restart the client that will make requests. A running process may retain its previous configuration and environment. Desktop and IDE clients need a restart followed by a new session; for CLI, start a fresh invocation if you changed shell variables.
  8. Check the active provider. In the CLI, run /status and read the provider value. Do not treat the presence of a stanza in the file as proof that Codex selected it.
  9. Send a minimal inference request. Use a short prompt that does not depend on tools, images or other optional features. A successful answer shows that this request reached a working endpoint with usable credentials and a valid model.
  10. Correlate with provider logs when available. The provider’s request log, request ID or audit record is stronger evidence of the destination than a response alone. It can reveal a proxy, fallback or different model that the client-side status does not display.

How does the official Amazon Bedrock configuration work?

OpenAI’s Help Center guide “Configure Codex with Amazon Bedrock” documents a supported route for Codex CLI, desktop and the VS Code extension. The details below reflect that guide as accessed October 25, 2026; model availability, client requirements and field names can change.

Also popular on Amazon
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Required client versions and model IDs

The guide reports a minimum CLI version of 0.128.0 and a minimum desktop or VS Code extension version of 26.429.30905. It lists these Bedrock model IDs:

Model ID listed by the guide Use
openai.gpt-5.6-sol Example selected in the guide
openai.gpt-5.6-terra Supported model ID
openai.gpt-5.6-luna Supported model ID
openai.gpt-5.5 Supported model ID
openai.gpt-5.4 Supported model ID

Use the model ID that is enabled in your Bedrock account and region. The list is not a promise that every listed model is available in every region or remains unchanged after the guide’s update.

Configuration file example

The guide’s example sets the model, provider, wire protocol and region in the Codex configuration:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
model = "openai.gpt-5.6-sol"
model_provider = "amazon-bedrock"
wire_api = "responses"
region = "us-west-2"

Replace us-west-2 with a region where the chosen model is available. Keep the provider ID amazon-bedrock consistent with the value you later expect to see in /status. Do not copy the model ID merely because it appears in an example; verify that your account can invoke it.

Bedrock API-key authentication

With Bedrock API-key authentication, the region is required. The guide specifies the AWS_BEARER_TOKEN_BEDROCK environment variable for the bearer token. Export it in the same environment that launches Codex, then restart the desktop or IDE client so it inherits the new value.

Do not use OPENAI_API_KEY as a substitute for the Bedrock bearer token in this setup. The credential belongs to the Bedrock route and is evaluated together with the configured region and model.

Bedrock SDK credentials

Instead of a Bedrock bearer token, the guide supports the AWS SDK credential chain. Codex can use a configured AWS region or the region resolved by that chain. Make sure the identity has permission to invoke the selected model and that the shell, desktop app or IDE process can see the same SDK configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Also popular on Amazon
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

If both a Bedrock bearer token and SDK credentials are present, the guide says the Bedrock bearer token takes precedence. Remove or unset an unintended bearer token when you need to diagnose SDK-based authentication.

How can I tell which provider Codex is using?

Verify the live route after launching a new session. A saved configuration only proves that text exists on disk; it does not prove that the current process loaded it or that another sign-in mode did not select a different endpoint.

CLI route check

  1. Start Codex CLI after saving the configuration and setting credentials.
  2. Open the slash-command interface and run /status.
  3. Confirm that the displayed provider is the one you intended. For the Bedrock example, the expected provider value is amazon-bedrock.
  4. Check the displayed model or other route details if your client exposes them.
  5. If the provider is wrong, end the session, inspect the loaded configuration and environment, then launch a fresh process.

The status check identifies the selected provider; it is not a substitute for a request. Continue with a minimal inference so the endpoint, credentials and model are exercised together.

Desktop and VS Code route check

The Bedrock guide instructs desktop and VS Code users to restart after configuration or environment changes and then start a new session. Close and reopen the application or extension host, create a new Codex session, and make the smallest practical request. If the application offers a status view, compare its provider value with the provider you configured; otherwise use the provider’s request logs or audit trail.

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

Restarting matters because an already-running process may retain old environment variables, an earlier configuration snapshot or a session-level provider selection.

What should the verification request contain?

Use a short, deterministic prompt such as “Reply with the word route.” Avoid images, voice input, plugins, cloud agents and tool calls during the first check. A plain text request isolates the basic inference path and makes an authentication or model error easier to interpret.

Interpret the result in layers:

  • Status identifies the selected provider. This confirms what Codex believes it is using.
  • A successful response confirms a working request path. The endpoint accepted the request, credentials were usable for that request, and the selected model returned output.
  • Provider logs provide destination evidence. They can show the actual host, model, region and request ID, and can expose a proxy or fallback.
  • Feature verification is separate. A text response does not prove that images, voice, plugins, cloud policies or agents are supported on the same route.

This small-request procedure is operational guidance derived from Codex’s configurable endpoint and the documented setup checks; it is not a claim that OpenAI prescribes a particular prompt.

Also popular on Amazon
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Widely Compatible: Transform any USB-C port into a USB-A port and USB-A port into a USB-C port, and connect up a wide range of USB-C(including MacBook, iPad Pro/Air/Mini, iPhone models with USB C ports, Samsung Galaxy series, and Google Pixel series. ) and USB A devices(including external hard drives, phones, mice, printers, and more)
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Which features can differ by provider?

Feature support belongs to the route, not just to the Codex client. OpenAI’s Bedrock guide lists these limitations for its documented Bedrock configuration:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Image generation
  • Voice transcription for input
  • Cloud plugin store
  • Cloud configuration and policies
  • Cloud agents

A custom provider may expose a different subset. Check its current compatibility notes before building a workflow around any optional feature. OpenAI also notes that availability can differ among ChatGPT sign-in, OpenAI API-key and Bedrock API-key configurations, so moving the same model request between routes can change the available capabilities.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why does a custom route fail even when the configuration looks correct?

The provider never appears in status

Codex may not have loaded the file, the provider ID may be misspelled, or an existing session may still hold an earlier selection. Start a fresh process, confirm the path ~/.codex/config.toml, and compare the exact provider ID in the file with the value shown by /status.

The endpoint returns an unsupported-request error

The service may implement Chat Completions or another API but not the Responses API shape Codex sends. Recheck the provider documentation for Responses support, the endpoint path, and the required wire_api value. Do not solve a protocol mismatch by changing only the model name.

Authentication fails

Check that the credential is from the provider’s documented mechanism and is visible to the process that launches Codex. For Bedrock, distinguish AWS_BEARER_TOKEN_BEDROCK from AWS SDK credentials, and remember that a set bearer token takes precedence. An OPENAI_API_KEY does not replace the Bedrock credential in the documented setup.

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.

The model is not found or unavailable

Copy the model ID exactly, including the openai. prefix in the Bedrock examples. Then verify that the model is enabled for the configured region and account. A valid provider and credential can still fail when the model-region combination is not offered.

The CLI works but desktop or VS Code does not

The graphical client may have started before you changed the environment or configuration. Restart it, start a new session, and ensure the application process has access to the same credential source as your shell. Compare a provider-side request record with the CLI request if the two clients still disagree.

Also popular on Amazon
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

The response succeeds but optional features fail

Basic inference proves only the path used by that request. Consult the route-specific feature list; the Bedrock guide, for example, excludes image generation, voice transcription input, cloud plugin store, cloud configuration and policies, and cloud agents.

How do I keep route verification repeatable?

  • Record the Codex client version, provider ID, model ID, region and credential method beside the configuration change.
  • Use one known-good text prompt for post-change checks, then test optional features separately.
  • Run /status in every new CLI session after switching providers.
  • Restart desktop and IDE clients after edits to config.toml or environment variables.
  • Keep provider-side request IDs or logs for incidents; they establish where a successful request was processed.
  • Recheck provider documentation after upgrades because endpoint defaults, supported model IDs and feature availability are volatile.

The dependable evidence chain is: the configuration names the intended route, the running session reports that provider, a minimal request succeeds, and provider logs corroborate the destination. If any link disagrees, treat the route as unresolved until the mismatch is corrected.

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

What is the safest way to switch back to a default endpoint?

Save a copy of the custom provider settings, remove or disable the custom selection according to the current Codex configuration reference, and launch a new process or session. Then verify the resulting provider and endpoint rather than assuming that deleting one stanza restored a particular sign-in default. The defaults documented in January 2026 differed between ChatGPT login, OpenAI API-key authentication and local --oss mode, so the active sign-in mode determines what “default” means.

Frequently Asked Questions

Can an endpoint that supports Chat Completions also serve Codex?

Not automatically. Codex needs a Responses API implementation at the configured endpoint; a service that only accepts Chat Completions requests can reject Codex payloads even if it advertises general OpenAI compatibility.

Why can two Codex clients use different providers on the same computer?

Each process can load configuration and environment variables at a different time, and desktop or IDE sessions may retain an earlier snapshot. Restart the affected client and create a new session before comparing its status with the CLI.

Does a successful answer prove that every Codex feature works through the provider?

No. It proves that the particular inference request reached a usable endpoint with valid credentials and a valid model. Optional capabilities are route-specific and require separate confirmation in the provider’s compatibility documentation.

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

What should I check when a Bedrock model works in one region but not another?

Model availability is regional, so verify the selected model is enabled in the configured Bedrock region and account. Keep the region in the Codex configuration aligned with the region used by your credential and provider logs.

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.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

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.