Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
515c598
refactor: major architecture overhaul for plugin-based system
CaddyGlow Sep 19, 2025
85d0757
refactor: LLM formatters for OpenAI Responses streaming support
CaddyGlow Sep 27, 2025
7a47238
docs: update CHANGELOG and README for v0.2.0 plugin architecture release
CaddyGlow Sep 27, 2025
9cefb4c
feat: add auth refresh command, improve plugin management, and fix to…
CaddyGlow Sep 27, 2025
dbd953c
feat: enhance streaming formatters with accumulator support and messa…
CaddyGlow Sep 28, 2025
5e41a2d
feat: enhance streaming formatters with accumulator support and messa…
CaddyGlow Sep 28, 2025
58d346a
Merge remote-tracking branch 'refs/remotes/origin/dev/v0.2' into dev/…
CaddyGlow Sep 29, 2025
9e44f24
feat(auth): add proactive token refresh, credential balancer plugin, …
CaddyGlow Sep 30, 2025
9385caf
refactor: formatter
CaddyGlow Sep 30, 2025
0d2acce
feat: add credential balancer plugin with proactive token refresh and…
CaddyGlow Sep 30, 2025
8eda597
test(fixtures): optimize test performance with session-scoped fixture…
CaddyGlow Sep 30, 2025
7f20947
feat: add credential balancer plugin with proactive token refresh and…
CaddyGlow Sep 30, 2025
f155918
Merge branch 'backup/dev/v0.2-20250930-202026' into dev/v0.2
CaddyGlow Sep 30, 2025
d6fd694
feat(cli): add generic settings introspection and improve config display
CaddyGlow Sep 30, 2025
0214ef4
docs: add credential balancer plugin documentation and doc tooling
CaddyGlow Sep 30, 2025
2a5ac17
style: remove trailing whitespace in Makefile
CaddyGlow Sep 30, 2025
98963c2
fix(credential_balancer): remove file-backed credentials, require
CaddyGlow Sep 30, 2025
b98f2c1
refactor(auth): replace aiohttp with uvicorn for OAuth callback server
CaddyGlow Oct 1, 2025
c1dd3fa
refactor(auth): improve error handling and logging for credential fai…
CaddyGlow Oct 1, 2025
900dced
docs(readme): add uvx and pipx installation instructions for dev branch
CaddyGlow Oct 1, 2025
5629a7f
refactor(hooks): rename PROVIDER_REQUEST_SENT to PROVIDER_REQUEST_PRE…
CaddyGlow Oct 1, 2025
e330dfb
feat(plugins): add max_tokens plugin with automatic token limit enfor…
CaddyGlow Oct 1, 2025
243fe97
refactor(plugins): exclude ccproxy/plugins from filesystem discovery
CaddyGlow Oct 1, 2025
5c30feb
refactor(deps): add plugin-based optional dependencies
CaddyGlow Oct 1, 2025
1663cb0
refactor(auth): consolidate conditional auth into dependencies module
CaddyGlow Oct 1, 2025
89c4be9
feat(plugins): add credential_balancer plugin entry point
CaddyGlow Oct 1, 2025
02be569
test(plugins): explicitly set enabled_plugins in integration tests
CaddyGlow Oct 1, 2025
dc3379e
chore(deps): update Claude Code SDK to Claude Agent SDK
CaddyGlow Oct 1, 2025
def4add
chore(fix): codex detection service outside a git repo
CaddyGlow Oct 1, 2025
d49be0e
chore(config): remove access_log from default enabled plugins
CaddyGlow Oct 1, 2025
493f703
chore(config): add oauth_codex and oauth_claude to default enabled
CaddyGlow Oct 1, 2025
585ea9d
feat(config): add TOML and env config generators from Pydantic models
CaddyGlow Oct 2, 2025
2e078f5
chore(plugins): standardize all plugin versions to 0.1.0
CaddyGlow Oct 2, 2025
b5ef008
test: replace global task_manager autouse with explicit module fixtures
CaddyGlow Oct 2, 2025
eb4cdcd
feat(plugins): add credential_balancer plugin documentation
CaddyGlow Oct 2, 2025
71b837e
feat(max_tokens): add enforce mode
CaddyGlow Oct 2, 2025
091b8e4
refactor(logging): reduce verbosity by downgrading info logs to debug
CaddyGlow Oct 2, 2025
64751b4
fix(hooks): replace sleep with ready event in BackgroundHookThreadMan…
CaddyGlow Oct 2, 2025
8c9e0dc
feat(plugins): add auth manager guard checks for Claude API, Codex, a…
CaddyGlow Oct 2, 2025
38b36e6
fix(codex): remove temperature parameter and refactor unsupported key…
CaddyGlow Oct 2, 2025
e9da665
feat(version): add branch-based update checking for dev versions
CaddyGlow Oct 2, 2025
8b8057a
refactor(request_tracer): migrate HTTP tracing from app.py to plugin …
CaddyGlow Oct 2, 2025
86b6118
refactor(logging): reduce log noise by adjusting default level to WAR…
CaddyGlow Oct 2, 2025
55f3dfb
refactor(copilot): improve token expiration handling and cleanup redu…
CaddyGlow Oct 2, 2025
55c157a
refactor(tests): enable strict mypy type checking across all test mod…
CaddyGlow Oct 2, 2025
e24fcae
refactor(config): improve config init with smart plugin defaults and fix
CaddyGlow Oct 2, 2025
db14c5a
refactor(codex): remove unused fallback headers file and streamline d…
CaddyGlow Oct 2, 2025
1c5fb87
refactor(access_log): simplify initialization and reduce log noise
CaddyGlow Oct 2, 2025
d74ebb1
refactor(tests): improve type ignore comment placement and property a…
CaddyGlow Oct 2, 2025
f64df46
chore: gitignore local .ccproxy.toml and reduce log noise
CaddyGlow Oct 2, 2025
191a8c2
chore: remove empty unlock.py file
CaddyGlow Oct 3, 2025
d6f4347
docs: add README files for all plugins with configuration examples
CaddyGlow Oct 3, 2025
cdaa6d2
refactor: standardize Makefile with dependency groups and UV variable…
CaddyGlow Oct 3, 2025
c66e74e
refactor(cli): remove unused claude command and simplify serve module
CaddyGlow Oct 3, 2025
cc0202a
perf(tests): optimize integration tests for faster CI execution
CaddyGlow Oct 3, 2025
eb04a41
docs: update installation instructions and add new documentation
CaddyGlow Oct 4, 2025
27473a5
test(metrics): accept updated Prometheus content-type
CaddyGlow Oct 4, 2025
19454bc
refactor(deps): migrate to UV dependency groups with include-group pa…
CaddyGlow Oct 16, 2025
164e1ac
refactor(models): simplify cached_at field definition in cache data m…
CaddyGlow Oct 16, 2025
47e8de8
chore(monitoring): remove commented ccproxy service from docker-compo…
CaddyGlow Oct 16, 2025
5286792
chore(nix): add SSL certificate configuration for HTTPS clients
CaddyGlow Oct 16, 2025
4e2a440
docs(references): update internal links to use GitHub URLs and fix br…
CaddyGlow Oct 16, 2025
96b9c85
refactor(api): extract format validation into dedicated module and im…
CaddyGlow Oct 16, 2025
00ad62c
refactor(http_adapter): clarify streaming format chain is handled ups…
CaddyGlow Oct 16, 2025
4a340d3
test(plugins): add detection service fallback tests for claude and codex
CaddyGlow Oct 16, 2025
e864452
refactor(copilot): enhance token snapshot with copilot_access detecti…
CaddyGlow Oct 16, 2025
b42f234
test(plugins): strengthen detection service fallback tests and remove…
CaddyGlow Oct 16, 2025
da0ecf6
chore(nix): consolidate flake into nix/ directory and remove devenv
CaddyGlow Oct 16, 2025
0856d3c
docs: replace Makefile with Taskfile across all documentation
CaddyGlow Oct 16, 2025
cfa5ed7
docs: reorganize documentation structure and add gitignore entries
CaddyGlow Oct 16, 2025
7ab466c
chore(taskfile): expand clean task to remove additional build artifacts
CaddyGlow Oct 16, 2025
cf10ed3
docs: remove completed release tracking and refactoring documents
CaddyGlow Oct 17, 2025
3c69757
chore(logging): reduce verbosity by downgrading info logs to debug level
CaddyGlow Oct 17, 2025
427fea7
feat(logging): add structured request lifecycle and SSE connection tr…
CaddyGlow Oct 18, 2025
bb7171d
feat(ci): add Python build/release chain with PyOxidizer
CaddyGlow Oct 26, 2025
aad4701
feat(claude): add models and temp guard
CaddyGlow Nov 7, 2025
a5bd172
fix(streaming): tool calls and race conditions for SDK mode
Jan 4, 2026
99c4da7
refactor: cleanup per code audit
Jan 4, 2026
6739d17
Merge pull request #31 from saxyguy81/fix/tool-call-streaming-dev-v0.2
CaddyGlow Jan 4, 2026
e4eac2d
fix(claude_api): remove null temperature fields
CaddyGlow Jan 4, 2026
bb19184
test: tighten tool streaming typing
CaddyGlow Jan 4, 2026
8026b59
docs: add v0.2.0a3 changelog and cleanup duplicates
CaddyGlow Jan 4, 2026
5174b1a
chore(ci): simplify workflow config
CaddyGlow Jan 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 10 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ ANTHROPIC_API_KEY=your_anthropic_api_key_here
# Optional: Server Configuration
HOST=0.0.0.0
PORT=8000
LOG_LEVEL=INFO

