Skip to content

fix: strip empty messages on OpenAI->Claude translation#293

Closed
KooshaPari wants to merge 671 commits intorouter-for-me:mainfrom
KooshaPari:feat/clean-base-1698-strip-empty-messages
Closed

fix: strip empty messages on OpenAI->Claude translation#293
KooshaPari wants to merge 671 commits intorouter-for-me:mainfrom
KooshaPari:feat/clean-base-1698-strip-empty-messages

Conversation

@KooshaPari
Copy link
Copy Markdown

Cherry-picks commit e9b1201 from merge/1698 branch onto a plus-main-compatible base in cliproxyapi++. Prevents empty text parts from being forwarded as blank content during OpenAI-to-Claude message conversion.

KooshaPari and others added 30 commits February 22, 2026 21:59
fix: resolve executor compile regressions
…-20260223

chore: merge remaining branch deltas (dependabot + CP2K queue docs)
Build Fixes:
- Fix duplicate type definitions in kiro_websearch_handler.go (McpRequest, McpResponse, WebSearchResults)
- Fix undefined authID and wsURL variables in codex_websockets_executor.go by naming parameters
- Remove unused imports (crypto/sha256, encoding/hex) from codex_websockets_executor.go
- Add missing syscall import to cmd/cliproxyctl/main.go for error handling
- Remove incomplete showConfigPaths block from cmd/server/main.go (undefined functions)
- Remove unused strings import from copilot/token_test.go

Track 1.2 - ACP Adapter:
- Implement ACP adapter to translate Claude/OpenAI protocol messages to ACP protocol
- Add acp_request.go: Request translation and validation
- Add acp_response.go: Response translation and formatting
- Add acp_adapter.go: Main adapter logic with registry integration
- Add unit tests in acp_adapter_registry_test.go

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chore: merge ci-compile-fix-clean-single lane closeout and fixes
KooshaPari and others added 26 commits February 24, 2026 23:00
…chestration

feat: Integrate benchmarks into ParetoRouter
# Conflicts:
#	.gitignore
#	.worktrees/config/m/config-build/active/pkg/llmproxy/config/config.go
#	.worktrees/config/m/config-build/active/pkg/llmproxy/config/oauth_model_alias_migration.go
#	README.md
chore: merge full-sdk type unification (layer 3)
chore: merge full-sdk/test-cleanup stack into main
…type

- Fixed missing closing brace in for loop
- Changed return type from string to bool for proper if statement usage
- Updated caller to use boolean check
- Fix unused sync/atomic import in kiro_websearch_handler.go
- Fix handlers_metadata_test.go to use correct gin context key
- Remove broken test files with undefined symbols

Testing: Build PASS, Vet PASS, Tests PASS
Cherry-picked from merge/1698-strip-empty-messages-openai-to-claude into aligned base
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @KooshaPari, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request represents a significant foundational update to the cliproxyapi++ project. It establishes a robust development and deployment ecosystem by introducing extensive CI/CD pipelines, developer tooling, and comprehensive API definitions. The changes lay the groundwork for improved maintainability, automation, and expanded provider support, effectively re-baselining the project's core infrastructure. While the title suggests a specific fix, the scope of changes is much broader, focusing on project-wide enhancements.

