Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ app_config.json
starter.yaml
CLAUDE.md
.codex
.cache_codex/
.superpowers/
ui/.pnp.*
ui/.yarn/
Expand All @@ -32,4 +33,4 @@ codex-runner/dist/
docs/superpowers
*_api_key.*
codex_home/
.loopai
.loopai
2 changes: 1 addition & 1 deletion codex-chat-router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ The conversion, streaming, and history modules under `src/ccswitch/` are vendore
LOOPAI_CODEX_PROXY_UPSTREAM_API_KEY=... ./scripts/start_codex_deepseek_proxy.sh
```

The local Responses base URL is `http://127.0.0.1:15721/v1` by default. Build artifacts are directed to `/data/xuebinrui/cargo-target/loopai-codex-chat-router` by the startup script.
The local Responses base URL is `http://127.0.0.1:15721/v1` by default. Build artifacts and temporary files are directed to the project-local `.cache_codex/` directory by the startup script.
15 changes: 11 additions & 4 deletions scripts/start_codex_deepseek_proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
ROUTER_DIR="${ROOT_DIR}/codex-chat-router"
CACHE_DIR="${ROOT_DIR}/.cache_codex"

mkdir -p \
"${CACHE_DIR}/cargo" \
"${CACHE_DIR}/rustup" \
"${CACHE_DIR}/target" \
"${CACHE_DIR}/tmp"

export LOOPAI_CODEX_PROXY_UPSTREAM_BASE_URL="${LOOPAI_CODEX_PROXY_UPSTREAM_BASE_URL:-${DEEPSEEK_BASE_URL:-https://api.deepseek.com}}"
export LOOPAI_CODEX_PROXY_MODEL="${LOOPAI_CODEX_PROXY_MODEL:-${DEEPSEEK_MODEL:-deepseek-chat}}"
export LOOPAI_CODEX_PROXY_HOST="${LOOPAI_CODEX_PROXY_HOST:-127.0.0.1}"
export LOOPAI_CODEX_PROXY_PORT="${LOOPAI_CODEX_PROXY_PORT:-15721}"
export CARGO_HOME="${CARGO_HOME:-/home/xuebinrui/.cargo}"
export RUSTUP_HOME="${RUSTUP_HOME:-/home/xuebinrui/.rustup}"
export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-/data/xuebinrui/cargo-target/loopai-codex-chat-router}"
export TMPDIR="${TMPDIR:-/data/xuebinrui/tmp}"
export CARGO_HOME="${CARGO_HOME:-${CACHE_DIR}/cargo}"
export RUSTUP_HOME="${RUSTUP_HOME:-${CACHE_DIR}/rustup}"
export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-${CACHE_DIR}/target/codex-chat-router}"
export TMPDIR="${TMPDIR:-${CACHE_DIR}/tmp}"
export PATH="${CARGO_HOME}/bin:${PATH}"

if [[ -z "${LOOPAI_CODEX_PROXY_UPSTREAM_API_KEY:-${DEEPSEEK_API_KEY:-}}" ]]; then
Expand Down