Abstract
Released in June 2026 by Anthropic, Claude Fable 5 belongs to the Mythos model series, delivering extended context capacity, advanced reasoning and native tool calling capabilities. Codex, an AI coding agent, defaults to OpenAI endpoints, yet it can route requests toward Claude Fable 5 via compatible third-party API endpoints. Users only need to adjust the ~/.codex/config.toml configuration to finish model switching. This tutorial covers two deployment approaches: automated guided setup and manual TOML configuration, compatible with Codex version 0.134.0 and above. The updated profile mechanism enables unified model switching across three platforms: CLI, desktop application and IDE extensions. Teams managing multi-model access can leverage 4sapi as a unified API gateway to simplify endpoint maintenance for cross-provider LLM routing.
1. Overview of Claude Fable 5: Core Capabilities of the Mythos-tier Model
Unveiled on June 9, 2026 alongside the access-restricted Mythos 5, Claude Fable 5 is a public-access model built for knowledge work and software development. Its key technical specifications are listed below:
- Ultra-long context window: Supports up to 1 million tokens, with a maximum output limit of 128,000 tokens
- Multimodal input: Accepts text, images and file uploads; outputs are generated in text format
- Advanced reasoning: Built-in function calling, structured output and AI coding capabilities
- Long-duration autonomous execution: Optimized for multi-turn asynchronous tasks that require continuous operation
Shortly after launch, temporary export control restrictions caused service interruptions. Full global service restoration took effect starting July 1, 2026. Anthropic also partnered with Amazon, Microsoft, Google and other Glasswing alliance members to release an industry-grade AI risk scoring framework, alongside details on network security safeguards deployed for Fable 5.
2. Prerequisites for Connecting Codex to Third-Party LLMs
Codex’s wire_api parameter exclusively supports the Responses API. Standard Chat Completion endpoints cannot establish direct connectivity. Any third-party service integrated with Codex must expose a Responses-compatible endpoint; otherwise, an additional protocol translation layer will be required.
Three official ground rules critical to successful configuration:
- Protocol constraint: Only Responses-compliant endpoints are supported. Chat Completion interfaces require protocol conversion before usage.
- Cross-platform shared configuration: Codex desktop app, CLI and IDE extensions share the identical
~/.codex/config.tomluser-level file. Modifications apply to all clients simultaneously. - Configuration scope limit:
model_providerandmodel_providersdefinitions only take effect inside user-level configuration. Entries written into project-local.codex/config.tomlwill be ignored.
3. Path 1: Automated Guided Setup (3-Minute Deployment)
Many multi-model aggregation platforms provide configuration wizards to eliminate manual TOML editing. The prerequisites for this method are:
- Node.js 18 or newer runtime
- Codex CLI or Codex desktop application installed
- Valid API access credentials
Execute the helper script inside your terminal:
Follow the interactive prompts sequentially: select display language, choose network routing (domestic or overseas), input and validate your API key, pick Claude Fable 5 as the target model, then restart Codex CLI or desktop client to activate settings.
4. Path 2: Manual TOML Custom Configuration
Starting from Codex 0.134.0, the --profile argument no longer reads inline [profiles.*] blocks within config.toml. Each profile must be saved as an independent file under ~/.codex/. This change is the primary reason many outdated tutorials fail to work.
Step 1: Create standalone profile file ~/.codex/fable5.config.toml
Security reminder: The env_key field accepts only environment variable names. Never write plaintext API keys directly into configuration files, which creates severe leakage risks.
Export your credential as a persistent environment variable:
Step 2: Launch Codex with specified profile
If you intend to set Claude Fable 5 as your permanent default model, move the provider definition and top-level model / model_provider entries directly into ~/.codex/config.toml.
5. Special Notes for Codex Desktop App
| Item | Details |
|---|---|
| Configuration Entry | Desktop settings panel only exposes frequently used options. Custom provider setup still requires manual editing of config.toml. |
| Activation Rule | Restart the Codex desktop application after modifying configuration files; CLI loads new settings on next launch. |
| MCP Compatibility | MCP server configuration resides inside the same config.toml, shared across App, CLI and IDE extensions. |
6. Troubleshooting Common Errors
| Symptom | Root Cause | Resolution |
|---|---|---|
| 401 Unauthorized | Environment variable fails to load (desktop app launched from Dock cannot read shell rc files) | On macOS, use launchctl setenv 4SAPI_API_KEY xxx, then log out and re-authenticate your session. |
--profile has no effect | Outdated inline [profiles.fable5] syntax from legacy guides | Migrate profile content into independent ~/.codex/fable5.config.toml |
| Provider configuration ignored | Definitions saved to project-level .codex/config.toml | All model_provider entries must be placed within user home directory configuration. |
| 400 Protocol mismatch | base_url points to standard Chat Completion endpoint | Switch to a backend exposing Responses API compatible endpoints. |
| Target model missing from selector | Model catalog cache outdated | Edit models_cache.json or refresh model_catalog.json. |
You can verify traffic routing by checking metrics on your service dashboard, or cross-check response metadata to confirm the active model identity.
7. Why Route Codex Through Aggregation Platforms Rather Than Direct API Access
For individual developers and engineering teams, multi-model aggregators deliver tangible operational benefits compared to direct connection to Anthropic’s official endpoints:
- Unified credential management: One single API key grants access to multiple frontier models. Switching models only requires updating the
modelfield, without reconfiguring provider parameters. - Multiple routing options: Choose from domestic and international network routes to stabilize connectivity.
- Protocol compatibility: Bypass gateways natively support Responses API, removing the workload of self-hosting protocol translation services.
- Permission control: API keys can be restricted to a defined set of models, suitable for team access distribution.
Frequently Asked Questions
Q: Do CLI and desktop application require separate configuration files?
A: No. Codex App, CLI and IDE extensions share one config.toml. Any change applies to all clients; simply restart desktop software after editing.
Q: Why does my [profiles.fable5] section not take effect?
A: Codex 0.134.0 removes support for inline profile blocks. You need to split profile configuration into standalone files under the ~/.codex directory.
Q: Where should I safely store my Claude Fable 5 API key? A: Always store credentials inside environment variables loaded via shell rc files or system launchctl services. Configuration files are frequently synced and shared, making hardcoded keys a common leakage vector.
Q: Can I continue using GPT models after connecting Claude Fable 5?
A: Yes. Multiple profiles can coexist. Launch Codex without the --profile flag to use the default OpenAI model; add the profile argument to activate third-party routed Fable 5. The two modes are independent and do not interfere.
Q: Is Claude Fable 5 stable for production usage? A: As of July 2026, global service has fully resumed after lifting export control limits. Major aggregation platforms support reliable invocation.
Conclusion
Three core steps complete Codex integration with Claude Fable 5: define the provider pointing toward a Responses-compatible endpoint, inject API credentials via environment variables, and create independent profile files for rapid switching. The unified config.toml design enables consistent settings across CLI, desktop and IDE extensions.
Two critical pitfalls to avoid during deployment:
- Starting from Codex 0.134.0, all profiles must be stored as separate files instead of inline TOML blocks.
- Never embed plaintext API keys inside configuration files; use environment variables to mitigate leakage risks.
This configuration workflow is compiled based on official documentation updated in July 2026. Since Codex and Claude Fable 5 continue receiving iterative upgrades, developers are advised to follow official announcements to track specification changes.