Highlights

  • Project Infrastructure & CI/CD: Introduced comprehensive CI/CD configurations including GitHub Actions workflows for CodeQL, Docker image builds, SDK generation, PR path guards, and release processes. Added Dependabot for dependency updates and GolangCI-Lint for code quality.
  • Developer Tooling & Automation: Implemented a new cliproxyctl CLI tool for managing the proxy, along with boardsync for project planning and releasebatch for release automation. A Taskfile.yml was added to unify build, test, and quality checks.
  • API Definition & Management: A new OpenAPI specification (openapi.yaml) was added, defining the API gateway's endpoints. Extensive management API handlers were introduced for configuration, authentication files, logs, OAuth sessions, and usage statistics.
  • Documentation & Examples: Added detailed documentation covering contributing guidelines, security policy, and multi-language READMEs. New examples were provided for custom providers, HTTP requests, and deployment with launchd, process-compose, and systemd.
  • Core Logic & OAuth Enhancements: Integrated new internal modules for access control, OAuth handling for various providers (Anthropic, Gemini, Codex, Kiro, Kimi, Qwen, iFlow, Antigravity, GitHub Copilot), and enhanced request/response logging middleware.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .github/code-scanning/suppressions.md
    • Added code scanning suppressions for known acceptable patterns.
  • .github/dependabot.yml
    • Added Dependabot configuration for automated dependency updates.
  • .github/policies/approved-external-endpoints.txt
    • Added a policy file listing approved external endpoint hosts.
  • .github/release-required-checks.txt
    • Added configuration for release-specific required CI checks.
  • .github/required-checks.txt
    • Added configuration for general required CI checks.
  • .github/scripts/check-approved-external-endpoints.sh
    • Added a script to verify external endpoints against an approved list.
  • .github/scripts/check-distributed-critical-paths.sh
    • Added a script to validate distributed critical paths through targeted Go tests.
  • .github/scripts/check-docs-secret-samples.sh
    • Added a script to check documentation for potential secret samples.
  • .github/scripts/check-open-items-fragmented-parity.sh
    • Added a script to ensure parity in fragmented open-items reports.
  • .github/scripts/check-phase-doc-placeholder-tokens.sh
    • Added a script to reject unresolved placeholder tokens in planning reports.
  • .github/scripts/check-workflow-token-permissions.sh
    • Added a script to verify GitHub Actions workflow token permissions.
  • .github/scripts/release-lint.sh
    • Added a script to validate release-facing configuration examples and documentation snippets.
  • .github/scripts/tests/check-lane-f2-cpb-0691-0700.sh
    • Added a test script for lane F2 CPB items.
  • .github/scripts/tests/check-open-items-fragmented-parity-test.sh
    • Added a test script for the open-items fragmented parity check.
  • .github/scripts/tests/check-wave80-lane-d-cpb-0556-0610.sh
    • Added a test script for wave 80 lane D CPB items.
  • .github/scripts/tests/check-wave80-lane-e-cpb-0581-0590.sh
    • Added a test script for wave 80 lane E CPB items.
  • .github/scripts/tests/check-wave80-lane-f-cpb-0546-0555.sh
    • Added a test script for wave 80 lane F CPB items.
  • .github/scripts/tests/fixtures/open-items-parity/fail-missing-status.md
    • Added a test fixture for missing status in open-items parity.
  • .github/scripts/tests/fixtures/open-items-parity/fail-status-partial.md
    • Added a test fixture for partial status in open-items parity.
  • .github/scripts/tests/fixtures/open-items-parity/pass-hash-status-done.md
    • Added a test fixture for done status in open-items parity.
  • .github/scripts/tests/fixtures/open-items-parity/pass-status-implemented.md
    • Added a test fixture for implemented status in open-items parity.
  • .github/workflows/ci-rerun-flaky.yml
    • Added a GitHub Actions workflow to rerun flaky CI jobs.
  • .github/workflows/codeql.yml
    • Added a GitHub Actions workflow for CodeQL analysis.
  • .github/workflows/docker-image.yml
    • Added a GitHub Actions workflow for building and pushing Docker images.
  • .github/workflows/generate-sdks.yaml
    • Added a GitHub Actions workflow to generate Python and TypeScript SDKs.
  • .github/workflows/pr-path-guard.yml
    • Added a GitHub Actions workflow to guard against changes in restricted paths.
  • .github/workflows/pr-test-build.yml
    • Added a GitHub Actions workflow for pull request test builds.
  • .github/workflows/release-batch.yaml
    • Added a GitHub Actions workflow for creating batch releases.
  • .github/workflows/release.yaml
    • Added a GitHub Actions workflow for GoReleaser-based releases.
  • .github/workflows/required-check-names-guard.yml
    • Added a GitHub Actions workflow to verify required check names.
  • .github/workflows/vitepress-pages.yml
    • Added a GitHub Actions workflow for building and deploying VitePress documentation pages.
  • .golangci.yml
    • Added GolangCI-Lint configuration.
  • .pre-commit-config.yaml
    • Added pre-commit hooks for code quality checks.
  • .worktrees/config/m/config-build/active/.dockerignore
    • Added a Docker ignore file for build contexts.
  • .worktrees/config/m/config-build/active/.env.example
    • Added an example environment configuration file.
  • .worktrees/config/m/config-build/active/.github/FUNDING.yml
    • Added GitHub funding configuration.
  • .worktrees/config/m/config-build/active/.github/ISSUE_TEMPLATE/bug_report.md
    • Added a bug report issue template.
  • .worktrees/config/m/config-build/active/.github/dependabot.yml
    • Added Dependabot configuration.
  • .worktrees/config/m/config-build/active/.github/policies/approved-external-endpoints.txt
    • Added approved external endpoints policy.
  • .worktrees/config/m/config-build/active/.github/release-required-checks.txt
    • Added release required checks.
  • .worktrees/config/m/config-build/active/.github/required-checks.txt
    • Added required checks.
  • .worktrees/config/m/config-build/active/.github/scripts/check-approved-external-endpoints.sh
    • Added script to check approved external endpoints.
  • .worktrees/config/m/config-build/active/.github/scripts/check-distributed-critical-paths.sh
    • Added script to check distributed critical paths.
  • .worktrees/config/m/config-build/active/.github/scripts/check-docs-secret-samples.sh
    • Added script to check docs for secret samples.
  • .worktrees/config/m/config-build/active/.github/scripts/check-open-items-fragmented-parity.sh
    • Added script to check open items fragmented parity.
  • .worktrees/config/m/config-build/active/.github/scripts/check-phase-doc-placeholder-tokens.sh
    • Added script to check phase doc placeholder tokens.
  • .worktrees/config/m/config-build/active/.github/scripts/check-workflow-token-permissions.sh
    • Added script to check workflow token permissions.
  • .worktrees/config/m/config-build/active/.github/scripts/release-lint.sh
    • Added release lint script.
  • .worktrees/config/m/config-build/active/.github/scripts/tests/check-lane-f2-cpb-0691-0700.sh
    • Added test script for lane F2 CPB items.
  • .worktrees/config/m/config-build/active/.github/scripts/tests/check-open-items-fragmented-parity-test.sh
    • Added test script for open items fragmented parity.
  • .worktrees/config/m/config-build/active/.github/scripts/tests/check-wave80-lane-d-cpb-0556-0610.sh
    • Added test script for wave 80 lane D CPB items.
  • .worktrees/config/m/config-build/active/.github/scripts/tests/check-wave80-lane-e-cpb-0581-0590.sh
    • Added test script for wave 80 lane E CPB items.
  • .worktrees/config/m/config-build/active/.github/scripts/tests/check-wave80-lane-f-cpb-0546-0555.sh
    • Added test script for wave 80 lane F CPB items.
  • .worktrees/config/m/config-build/active/.github/scripts/tests/fixtures/open-items-parity/fail-missing-status.md
    • Added test fixture for missing status.
  • .worktrees/config/m/config-build/active/.github/scripts/tests/fixtures/open-items-parity/fail-status-partial.md
    • Added test fixture for partial status.
  • .worktrees/config/m/config-build/active/.github/scripts/tests/fixtures/open-items-parity/pass-hash-status-done.md
    • Added test fixture for hash status done.
  • .worktrees/config/m/config-build/active/.github/scripts/tests/fixtures/open-items-parity/pass-status-implemented.md
    • Added test fixture for implemented status.
  • .worktrees/config/m/config-build/active/.github/workflows/ci-rerun-flaky.yml
    • Added CI rerun flaky workflow.
  • .worktrees/config/m/config-build/active/.github/workflows/codeql.yml
    • Added CodeQL workflow.
  • .worktrees/config/m/config-build/active/.github/workflows/docker-image.yml
    • Added Docker image workflow.
  • .worktrees/config/m/config-build/active/.github/workflows/generate-sdks.yaml
    • Added generate SDKs workflow.
  • .worktrees/config/m/config-build/active/.github/workflows/pr-path-guard.yml
    • Added PR path guard workflow.
  • .worktrees/config/m/config-build/active/.github/workflows/pr-test-build.yml
    • Added PR test build workflow.
  • .worktrees/config/m/config-build/active/.github/workflows/release-batch.yaml
    • Added release batch workflow.
  • .worktrees/config/m/config-build/active/.github/workflows/release.yaml
    • Added release workflow.
  • .worktrees/config/m/config-build/active/.github/workflows/required-check-names-guard.yml
    • Added required check names guard workflow.
  • .worktrees/config/m/config-build/active/.github/workflows/vitepress-pages.yml
    • Added VitePress pages workflow.
  • .worktrees/config/m/config-build/active/.gitignore
    • Added a comprehensive git ignore file.
  • .worktrees/config/m/config-build/active/.golangci.yml
    • Added GolangCI-Lint configuration.
  • .worktrees/config/m/config-build/active/.goreleaser.yml
    • Added GoReleaser configuration for cross-platform builds.
  • .worktrees/config/m/config-build/active/.pre-commit-config.yaml
    • Added pre-commit configuration.
  • .worktrees/config/m/config-build/active/CHANGELOG.md
    • Updated changelog with merge conflict markers, indicating a rebase or merge operation.
  • .worktrees/config/m/config-build/active/CONTRIBUTING.md
    • Added contributing guidelines including information on bug reporting, enhancements, pull requests, and project governance.
  • .worktrees/config/m/config-build/active/Dockerfile
    • Added a Dockerfile for building the CLIProxyAPIPlus server image.
  • .worktrees/config/m/config-build/active/LICENSE
    • Added the MIT License file.
  • .worktrees/config/m/config-build/active/README.md
    • Added the main English README file, detailing project differences, new features, deployment, and contribution guidelines.
  • .worktrees/config/m/config-build/active/README_CN.md
    • Added the Chinese version of the README file.
  • .worktrees/config/m/config-build/active/README_FA.md
    • Added the Farsi version of the README file.
  • .worktrees/config/m/config-build/active/SECURITY.md
    • Added a security policy document, including supported versions, vulnerability reporting, and hardening measures.
  • .worktrees/config/m/config-build/active/Taskfile.yml
    • Added a Taskfile for unified build, test, and management commands.
  • .worktrees/config/m/config-build/active/api/openapi.yaml
    • Added an OpenAPI 3.0.0 specification for the CLIProxyAPI Plus.
  • .worktrees/config/m/config-build/active/cliproxyctl/main.go
    • Added the cliproxyctl CLI tool for setup, login, and doctor commands.
  • .worktrees/config/m/config-build/active/cliproxyctl/main_test.go
    • Added tests for the cliproxyctl CLI tool.
  • .worktrees/config/m/config-build/active/cmd/boardsync/main.go
    • Added a command-line tool for synchronizing GitHub issues, PRs, and discussions into a planning board.
  • .worktrees/config/m/config-build/active/cmd/cliproxyctl/main.go
    • Added the main entry point for the cliproxyctl CLI tool, including provider-specific login functions and a doctor command.
  • .worktrees/config/m/config-build/active/cmd/cliproxyctl/main_test.go
    • Added comprehensive tests for the cliproxyctl CLI tool, covering JSON response shapes, config creation, and provider alias normalization.
  • .worktrees/config/m/config-build/active/cmd/codegen/main.go
    • Added a code generation tool for creating Go configuration and synthesizer files from provider specifications.
  • .worktrees/config/m/config-build/active/cmd/releasebatch/main.go
    • Added a command-line tool for creating and managing batch releases and release notes.
  • .worktrees/config/m/config-build/active/cmd/releasebatch/main_test.go
    • Added tests for the release batch tool, including version tag parsing and changelog generation.
  • .worktrees/config/m/config-build/active/cmd/server/config_path.go
    • Added logic for resolving the default configuration file path for the server.
  • .worktrees/config/m/config-build/active/cmd/server/config_path_test.go
    • Added tests for the server's configuration path resolution logic.
  • .worktrees/config/m/config-build/active/cmd/server/config_validate.go
    • Added strict configuration file validation logic for the server.
  • .worktrees/config/m/config-build/active/cmd/server/config_validate_test.go
    • Added tests for the server's configuration validation logic.
  • .worktrees/config/m/config-build/active/cmd/server/main.go
    • Added the main entry point for the CLI Proxy API server, including flag parsing, environment variable loading, and service startup logic.
  • .worktrees/config/m/config-build/active/config.example.yaml
    • Added an example configuration file with detailed settings for server, management, authentication, and various AI providers.
  • .worktrees/config/m/config-build/active/contracts/cliproxyctl-response.schema.json
    • Added a JSON schema for cliproxyctl command responses.
  • .worktrees/config/m/config-build/active/docker-build.ps1
    • Added a PowerShell script for building and running Docker containers on Windows.
  • .worktrees/config/m/config-build/active/docker-build.sh
    • Added a Bash script for building and running Docker containers on Linux/macOS, including usage statistics preservation.
  • .worktrees/config/m/config-build/active/docker-compose.yml
    • Added a Docker Compose configuration for deploying the CLIProxyAPIPlus service.
  • .worktrees/config/m/config-build/active/docker-init.sh
    • Added a Docker entrypoint script to handle initialization tasks and environment variable overrides.
  • .worktrees/config/m/config-build/active/examples/custom-provider/main.go
    • Added an example demonstrating how to create and integrate a custom AI provider executor.
  • .worktrees/config/m/config-build/active/examples/http-request/main.go
    • Added an example showing how to use the coreauth.Manager for authenticated HTTP requests.
  • .worktrees/config/m/config-build/active/examples/launchd/com.router-for-me.cliproxyapi-plusplus.plist
    • Added a launchd plist example for macOS service management.
  • .worktrees/config/m/config-build/active/examples/process-compose.dev.yaml
    • Added a development Process Compose profile for local server management.
  • .worktrees/config/m/config-build/active/examples/process-compose.yaml
    • Added a production Process Compose profile for server deployment.
  • .worktrees/config/m/config-build/active/examples/systemd/cliproxyapi-plusplus.env
    • Added an example environment file for systemd service configuration.
  • .worktrees/config/m/config-build/active/examples/systemd/cliproxyapi-plusplus.service
    • Added a systemd service unit file example for Linux service management.
  • .worktrees/config/m/config-build/active/examples/translator/main.go
    • Added an example demonstrating the use of the SDK translator for request/response transformations.
  • .worktrees/config/m/config-build/active/examples/windows/cliproxyapi-plusplus-service.ps1
    • Added a PowerShell script for managing the CLIProxyAPIPlus service on Windows.
  • .worktrees/config/m/config-build/active/go.mod
    • Updated Go module dependencies.
  • .worktrees/config/m/config-build/active/go.sum
    • Updated Go module checksums.
  • .worktrees/config/m/config-build/active/internal/access/config_access/provider.go
    • Added a new access provider for API keys defined in the configuration.
  • .worktrees/config/m/config-build/active/internal/access/reconcile.go
    • Added logic to reconcile access providers based on configuration changes.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/api_tools.go
    • Added management API endpoints for generic HTTP calls and GitHub Copilot quota retrieval.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/api_tools_cbor_test.go
    • Added tests for CBOR support in management API calls.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/api_tools_test.go
    • Added tests for management API tools, including Antigravity token refresh logic.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/auth_files.go
    • Added management API endpoints for listing, downloading, uploading, deleting, and patching authentication files, including OAuth token request handlers for various providers.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/config_basic.go
    • Added management API endpoints for retrieving and updating basic server configuration settings.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/config_lists.go
    • Added management API endpoints for managing API key lists, Gemini, Claude, OpenAI compatibility, Vertex compatibility, OAuth excluded models, and OAuth model aliases.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/handler.go
    • Added the main handler for management API endpoints, including middleware for access control and configuration persistence.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/logs.go
    • Added management API endpoints for retrieving and deleting server logs and request error logs.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/model_definitions.go
    • Added management API endpoints for retrieving static model definitions by channel.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/oauth_callback.go
    • Added management API endpoint for handling OAuth callbacks.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/oauth_sessions.go
    • Added OAuth session management logic for tracking and validating authentication flows.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/quota.go
    • Added management API endpoints for configuring quota exceeded behavior.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/usage.go
    • Added management API endpoints for retrieving, exporting, and importing usage statistics.
  • .worktrees/config/m/config-build/active/internal/api/handlers/management/vertex_import.go
    • Added management API endpoint for importing Vertex service account credentials.
  • .worktrees/config/m/config-build/active/internal/api/middleware/request_logging.go
    • Added request logging middleware for capturing HTTP request and response details.
  • .worktrees/config/m/config-build/active/internal/api/middleware/request_logging_test.go
    • Added tests for the request logging middleware.
  • .worktrees/config/m/config-build/active/internal/api/middleware/response_writer.go
    • Added a response writer wrapper for intercepting and logging response data, including streaming responses.
  • .worktrees/config/m/config-build/active/internal/api/middleware/response_writer_test.go
    • Added tests for the response writer wrapper.
  • .worktrees/config/m/config-build/active/internal/api/modules/amp/amp.go
    • Added the Amp routing module, providing integration with Amp CLI for OAuth and management features.
  • .worktrees/config/m/config-build/active/internal/api/modules/amp/amp_test.go
    • Added tests for the Amp routing module, covering initialization, registration, and configuration updates.
  • .worktrees/config/m/config-build/active/internal/api/modules/amp/fallback_handlers.go
    • Added fallback handlers for the Amp module, managing routing decisions and model mapping.
  • internal/config/oauth_model_alias_migration_test.go
    • Renamed file.
  • internal/config/oauth_model_alias_test.go
    • Renamed file.
