Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
2dcdb81
readme: focus intro on chatgpt plus/pro value
raine Apr 19, 2026
d7d0acd
ci: bump github actions to v5
raine Apr 19, 2026
1943336
install: ad-hoc codesign binary on macOS
raine Apr 19, 2026
bba0ac8
add model aliases for claude-style names
raine Apr 19, 2026
8e0a653
fix malformed streamed read tool args
raine Apr 19, 2026
26bcdb0
readme: add claude code screenshot
raine Apr 19, 2026
ee8b4bf
advertise proxy identity upstream
raine Apr 19, 2026
31970f3
add CHANGELOG.md
raine Apr 19, 2026
d900cde
0.0.2
raine Apr 19, 2026
8c453ff
add license
raine Apr 19, 2026
e550aa3
update README
raine Apr 19, 2026
ead48d0
share normalization between request and count paths
raine Apr 19, 2026
9886661
add compaction telemetry logging
raine Apr 19, 2026
9220606
log active tools on stream abort
raine Apr 19, 2026
e88c774
use verbose logging for compaction telemetry
raine Apr 19, 2026
44ae8b6
add per-session compaction timeline telemetry
raine Apr 19, 2026
f594ef0
fix cached token usage mapping
raine Apr 19, 2026
8c00090
improve count_tokens estimation
raine Apr 19, 2026
178c8e0
preserve output budget and log usage drift
raine Apr 20, 2026
52c2f2c
log context_management payloads
raine Apr 20, 2026
bc13d3c
remove unsupported max_output_tokens
raine Apr 20, 2026
a8d110d
make reasoning include conditional
raine Apr 20, 2026
0391e46
log upstream header telemetry
raine Apr 20, 2026
ec766ef
tighten responses request schema
raine Apr 20, 2026
73c4c45
fix reasoning-included telemetry semantics
raine Apr 20, 2026
c849c73
readme: document manual compaction workaround
raine Apr 20, 2026
70cf463
rename to claude-code-proxy and restructure for multi-provider support
raine Apr 20, 2026
7e68263
kimi: scaffold provider with device-code login and token refresh
raine Apr 20, 2026
6a31954
kimi: implement chat translation and wire up handlers
raine Apr 20, 2026
a1b8c71
route requests to providers by model instead of a single-provider def…
raine Apr 20, 2026
cbc5f35
readme: reorganize for multi-provider and document small fast model
raine Apr 20, 2026
e12c2ca
add kimi.com authentication option to install script
raine Apr 20, 2026
f21e019
0.0.3
raine Apr 20, 2026
e616d6c
kimi: round-trip reasoning content as anthropic thinking blocks
raine Apr 20, 2026
ba2551e
kimi: always enable thinking and always round-trip reasoning
raine Apr 20, 2026
8b71518
add child() to logger and thread request context through provider int…
raine Apr 20, 2026
465533e
0.0.4
raine Apr 20, 2026
1148ef1
add model and effort override env vars
0xOmarA Apr 22, 2026
74e7750
rename model override env var to CCP_CODEX_MODEL
raine Apr 22, 2026
86924ef
map max effort to xhigh for codex and high for kimi
raine Apr 22, 2026
eda2d83
rename effort override env var and add validation
raine Apr 22, 2026
fdd2e9a
validate incoming effort values at runtime
raine Apr 22, 2026
d01f546
readme: document CCP_CODEX_MODEL and CCP_CODEX_EFFORT env vars
raine Apr 22, 2026
c9f95df
kimi: always log finish field in upstream chunk debug output
raine Apr 21, 2026
9788fc1
kimi: log upstream HTTP response status
raine Apr 21, 2026
3fcc9a3
kimi: add stream and accumulation summary logging
raine Apr 21, 2026
ec0cf54
kimi: always log input tokens and add stream finish usage logging
raine Apr 21, 2026
5e89d53
kimi: track request start time for accurate TTFB metrics
raine Apr 21, 2026
8d73543
kimi: fix missing KimiUsage import in stream.ts
raine Apr 21, 2026
1292316
kimi: remove per-chunk debug logging from reducer
raine Apr 21, 2026
af60bee
add request_completed log and handle abort errors gracefully
raine Apr 21, 2026
b603d22
kimi: add claude-sonnet-4-6 as accepted model alias
raine Apr 21, 2026
a809c24
kimi: add missing model aliases to supportedModels
raine Apr 21, 2026
5c4d5a9
update changelog for v0.0.5
raine Apr 22, 2026
b5520ad
0.0.5
raine Apr 22, 2026
e0ab95f
readme: document toggling between proxy and direct anthropic
raine Apr 22, 2026
66f957a
support [1m] model suffix for larger context windows
raine Apr 24, 2026
4f4598f
codex: add gpt-5.5 support
raine Apr 25, 2026
7ae07b0
changelog: add v0.0.6 entry
raine Apr 25, 2026
3671f80
0.0.6
raine Apr 25, 2026
a022041
replace security CLI keychain calls with bun:ffi
raine Apr 25, 2026
24a0394
bind oauth callback server to 127.0.0.1
raine Apr 25, 2026
99cdee4
fix case-insensitive log redaction
raine Apr 25, 2026
f4df608
create log file with 0600 permissions
raine Apr 25, 2026
4f620d9
remove unused chmod import from token-store
raine Apr 25, 2026
f086601
pkce: fix modulo bias in verifier generation
raine Apr 25, 2026
62f8857
strip upstream response body from token refresh errors
raine Apr 25, 2026
9dcdf32
server: strip content-encoding/length/transfer-encoding before forwar…
raine Apr 25, 2026
c0a7127
server: redact query-string params in request logs
raine Apr 25, 2026
fda318b
auth: create config directories with 0700 on Linux
raine Apr 25, 2026
8f0590e
log: fix rotation thrashing when rename fails
raine Apr 25, 2026
9ee3b82
keychain: fix bun:ffi Pointer type errors
raine Apr 25, 2026
7258ffe
0.0.7
raine Apr 25, 2026
72878d1
readme: rename consult-llm-mcp to consult-llm in related projects
raine Apr 26, 2026
6f4f58c
sse: log warning when upstream emits invalid json
raine Apr 26, 2026
7f13e88
auth: validate oauth token responses before persisting
raine Apr 26, 2026
fe2f4eb
keychain: throw when SecKeychainItemDelete fails
raine Apr 26, 2026
504ac13
make originator and user-agent configurable via env vars
raine Apr 30, 2026
2cbdb72
make originator and user-agent configurable per provider
raine Apr 30, 2026
2e585cf
readme: document originator and user-agent env vars
raine Apr 30, 2026
8f126fd
set default user-agent for codex to claude-code-proxy/<version>
raine Apr 30, 2026
e83734f
strip v prefix from build version in release workflow
raine Apr 30, 2026
1956d7f
add exponential backoff retry on upstream 429
raine Apr 30, 2026
7a37664
retry: add equal jitter to exponential backoff
raine Apr 30, 2026
4196613
add config.json as alternative to env vars
raine Apr 30, 2026
1a4a437
changelog: add v0.0.8 entry
raine Apr 30, 2026
70729b6
0.0.8
raine Apr 30, 2026
268232a
log active configuration on startup
raine Apr 30, 2026
43f785f
readme: recommend disabling non-streaming fallback
raine Apr 30, 2026
e188a60
rename KIMI_OAUTH_HOST and KIMI_BASE_URL to CCP_ prefix
raine May 3, 2026
b773e32
changelog: add v0.0.9 entry
raine May 3, 2026
bd2ad0e
0.0.9
raine May 3, 2026
972d947
feat(codex): expose local usage endpoint
namredips May 4, 2026
694e1c8
fix(codex): map max effort to xhigh
namredips May 5, 2026
45861bf
chore(codex): log requested effort
namredips May 5, 2026
3281267
feat(codex): add default effort override
namredips May 5, 2026
b779750
feat(gemini): add code assist provider
namredips May 5, 2026
d3ce168
feat(gemini): opt into google one credits
namredips May 5, 2026
480b448
fix(gemini): handle invalid ask user question calls
namredips May 5, 2026
8b936e8
fix(gemini): preserve tool call thought signatures
namredips May 5, 2026
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
48 changes: 24 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
contents: write

