Setup note · July 2026

Fabledex

Claude Fable 5 in OpenAI Codex.

macOS · Apple silicon · Homebrew · Claude Pro or Max

Setup

  1. Install CLIProxyAPI.

    Terminal
    brew install cliproxyapi
  2. Generate a key. Paste it into the config.

    Generate key
    openssl rand -hex 32
    /opt/homebrew/etc/cliproxyapi.conf
    host: "127.0.0.1"
    port: 8317
    
    remote-management:
      allow-remote: false
      secret-key: ""
      disable-control-panel: true
    
    auth-dir: "~/.cli-proxy-api"
    
    api-keys:
      - "PASTE_YOUR_RANDOM_KEY_HERE"
  3. Log in. Lock the files. Start the proxy.

    Terminal
    /opt/homebrew/bin/cliproxyapi -config /opt/homebrew/etc/cliproxyapi.conf -claude-login
    
    find "$HOME/.cli-proxy-api" -maxdepth 1 -type f -name '*.json' -exec chmod 600 {} +
    
    brew services start cliproxyapi
  4. Create the key helper.

    Terminal
    mkdir -p "$HOME/.local/bin"
    ~/.local/bin/cliproxy-api-key
    #!/bin/zsh
    set -euo pipefail
    
    config=/opt/homebrew/etc/cliproxyapi.conf
    key=$(
      awk '
        /^api-keys:/ { in_keys = 1; next }
        in_keys && /^[[:space:]]*-/ {
          sub(/^[[:space:]]*-[[:space:]]*/, "")
          gsub(/^"|"$/, "")
          print
          exit
        }
        in_keys && /^[^[:space:]]/ { exit }
      ' "$config"
    )
    
    if [[ -z "$key" ]]; then
      print -u2 "No CLIProxyAPI key found in $config"
      exit 1
    fi
    
    print -r -- "$key"
    Terminal
    chmod 700 "$HOME/.local/bin/cliproxy-api-key"
  5. Create the model catalog.

    Terminal
    mkdir -p "$HOME/.codex"
    
    jq '{
      models: [
        .models[]
        | select(.slug == "gpt-5.4")
        | .slug = "claude-fable-5"
        | .display_name = "Fabledex"
        | .description = "Claude Fable 5 through local CLIProxyAPI."
        | .priority = 1
        | .context_window = 1000000
        | .max_context_window = 1000000
        | .effective_context_window_percent = 95
        | .auto_compact_token_limit = 900000
        | .default_reasoning_level = "xhigh"
        | .default_verbosity = null
        | .support_verbosity = false
        | .input_modalities = ["text"]
        | .supports_image_detail_original = false
        | .shell_type = "default"
        | .apply_patch_tool_type = null
        | .supports_parallel_tool_calls = false
        | .supports_search_tool = false
        | .web_search_tool_type = "text"
        | .service_tiers = []
        | .additional_speed_tiers = []
        | .comp_hash = null
        | .include_skills_usage_instructions = false
      ]
    }' "$HOME/.codex/models_cache.json" > "$HOME/.codex/fabledex-model-catalog.json"
  6. Add the provider and profile files.

    Append this to ~/.codex/config.toml. Replace /Users/YOUwith your full home path.

    ~/.codex/config.toml
    [model_providers.claude-subscription]
    name = "Claude subscription via local CLIProxyAPI"
    base_url = "http://127.0.0.1:8317/v1"
    wire_api = "responses"
    requires_openai_auth = false
    supports_websockets = false
    request_max_retries = 3
    stream_max_retries = 5
    stream_idle_timeout_ms = 1200000
    
    [model_providers.claude-subscription.auth]
    command = "/Users/YOU/.local/bin/cliproxy-api-key"
    refresh_interval_ms = 300000
    timeout_ms = 5000

    Create this separate profile file.

    ~/.codex/fabledex.config.toml
    model = "claude-fable-5"
    model_provider = "claude-subscription"
    model_reasoning_effort = "xhigh"
    model_context_window = 1000000
    model_auto_compact_token_limit = 900000
    model_catalog_json = "/Users/YOU/.codex/fabledex-model-catalog.json"
  7. Launch Fabledex.

    CLI

    Terminal
    codex --profile fabledex

    Codex Desktop

    Put these six lines at the top of ~/.codex/config.toml. Replace /Users/YOU with your full home path.

    Desktop model
    model = "claude-fable-5"
    model_provider = "claude-subscription"
    model_reasoning_effort = "xhigh"
    model_context_window = 1000000
    model_auto_compact_token_limit = 900000
    model_catalog_json = "/Users/YOU/.codex/fabledex-model-catalog.json"

    Quit and reopen Codex. Start a new task. Choose Custom · Extra High.

    Test prompt
    Reply with exactly FABLED_EX_OK