Ignored Files
  • Ignored by pattern: .github/workflows/** (7)
    • .github/workflows/ci-rerun-flaky.yml
    • .github/workflows/codeql.yml
    • .github/workflows/docs.yml
    • .github/workflows/generate-sdks.yaml
    • .github/workflows/release-batch.yaml
    • .github/workflows/required-check-names-guard.yml
    • .github/workflows/vitepress-pages.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a large number of new configuration files, CI/CD scripts, and documentation. However, the PR title and description ('fix: strip empty messages on OpenAI->Claude translation') do not seem to match the changes. Please update them to accurately reflect the content of this PR.

My review has identified several critical issues:

  • A large number of duplicated project files have been added under the .worktrees directory. This is a major problem and this directory should be removed.
  • Several files within the duplicated .worktrees directory contain unresolved git conflict markers.
  • The dependabot.yml configuration is invalid because the package-ecosystem is not specified.

Comment on lines +13 to +16
<<<<<<< HEAD
=======
- Support multiple aliases for a single upstream model in OAuth model alias configuration, preserving compatibility while allowing same upstream model name with distinct aliases.
>>>>>>> archive/pr-234-head-20260223
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file contains unresolved git conflict markers (<<<<<<< HEAD, =======, >>>>>>>). These must be resolved before merging. This appears to be one of several files with this issue.

Suggested change
<<<<<<< HEAD
=======
- Support multiple aliases for a single upstream model in OAuth model alias configuration, preserving compatibility while allowing same upstream model name with distinct aliases.
>>>>>>> archive/pr-234-head-20260223
- Support multiple aliases for a single upstream model in OAuth model alias configuration, preserving compatibility while allowing same upstream model name with distinct aliases.

Comment on lines +1 to +100
# CLIProxyAPI Plus

English | [Chinese](README_CN.md)

This is the Plus version of [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI), adding support for third-party providers on top of the mainline project.

All third-party provider support is maintained by community contributors; CLIProxyAPI does not provide technical support. Please contact the corresponding community maintainer if you need assistance.

The Plus release stays in lockstep with the mainline features.

## Differences from the Mainline

- Added GitHub Copilot support (OAuth login), provided by [em4go](https://github.com/em4go/CLIProxyAPI/tree/feature/github-copilot-auth)
- Added Kiro (AWS CodeWhisperer) support (OAuth login), provided by [fuko2935](https://github.com/fuko2935/CLIProxyAPI/tree/feature/kiro-integration), [Ravens2121](https://github.com/Ravens2121/CLIProxyAPIPlus/)

## New Features (Plus Enhanced)

- **OAuth Web Authentication**: Browser-based OAuth login for Kiro with beautiful web UI
- **Rate Limiter**: Built-in request rate limiting to prevent API abuse
- **Background Token Refresh**: Automatic token refresh 10 minutes before expiration
- **Metrics & Monitoring**: Request metrics collection for monitoring and debugging
- **Device Fingerprint**: Device fingerprint generation for enhanced security
- **Cooldown Management**: Smart cooldown mechanism for API rate limits
- **Usage Checker**: Real-time usage monitoring and quota management
- **Model Converter**: Unified model name conversion across providers
- **UTF-8 Stream Processing**: Improved streaming response handling

## Kiro Authentication

### Web-based OAuth Login

Access the Kiro OAuth web interface at:

```
http://your-server:8080/v0/oauth/kiro
```

This provides a browser-based OAuth flow for Kiro (AWS CodeWhisperer) authentication with:
- AWS Builder ID login
- AWS Identity Center (IDC) login
- Token import from Kiro IDE

## Quick Deployment with Docker

### One-Command Deployment

```bash
# Create deployment directory
mkdir -p ~/cli-proxy && cd ~/cli-proxy

# Create docker-compose.yml
cat > docker-compose.yml << 'EOF'
services:
cli-proxy-api:
image: eceasy/cli-proxy-api-plus:latest
container_name: cli-proxy-api-plus
ports:
- "8317:8317"
volumes:
- ./config.yaml:/CLIProxyAPI/config.yaml
- ./auths:/root/.cli-proxy-api
- ./logs:/CLIProxyAPI/logs
restart: unless-stopped
EOF

# Download example config
curl -o config.yaml https://raw.githubusercontent.com/router-for-me/CLIProxyAPIPlus/main/config.example.yaml

# Pull and start
docker compose pull && docker compose up -d
```

### Configuration

Edit `config.yaml` before starting:

```yaml
# Basic configuration example
server:
port: 8317

# Add your provider configurations here
```

### Update to Latest Version

```bash
cd ~/cli-proxy
docker compose pull && docker compose up -d
```

## Contributing

This project only accepts pull requests that relate to third-party provider support. Any pull requests unrelated to third-party provider support will be rejected.

If you need to submit any non-third-party provider changes, please open them against the [mainline](https://github.com/router-for-me/CLIProxyAPI) repository.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file and the entire .worktrees/config/m/config-build/active/ directory seem to be a duplicate of the project's root directory and its contents. Committing worktree-specific directories, especially with duplicated project files, is highly problematic. It will bloat the repository size and create significant maintenance overhead and confusion. It seems like these files were added by mistake. Please remove the entire .worktrees directory from this pull request.

Comment on lines +359 to +362
<<<<<<< HEAD
- task: quality:docs-phase-placeholders
=======
>>>>>>> archive/pr-234-head-20260223
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file contains unresolved git conflict markers. These must be resolved before merging.

      - task: quality:docs-phase-placeholders

Comment on lines +370 to +377
<<<<<<< HEAD
quality:docs-phase-placeholders:
desc: "Reject unresolved placeholder-like tokens in planning reports"
cmds:
- ./.github/scripts/check-phase-doc-placeholder-tokens.sh

=======
>>>>>>> archive/pr-234-head-20260223
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file contains unresolved git conflict markers. These must be resolved before merging.

  quality:docs-phase-placeholders:
    desc: "Reject unresolved placeholder-like tokens in planning reports"
    cmds:
      - ./.github/scripts/check-phase-doc-placeholder-tokens.sh

Comment on lines +13 to +20
<<<<<<< HEAD
=======
# Normalize CONFIG_FILE when mount points incorrectly create a directory.
if [ -d "${CONFIG_FILE}" ]; then
CONFIG_FILE="${CONFIG_FILE%/}/config.yaml"
fi

>>>>>>> archive/pr-234-head-20260223
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file contains unresolved git conflict markers. These must be resolved before merging.

Suggested change
<<<<<<< HEAD
=======
# Normalize CONFIG_FILE when mount points incorrectly create a directory.
if [ -d "${CONFIG_FILE}" ]; then
CONFIG_FILE="${CONFIG_FILE%/}/config.yaml"
fi
>>>>>>> archive/pr-234-head-20260223
# Normalize CONFIG_FILE when mount points incorrectly create a directory.
if [ -d "${CONFIG_FILE}" ]; then
CONFIG_FILE="${CONFIG_FILE%/}/config.yaml"
fi

Comment on lines +26 to +29
<<<<<<< HEAD
=======
chmod 700 "${AUTH_DIR}"
>>>>>>> archive/pr-234-head-20260223
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file contains unresolved git conflict markers. These must be resolved before merging.

Suggested change
<<<<<<< HEAD
=======
chmod 700 "${AUTH_DIR}"
>>>>>>> archive/pr-234-head-20260223
chmod 700 "${AUTH_DIR}"

Comment on lines +40 to +43
<<<<<<< HEAD
=======
mkdir -p "$(dirname "${CONFIG_FILE}")"
>>>>>>> archive/pr-234-head-20260223
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file contains unresolved git conflict markers. These must be resolved before merging.

Suggested change
<<<<<<< HEAD
=======
mkdir -p "$(dirname "${CONFIG_FILE}")"
>>>>>>> archive/pr-234-head-20260223
mkdir -p "$(dirname "${CONFIG_FILE}")"

Comment on lines +10 to +18
<<<<<<< HEAD
health-probe:
command: "sh -lc 'while true; do curl -fsS http://localhost:8317/health >/dev/null 2>&1 || true; sleep 20; done'"
working_dir: "."
availability:
restart: "always"
=======

>>>>>>> archive/pr-234-head-20260223
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file contains unresolved git conflict markers. These must be resolved before merging.

  health-probe:
    command: "sh -lc 'while true; do curl -fsS http://localhost:8317/health >/dev/null 2>&1 || true; sleep 20; done'"
    working_dir: "."
    availability:
      restart: "always"

Comment thread .github/dependabot.yml
Comment on lines +8 to +11
- package-ecosystem: "" # See documentation for possible values haha
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The package-ecosystem is empty, which is a required field for Dependabot configuration. This will cause Dependabot updates to fail. You should specify the package ecosystem(s) to update. For a Go project using GitHub Actions, you should configure both gomod and github-actions. Also, the comment # See documentation for possible values haha is unprofessional and should be updated.

  - package-ecosystem: "gomod"
    directory: "/"
    schedule:
      interval: "weekly"
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants