fix: resolve executor compile regressions#266
fix: resolve executor compile regressions#266KooshaPari wants to merge 421 commits intorouter-for-me:mainfrom
Conversation
# Conflicts: # docs/planning/reports/issue-wave-gh-next21-lane-6.md # pkg/llmproxy/api/modules/amp/routes_test.go
These fields are not supported by Codex Responses API and cause upstream errors. Fixes: router-for-me#1667
- Replace manual prefix/suffix checks with strings.TrimPrefix/TrimSuffix - Remove unused functions and variables in kiro_executor.go and request_logger.go - Move default case to the end of switch statement in kiro_executor.go - Fix function signatures and call sites in kiro_executor.go where arguments were immediately overwritten Co-authored-by: Cursor <cursoragent@cursor.com>
- Added unit tests for internal/auth packages (codex, copilot, gemini, kiro). - Added unit tests for internal/runtime/executor, specifically for Kiro executor. - Added unit tests for various internal translators. - Improved internal/api and sdk test coverage. - Fixed a race condition in Kiro social authentication callback server. - Updated .gitignore to exclude build artifacts and coverage files. - Cleaned up go.mod and go.sum with go mod tidy. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…rs and fix kiro_websearch functions This commit: - Updates cmd/codegen/main.go to support multiple templates and directories. - Embeds GeneratedConfig in internal/config/Config. - Restores SSE and message ID functions in internal/translator/kiro/claude/kiro_websearch.go. - Adds pkg/llmproxy/ directory structure for shared components. - Fixes missing strings import in generated config files. Co-authored-by: Cursor <cursoragent@cursor.com>
Renamed references to CLIProxyAPIPlus to cliproxyapi++ (display) and cliproxyapi-plusplus (technical). Updated GitHub remote and internal URLs. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…260223-v2 docs: replace marketing language with concise technical wording
…-20260223 merge: absorb heliosharness parity branch functional delta
Summary of ChangesHello @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 significantly overhauls the project's foundation by rebranding it to Highlights
🧠 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
Ignored Files
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces significant changes across the project, primarily focusing on enhancing CI/CD, documentation, and Docker deployment. Key updates include a comprehensive refactoring of GitHub Actions workflows with new scripts for checking external endpoints, distributed critical paths, documentation secret samples, open-item parity, and workflow token permissions. New configuration files for golangci-lint and pre-commit hooks are added, alongside a structured CHANGELOG.md and an updated CONTRIBUTING.md that clarifies governance and a 'Path Guard' mechanism. The project's naming convention is updated from 'cli-proxy-api-plus' to 'cliproxyapi++', reflected in .goreleaser.yml, Dockerfile, docker-compose.yml, and README.md files. The Dockerfile is further enhanced with a new docker-init.sh entrypoint script to manage configuration and environment variable overrides, and the .env.example file is updated to reflect these new Docker runtime configuration options. The cmd/server/main.go file sees updates to its import paths, moving from internal/ to pkg/llmproxy/ for core components, and introduces new CLI flags for various provider logins and a setup wizard, along with improved config path resolution and validation. The config.example.yaml file is updated with new provider blocks (Cursor, MiniMax, Roo, Kilo, DeepSeek, Groq, Mistral, SiliconFlow, OpenRouter, Together, Fireworks, Novita) and removes passthrough-headers and claude-header-defaults. Documentation under docs/ is extensively updated to reflect the new cliproxyapi++ branding, features, and architectural changes, including new guides for developers, users, and agent operators, and detailed technical specifications for architecture, authentication, operations, and providers. Review comments highlight a critical issue in docker-init.sh where sed commands for environment variable overrides incorrectly handle YAML indentation, potentially leading to silent failures, and point out a misleading filename README_FA.md which contains Chinese content instead of Farsi, suggesting it should be renamed or removed.
| if [ -n "${CLIPROXY_SECRET_KEY}" ]; then | ||
| echo "[docker-init] Setting management secret-key from env" | ||
| sed -i "s/secret-key:.*/secret-key: \"${CLIPROXY_SECRET_KEY}\"/" "${CONFIG_FILE}" 2>/dev/null || \ | ||
| sed -i '' "s/secret-key:.*/secret-key: \"${CLIPROXY_SECRET_KEY}\"/" "${CONFIG_FILE}" 2>/dev/null || true | ||
| fi | ||
|
|
||
| if [ -n "${CLIPROXY_ALLOW_REMOTE}" ]; then | ||
| echo "[docker-init] Setting allow-remote from env: ${CLIPROXY_ALLOW_REMOTE}" | ||
| sed -i "s/allow-remote:.*/allow-remote: ${CLIPROXY_ALLOW_REMOTE}/" "${CONFIG_FILE}" 2>/dev/null || \ | ||
| sed -i '' "s/allow-remote:.*/allow-remote: ${CLIPROXY_ALLOW_REMOTE}/" "${CONFIG_FILE}" 2>/dev/null || true | ||
| fi | ||
|
|
||
| if [ -n "${CLIPROXY_DEBUG}" ]; then | ||
| echo "[docker-init] Setting debug from env: ${CLIPROXY_DEBUG}" | ||
| sed -i "s/^debug:.*/debug: ${CLIPROXY_DEBUG}/" "${CONFIG_FILE}" 2>/dev/null || \ | ||
| sed -i '' "s/^debug:.*/debug: ${CLIPROXY_DEBUG}/" "${CONFIG_FILE}" 2>/dev/null || true | ||
| fi | ||
|
|
||
| if [ -n "${CLIPROXY_ROUTING_STRATEGY}" ]; then | ||
| echo "[docker-init] Setting routing strategy from env: ${CLIPROXY_ROUTING_STRATEGY}" | ||
| sed -i "s/strategy:.*/strategy: \"${CLIPROXY_ROUTING_STRATEGY}\"/" "${CONFIG_FILE}" 2>/dev/null || \ | ||
| sed -i '' "s/strategy:.*/strategy: \"${CLIPROXY_ROUTING_STRATEGY}\"/" "${CONFIG_FILE}" 2>/dev/null || true | ||
| fi |
There was a problem hiding this comment.
The sed commands for overriding nested configuration keys like secret-key, allow-remote, and strategy are incorrect as they don't account for YAML indentation. This will cause the environment variable overrides to fail silently. To make these replacements robust, the sed commands should capture and preserve the leading whitespace.
For example, for secret-key, the command should be:
sed -i "s/^[[:space:]]*secret-key:.*/ secret-key: \"${CLIPROXY_SECRET_KEY}\"/" "${CONFIG_FILE}"
This ensures the replacement respects the YAML structure. A similar change is needed for allow-remote and strategy.
if [ -n "${CLIPROXY_SECRET_KEY}" ]; then
echo "[docker-init] Setting management secret-key from env"
sed -i "s/^[[:space:]]*secret-key:.*/ secret-key: \"${CLIPROXY_SECRET_KEY}\"/" "${CONFIG_FILE}" 2>/dev/null || \
sed -i '' "s/^[[:space:]]*secret-key:.*/ secret-key: \"${CLIPROXY_SECRET_KEY}\"/" "${CONFIG_FILE}" 2>/dev/null || true
fi
if [ -n "${CLIPROXY_ALLOW_REMOTE}" ]; then
echo "[docker-init] Setting allow-remote from env: ${CLIPROXY_ALLOW_REMOTE}"
sed -i "s/^[[:space:]]*allow-remote:.*/ allow-remote: ${CLIPROXY_ALLOW_REMOTE}/" "${CONFIG_FILE}" 2>/dev/null || \
sed -i '' "s/^[[:space:]]*allow-remote:.*/ allow-remote: ${CLIPROXY_ALLOW_REMOTE}/" "${CONFIG_FILE}" 2>/dev/null || true
fi
if [ -n "${CLIPROXY_DEBUG}" ]; then
echo "[docker-init] Setting debug from env: ${CLIPROXY_DEBUG}"
sed -i "s/^debug:.*/debug: ${CLIPROXY_DEBUG}/" "${CONFIG_FILE}" 2>/dev/null || \
sed -i '' "s/^debug:.*/debug: ${CLIPROXY_DEBUG}/" "${CONFIG_FILE}" 2>/dev/null || true
fi
if [ -n "${CLIPROXY_ROUTING_STRATEGY}" ]; then
echo "[docker-init] Setting routing strategy from env: ${CLIPROXY_ROUTING_STRATEGY}"
sed -i "s/^[[:space:]]*strategy:.*/ strategy: \"${CLIPROXY_ROUTING_STRATEGY}\"/" "${CONFIG_FILE}" 2>/dev/null || \
sed -i '' "s/^[[:space:]]*strategy:.*/ strategy: \"${CLIPROXY_ROUTING_STRATEGY}\"/" "${CONFIG_FILE}" 2>/dev/null || true
fi| # CLIProxyAPI Plus | ||
|
|
||
| [English](README.md) | 中文 | ||
|
|
||
| 这是 [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI) 的 Plus 版本,在原有基础上增加了第三方供应商的支持。 | ||
|
|
||
| 所有的第三方供应商支持都由第三方社区维护者提供,CLIProxyAPI 不提供技术支持。如需取得支持,请与对应的社区维护者联系。 | ||
|
|
||
| 该 Plus 版本的主线功能与主线功能强制同步。 | ||
|
|
||
| ## 与主线版本版本差异 | ||
|
|
||
| - 新增 GitHub Copilot 支持(OAuth 登录),由[em4go](https://github.com/em4go/CLIProxyAPI/tree/feature/github-copilot-auth)提供 | ||
| - 新增 Kiro (AWS CodeWhisperer) 支持 (OAuth 登录), 由[fuko2935](https://github.com/fuko2935/CLIProxyAPI/tree/feature/kiro-integration)、[Ravens2121](https://github.com/Ravens2121/CLIProxyAPIPlus/)提供 | ||
|
|
||
| ## 新增功能 (Plus 增强版) | ||
|
|
||
| - **OAuth Web 认证**: 基于浏览器的 Kiro OAuth 登录,提供美观的 Web UI | ||
| - **请求限流器**: 内置请求限流,防止 API 滥用 | ||
| - **后台令牌刷新**: 过期前 10 分钟自动刷新令牌 | ||
| - **监控指标**: 请求指标收集,用于监控和调试 | ||
| - **设备指纹**: 设备指纹生成,增强安全性 | ||
| - **冷却管理**: 智能冷却机制,应对 API 速率限制 | ||
| - **用量检查器**: 实时用量监控和配额管理 | ||
| - **模型转换器**: 跨供应商的统一模型名称转换 | ||
| - **UTF-8 流处理**: 改进的流式响应处理 | ||
|
|
||
| ## Kiro 认证 | ||
|
|
||
| ### 网页端 OAuth 登录 | ||
|
|
||
| 访问 Kiro OAuth 网页认证界面: | ||
|
|
||
| ``` | ||
| http://your-server:8080/v0/oauth/kiro | ||
| ``` | ||
|
|
||
| 提供基于浏览器的 Kiro (AWS CodeWhisperer) OAuth 认证流程,支持: | ||
| - AWS Builder ID 登录 | ||
| - AWS Identity Center (IDC) 登录 | ||
| - 从 Kiro IDE 导入令牌 | ||
|
|
||
| ## Docker 快速部署 | ||
|
|
||
| ### 一键部署 | ||
|
|
||
| ```bash | ||
| # 创建部署目录 | ||
| mkdir -p ~/cli-proxy && cd ~/cli-proxy | ||
|
|
||
| # 创建 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 | ||
|
|
||
| # 下载示例配置 | ||
| curl -o config.yaml https://raw.githubusercontent.com/router-for-me/CLIProxyAPIPlus/main/config.example.yaml | ||
|
|
||
| # 拉取并启动 | ||
| docker compose pull && docker compose up -d | ||
| ``` | ||
|
|
||
| ### 配置说明 | ||
|
|
||
| 启动前请编辑 `config.yaml`: | ||
|
|
||
| ```yaml | ||
| # 基本配置示例 | ||
| server: | ||
| port: 8317 | ||
|
|
||
| # 在此添加你的供应商配置 | ||
| ``` | ||
|
|
||
| ### 更新到最新版本 | ||
|
|
||
| ```bash | ||
| cd ~/cli-proxy | ||
| docker compose pull && docker compose up -d | ||
| ``` | ||
|
|
||
| ## 贡献 | ||
|
|
||
| 该项目仅接受第三方供应商支持的 Pull Request。任何非第三方供应商支持的 Pull Request 都将被拒绝。 | ||
|
|
||
| 如果需要提交任何非第三方供应商支持的 Pull Request,请提交到[主线](https://github.com/router-for-me/CLIProxyAPI)版本。 | ||
|
|
||
| ## 许可证 | ||
|
|
||
| 此项目根据 MIT 许可证授权 - 有关详细信息,请参阅 [LICENSE](LICENSE) 文件。 No newline at end of file |
There was a problem hiding this comment.
The filename README_FA.md suggests the content is in Farsi, but the content itself is in Chinese. This is confusing and appears to be a mistake. Please either rename the file to README_CN.md (if it's an alternative version) or translate the content to Farsi. If this file was added by mistake, it should be removed.
Corrected compile regression fixes only; recreating PR to correct target repo/branch context.