env:
BIN_NAME: claude-codex-proxy
BIN_NAME: claude-code-proxy

jobs:
build:
Expand All @@ -26,7 +26,7 @@ jobs:
- target: bun-linux-arm64
platform: linux-arm64
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
Expand All @@ -40,14 +40,14 @@ jobs:
bun build ./src/cli.ts \
--compile \
--target=${{ matrix.target }} \
--define BUILD_VERSION="\"${VERSION}\"" \
--define BUILD_VERSION="\"${VERSION#v}\"" \
--outfile dist/${BIN_NAME}
- name: Package
run: |
archive="${BIN_NAME}-${{ matrix.platform }}.tar.gz"
tar -C dist -czf "$archive" ${BIN_NAME}
shasum -a 256 "$archive" > "${BIN_NAME}-${{ matrix.platform }}.sha256"
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v5
with:
name: ${{ matrix.platform }}
path: |
Expand All @@ -60,7 +60,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
merge-multiple: true
- uses: softprops/action-gh-release@v2
Expand All @@ -75,67 +75,67 @@ jobs:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
merge-multiple: true
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
repository: raine/homebrew-claude-codex-proxy
repository: raine/homebrew-claude-code-proxy
token: ${{ secrets.RELEASE_TOKEN }}
path: tap
- name: Generate formula and push to tap
env:
VERSION: ${{ github.ref_name }}
run: |
VERSION="${VERSION#v}"
SHA_ARM=$(awk '{print $1}' claude-codex-proxy-darwin-arm64.sha256)
SHA_INTEL=$(awk '{print $1}' claude-codex-proxy-darwin-amd64.sha256)
SHA_LINUX_AMD=$(awk '{print $1}' claude-codex-proxy-linux-amd64.sha256)
SHA_LINUX_ARM=$(awk '{print $1}' claude-codex-proxy-linux-arm64.sha256)
SHA_ARM=$(awk '{print $1}' claude-code-proxy-darwin-arm64.sha256)
SHA_INTEL=$(awk '{print $1}' claude-code-proxy-darwin-amd64.sha256)
SHA_LINUX_AMD=$(awk '{print $1}' claude-code-proxy-linux-amd64.sha256)
SHA_LINUX_ARM=$(awk '{print $1}' claude-code-proxy-linux-arm64.sha256)