# Optional: Logging Configuration (centralized)
LOGGING__LEVEL=INFO
LOGGING__FORMAT=auto
LOGGING__FILE=/tmp/ccproxy/ccproxy.log
LOGGING__VERBOSE_API=false
LOGGING__PLUGIN_LOG_BASE_DIR=/tmp/ccproxy

# Optional: Security Configuration
CLAUDE_USER=claude
Expand All @@ -27,5 +33,6 @@ RATE_LIMIT_WINDOW=60
# Optional: Request Timeout
REQUEST_TIMEOUT=300

# Optional: CORS Origins (comma-separated)
CORS_ORIGINS=*
# Optional: CORS Origins (comma-separated, avoid using '*' for security)
# Examples: http://localhost:3000,https://app.example.com
CORS_ORIGINS=http://localhost:3000,http://localhost:8080,http://127.0.0.1:3000,http://127.0.0.1:8080
16 changes: 8 additions & 8 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "tests/**"
- "pyproject.toml"
- "uv.lock"
- "Makefile"
- "Taskfile"
- ".github/workflows/backend.yml"
pull_request:
branches: [main, dev]
Expand All @@ -17,7 +17,7 @@ on:
- "tests/**"
- "pyproject.toml"
- "uv.lock"
- "Makefile"
- "Taskfile"
- ".github/workflows/backend.yml"
workflow_dispatch:

Expand All @@ -39,7 +39,7 @@ jobs:
run: uv python install

- name: Install dependencies
run: make dev-install
run: ./Taskfile dev-install

- name: Cache mypy
uses: actions/cache@v4
Expand All @@ -50,7 +50,7 @@ jobs:
mypy-${{ runner.os }}-

- name: Run quality checks
run: make check
run: ./Taskfile check

tests:
runs-on: ubuntu-latest
Expand All @@ -74,10 +74,10 @@ jobs:
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: make dev-install
run: ./Taskfile dev-install

- name: Run unit tests
run: make test-unit
run: ./Taskfile test-unit

- name: Upload coverage reports
if: matrix.python-version == '3.11'
Expand Down Expand Up @@ -106,10 +106,10 @@ jobs:
run: uv python install

- name: Install dependencies
run: make dev-install
run: ./Taskfile dev-install

- name: Test package build
run: make build-backend
run: ./Taskfile build-backend

- name: Verify CLI installation
run: |
Expand Down
72 changes: 41 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,53 @@ name: CI

on:
push:
branches: [main, develop]
branches: [main, dev]
pull_request:
branches: [main, develop]
branches: [main, dev]

jobs:
test:
lint:
name: Lint (ruff)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2

- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: make dev-install

- name: Run CI pipeline
run: make ci

- name: Build documentation
run: make docs-build

- name: Upload coverage reports
uses: codecov/codecov-action@v4
- name: Set up Python
run: uv python install
- name: Install deps
run: ./Taskfile dev-install
- name: Ruff check
run: ./Taskfile lint

typecheck:
name: Typecheck (mypy)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Set up Python
run: uv python install
- name: Install deps
run: ./Taskfile dev-install
- name: mypy
run: ./Taskfile typecheck

tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
enable-cache: true
- name: Set up Python
run: uv python install
- name: Install deps
run: ./Taskfile dev-install
- name: Run unit tests (no network)
run: ./Taskfile test-unit
68 changes: 68 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build Distribution Packages

on:
# Trigger after Python CI workflow completes successfully and releases are created
workflow_run:
workflows: ["Python CI"]
types:
- completed
branches:
- main

# Allow manual triggering
workflow_dispatch:
inputs:
version:
description: 'Version to build (without v prefix, e.g., 0.1.4)'
required: true
type: string

permissions:
contents: write

jobs:
# Build Alpine Linux packages (.apk for x86_64 and aarch64)
alpine:
# Only run if CI completed successfully and was triggered by a tag push
if: |
github.event_name == 'workflow_dispatch' ||
(github.event.workflow_run.conclusion == 'success' &&
startsWith(github.event.workflow_run.head_branch, 'v'))
uses: CaddyGlow/homebrew-packages/.github/workflows/package-alpine.yml@main
permissions:
contents: write
with:
tool: ccproxy
version: ${{ github.event.inputs.version || github.event.workflow_run.head_branch }}
repository: ${{ github.repository }}
release_tag: ${{ github.event.inputs.version && format('v{0}', github.event.inputs.version) || github.event.workflow_run.head_branch }}

# Build Debian/Ubuntu packages (.deb for amd64 and arm64)
debian:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event.workflow_run.conclusion == 'success' &&
startsWith(github.event.workflow_run.head_branch, 'v'))
uses: CaddyGlow/homebrew-packages/.github/workflows/package-debian.yml@main
permissions:
contents: write
with:
tool: ccproxy
version: ${{ github.event.inputs.version || github.event.workflow_run.head_branch }}
repository: ${{ github.repository }}
release_tag: ${{ github.event.inputs.version && format('v{0}', github.event.inputs.version) || github.event.workflow_run.head_branch }}

# Build Termux/Android packages (.deb for android-aarch64)
termux:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event.workflow_run.conclusion == 'success' &&
startsWith(github.event.workflow_run.head_branch, 'v'))
uses: CaddyGlow/homebrew-packages/.github/workflows/package-termux.yml@main
permissions:
contents: write
with:
tool: ccproxy
version: ${{ github.event.inputs.version || github.event.workflow_run.head_branch }}
repository: ${{ github.repository }}
release_tag: ${{ github.event.inputs.version && format('v{0}', github.event.inputs.version) || github.event.workflow_run.head_branch }}
67 changes: 67 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Python CI

on:
push:
branches: [ "main", "dev", "dev/**" ]
tags: [ "v*" ]
pull_request:
workflow_dispatch:
inputs:
ref:
description: 'Git ref (branch, tag, or SHA) to build'
required: false
type: string
default: ''
target_preset:
description: 'Target preset to build'
required: false
type: choice
options:
- all
- windows
- linux
- macos
default: 'all'
skip_tests:
description: 'Skip tests'
required: false
type: boolean
default: false

permissions:
contents: write

jobs:
test:
if: ${{ !inputs.skip_tests && github.event_name != 'push' || github.ref_type != 'tag' }}
uses: CaddyGlow/homebrew-packages/.github/workflows/python-test.yml@main
with:
ref: ${{ inputs.ref || '' }}
python_version: '3.11'

build:
needs: [test]
if: |
always() &&
!cancelled() &&
(needs.test.result == 'success' || needs.test.result == 'skipped') &&
(startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch')
uses: CaddyGlow/homebrew-packages/.github/workflows/python-build.yml@main
with:
ref: ${{ inputs.ref || '' }}
binary_name: ccproxy
entry_point: 'ccproxy.cli.main:main'
assets: '["README.md", "LICENSE"]'
target_preset: ${{ inputs.target_preset || 'all' }}
python_version: '3.11'

release:
needs: [build]
if: |
always() &&
!cancelled() &&
needs.build.result == 'success' &&
(startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && startsWith(inputs.ref, 'v')))
uses: CaddyGlow/homebrew-packages/.github/workflows/python-release.yml@main
with:
ref: ${{ inputs.ref || '' }}
59 changes: 59 additions & 0 deletions .github/workflows/release-from-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Create Release from Workflow Run

on:
workflow_dispatch:
inputs:
run_id:
description: 'Workflow run ID to get artifacts from (check Actions tab)'
required: true
type: string
tag:
description: 'Tag name for the release (e.g., v0.1.3)'
required: true
type: string
draft:
description: 'Create as draft release'
required: false
type: boolean
default: false
prerelease:
description: 'Mark as pre-release'
required: false
type: boolean
default: false

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Download artifacts from run
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Downloading artifacts from run ${{ inputs.run_id }}..."
gh run download ${{ inputs.run_id }} --repo ${{ github.repository }} --dir artifacts

echo "Downloaded artifacts:"
ls -R artifacts/

- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag }}
files: artifacts/**/*
draft: ${{ inputs.draft }}
prerelease: ${{ inputs.prerelease }}
generate_release_notes: true
make_latest: true
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Summary
run: |
echo "Release created/updated for tag: ${{ inputs.tag }}"
echo "Artifacts from run: ${{ inputs.run_id }}"
echo "View release: https://github.com/${{ github.repository }}/releases/tag/${{ inputs.tag }}"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: uv python install 3.12

- name: Install dependencies
run: make dev-install
run: make dev_install

- name: Run tests
run: make ci
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,8 @@ ccproxy/static/dashboard/

*.wal
*.duckdb
.lazy.lua
.ccproxy.toml

make
run
Loading
Loading