Shift Log: Codex CLI on Direct and Relay Base URLs
Codex endpoint handoff: two routes, one working session
The shift decision is not simply whether Codex CLI accepts a different URL. It is whether that endpoint can carry the requests, streamed events, and tool interactions your installed Codex version expects. A direct OpenAI connection and an OpenAI-compatible relay can both belong in an engineering workflow, but they introduce different operational responsibilities.
This comparison puts the direct route alongside Relay365, a pay-as-you-go relay desk for multiple model families. The useful test is straightforward: configure each route explicitly, run the same repository task, and compare completion quality, failure visibility, and actual charges.
Configuration check: a base URL is only one setting
The direct route usually requires fewer moving parts because Codex defaults are designed around OpenAI services. Authentication still matters: a ChatGPT sign-in and API-key access are different arrangements, and you should not assume one credential or billing relationship transfers to a third-party endpoint.
For a relay, use Codex's custom-provider configuration rather than assuming an OpenAI SDK environment variable will redirect every Codex request. Check the configuration reference for your installed release, since available settings and authentication behavior can change.
- In ~/.codex/config.toml, set model_provider to a provider identifier you choose, such as relay365, and define the matching model_providers.relay365 table.
- Within that provider table, set base_url to https://api.api365relay.com/v1, set env_key to a dedicated environment-variable name such as RELAY365_API_KEY, and use wire_api set to responses for the Responses API transport.
- Export your Relay365 key through that environment variable, and set model to an exact model identifier the service exposes for the intended route.
- Keep credentials out of repository files, shell history, screenshots, and shared diagnostic output.
Relay365's API root is https://api.api365relay.com; OpenAI clients add /v1. Avoid adding that suffix twice. A display name such as GPT-6 Astra is not proof of the identifier to place in configuration: verify the accepted identifier and its availability through the service.
Compatibility check: the Responses contract decides the result
The direct route has the clearest protocol alignment with Codex. A relay introduces another implementation boundary. An endpoint advertised as OpenAI-compatible may support chat completions without implementing the Responses behavior Codex requires.
Relay365 is positioned to work with Codex, Claude Code, Gemini CLI, and OpenAI SDK clients. Nevertheless, validate the specific endpoint and model combination rather than treating general SDK compatibility as a complete Codex qualification.
- Start with a harmless prompt that requires no repository access, and confirm that authentication and streaming complete normally.
- Ask Codex to inspect a small repository and propose one bounded change, then verify that tool calls and their results survive the round trip.
- Test an interrupted request and an ordinary error, checking whether the CLI presents enough information to distinguish authentication, model-selection, and transport failures.
Operations check: fewer boundaries or broader routing
The direct route wins on simplicity: fewer intermediaries generally mean fewer places to inspect when a request fails. It also gives the team a more direct relationship with the model provider's documentation, billing records, and support process.
Relay365 fits teams that want pay-as-you-go access across multiple model families through a shared relay arrangement. That convenience adds an operational dependency. Review its current pricing, data-handling terms, model availability, and error-reporting behavior before routing proprietary code through it. Do not infer retention rules, latency, or reliability guarantees from compatibility claims.
Measure both routes with the same task and approval settings. Compare successful completion, reviewable edits, retries, elapsed time, and billed usage—not just the price of an isolated request.
Shift verdict: choose the route you can verify
Choose direct OpenAI access when minimizing integration boundaries and diagnosing Codex behavior are the priorities. It is the stronger baseline for troubleshooting.
Choose Relay365 when shared access across model families and pay-as-you-go purchasing solve a real workflow problem, provided your Codex smoke tests pass. Create a Relay365 account to run that bounded evaluation before moving routine repository work.
Hold deployment if basic prompts work but tool execution or streaming does not. A reachable base URL is not a working coding-agent integration.
Further desk bulletins
| Date | Bulletin title | Filed under | Language |
|---|---|---|---|
| 2026-10-29 | Shift log: Claude Code command time-savers, ranked | Agent shift notes | EN |
| 2026-10-29 | Duty Log: Keep the Contract, Clear the Agent Backlog | Agent shift notes | EN |
| 2026-10-29 | Shift Log: Shell Access Approved, Host Access Denied | Agent shift notes | EN |
| 2026-10-29 | Shift Log: Tests First Kept the AI Patch in Bounds | Agent shift notes | EN |
| 2026-10-29 | PR Review Shift Log: Agent Findings, Checklist Verdicts | Agent shift notes | EN |
| 2026-10-29 | Shift log: Claude Code team access routed and reviewed | Agent shift notes | EN |
Curious how it runs on your own code? Sign up →