mkdir -p tap/Formula
cat > tap/Formula/claude-codex-proxy.rb << EOF
class ClaudeCodexProxy < Formula
cat > tap/Formula/claude-code-proxy.rb << EOF
class ClaudeCodeProxy < Formula
desc "Local proxy: Claude Code to ChatGPT subscription via Codex Responses API"
homepage "https://github.com/raine/claude-codex-proxy"
homepage "https://github.com/raine/claude-code-proxy"
version "${VERSION}"
license "MIT"

on_macos do
if Hardware::CPU.arm?
url "https://github.com/raine/claude-codex-proxy/releases/download/v${VERSION}/claude-codex-proxy-darwin-arm64.tar.gz"
url "https://github.com/raine/claude-code-proxy/releases/download/v${VERSION}/claude-code-proxy-darwin-arm64.tar.gz"
sha256 "${SHA_ARM}"
else
url "https://github.com/raine/claude-codex-proxy/releases/download/v${VERSION}/claude-codex-proxy-darwin-amd64.tar.gz"
url "https://github.com/raine/claude-code-proxy/releases/download/v${VERSION}/claude-code-proxy-darwin-amd64.tar.gz"
sha256 "${SHA_INTEL}"
end
end

on_linux do
if Hardware::CPU.arm?
url "https://github.com/raine/claude-codex-proxy/releases/download/v${VERSION}/claude-codex-proxy-linux-arm64.tar.gz"
url "https://github.com/raine/claude-code-proxy/releases/download/v${VERSION}/claude-code-proxy-linux-arm64.tar.gz"
sha256 "${SHA_LINUX_ARM}"
else
url "https://github.com/raine/claude-codex-proxy/releases/download/v${VERSION}/claude-codex-proxy-linux-amd64.tar.gz"
url "https://github.com/raine/claude-code-proxy/releases/download/v${VERSION}/claude-code-proxy-linux-amd64.tar.gz"
sha256 "${SHA_LINUX_AMD}"
end
end

def install
bin.install "claude-codex-proxy"
bin.install "claude-code-proxy"
end

test do
assert_match version.to_s, shell_output("\#{bin}/claude-codex-proxy --version")
assert_match version.to_s, shell_output("\#{bin}/claude-code-proxy --version")
end
end
EOF
sed -i 's/^ //' tap/Formula/claude-codex-proxy.rb
sed -i 's/^ //' tap/Formula/claude-code-proxy.rb

cd tap
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Formula/claude-codex-proxy.rb
git commit -m "claude-codex-proxy ${VERSION}"
git add Formula/claude-code-proxy.rb
git commit -m "claude-code-proxy ${VERSION}"
git pull --rebase
git push
69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Changelog

## v0.0.9 (2026-05-03)

- Kimi debugging overrides now use `CCP_KIMI_OAUTH_HOST` and `CCP_KIMI_BASE_URL`, matching the proxy's `CCP_` environment variable naming.

## v0.0.8 (2026-04-30)

- Added exponential backoff retry on upstream 429 errors, respecting
`Retry-After` headers when present
- Added `config.json` as an alternative to environment variables (read from
`~/.config/claude-code-proxy/config.json` on macOS, XDG-compliant on Linux)
- Made the `originator` and `User-Agent` headers configurable via new env vars
(`CCP_CODEX_ORIGINATOR`, `CCP_CODEX_USER_AGENT`, `CCP_KIMI_USER_AGENT`,
`CCP_ORIGINATOR`, `CCP_USER_AGENT`) and the config file
- Codex now sends a default `User-Agent: claude-code-proxy/<version>` header

## v0.0.7 (2026-04-25)

- Some security hardening inspired by [#5](https://github.com/raine/claude-code-proxy/pull/5)

## v0.0.6 (2026-04-25)

- Added support for `gpt-5.5`, and `opus`/`claude-opus-4-7` aliases now map to
`gpt-5.5` instead of `gpt-5.4`
- Model names with a `[1m]` context suffix (e.g. `gpt-5.4[1m]`) are now
accepted and stripped before routing, so Claude Code's larger-context model
variants work without errors
- Documented how to switch between the proxy and direct Anthropic in the README

## v0.0.5 (2026-04-22)

- Added `CCP_CODEX_MODEL` and `CCP_CODEX_EFFORT` environment variables to
override the model and reasoning effort for Codex requests
([#2](https://github.com/raine/claude-code-proxy/pull/2))
- Added `claude-sonnet-4-6` and additional model aliases so more Claude-style
model names resolve correctly
- Improved request logging with usage summaries, time-to-first-byte metrics, and
stream completion details for easier debugging
- Client disconnections during streaming are now handled gracefully

## v0.0.4 (2026-04-20)

- Kimi: reasoning content is now preserved across turns as Anthropic thinking
blocks, so Claude Code sees the model's thinking and multi-turn reasoning
stays coherent
- Kimi: thinking is always enabled

## v0.0.3 (2026-04-20)

- Renamed to `claude-code-proxy` to reflect multi-provider support
- Added Kimi (kimi.com) as a provider, with device-code login via the install
script and support for Kimi's chat models
- Requests are now routed to providers based on the requested model, so a single
proxy can serve both Codex and Kimi models simultaneously
- Improved token counting accuracy and fixed cached token usage reporting
- Added MIT license

## v0.0.2 (2026-04-19)

- Accept Claude-style model aliases (`haiku`, `sonnet`, `opus`, and `claude-*`
names), resolving them to the appropriate upstream model so portable configs
and subagents work without edits
- Fix malformed streamed Read tool arguments that Claude Code would reject when
upstream emitted an empty `pages` field

## v0.0.1 (2026-04-19)

Initial release.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Raine Virta

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading