Skip to content

refactor(ai): 重构代码审查逻辑并优化报告格式#2

Open
h7ml wants to merge 4 commits intomainfrom
dev
Open

refactor(ai): 重构代码审查逻辑并优化报告格式#2
h7ml wants to merge 4 commits intomainfrom
dev

Conversation

@h7ml
Copy link
Owner

@h7ml h7ml commented Mar 28, 2025

  • 更新了代码审查提示,要求更详细的反馈结构
  • 改进了问题提取算法,支持更复杂的反馈格式
  • 优化了审查结果的展示方式,增加了更多细节和分类
  • 添加了总体评价、关键发现等新元素,使报告更加全面
  • 调整了输出格式,更适合 Markdown 查看
    refactor(config): 为 AI 模型添加默认值 - 在环境变量中未设置 AI_REVIEWER_MODEL 时,添加默认值 'deepseek-r1:1.5b' - 此修改确保了在未配置模型时,应用仍能使用一个默认的 AI 模型

@coderabbitai
Copy link

coderabbitai bot commented Mar 28, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

本次更新中,package.json 中将 review 脚本的 pull request ID 从 1 修改为 2
src/ai/openai.ts 中,对 OpenAIProvider 类内构建和解析审核提示的方法进行了调整,采用了更结构化的格式以详细拆分响应内容。
src/utils/formatter.ts 中,对 OutputFormatter 类的格式化输出方法做了较大改动,引入了 Markdown 格式的输出及对问题分类、关键发现和最佳实践的分区展示。

Changes

文件路径 更改摘要
package.json 修改 "review" 脚本,将 pull request ID 从 1 改为 2
src/ai/openai.ts 更新 OpenAIProvider 类:调整 buildReviewPromptparseReviewResponseextractSummary 方法,采用结构化的审核提示与响应格式
src/utils/formatter.ts 优化 OutputFormatter 类:改进 formatSingleFileReview 方法,新增私有方法 formatIssue,增加 Markdown 格式的总结、问题统计、关键发现、详细分析与最佳实践部分

Sequence Diagram(s)

sequenceDiagram
    participant 用户 as Developer
    participant CLI
    participant AI as OpenAIProvider
    participant 格式化器 as OutputFormatter

    用户->>CLI: 触发 review 脚本 (PR ID 2)
    CLI->>AI: 调用 reviewCode 方法
    AI->>AI: 执行 buildReviewPrompt (构建详细提示)
    AI->>AI: 执行 parseReviewResponse & extractSummary (解析响应内容)
    AI->>格式化器: 调用 formatSingleFileReview (生成 Markdown 输出)
    格式化器-->>CLI: 返回格式化的审核报告
Loading

Poem

(_/)
小兔跳跃迎新章,
PR号由1变2忙。
审查细节展宏图,
格式清新似春光,
代码歌声传万里!


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
src/utils/formatter.ts (2)

242-243: 在静态方法中使用 this 易引起歧义。

您在静态方法内使用了 this.formatIssue。为减少混淆,可改为使用类名(OutputFormatter.formatIssue(issue)) 调用,或保留此写法并在团队内达成一致。

-    output += this.formatIssue(issue)
+    output += OutputFormatter.formatIssue(issue)

264-269: 最佳实践列表可根据项目需求自定义。

此处提供了通用的实践建议,如果项目内部已有更详细的编码规范,可在这部分添加更具针对性的清单,以便团队快速参阅。

src/ai/openai.ts (1)

423-428: 可使用可选链操作符简化代码。

当前写法:

const code = codeMatch ? codeMatch[1] : undefined

可通过可选链提高可读性和安全性:

- const code = codeMatch ? codeMatch[1] : undefined
+ const code = codeMatch?.[1]
🧰 Tools
🪛 Biome (1.9.4)

[error] 427-427: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f50d411 and e64161f.

📒 Files selected for processing (3)
  • package.json (1 hunks)
  • src/ai/openai.ts (5 hunks)
  • src/utils/formatter.ts (1 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
src/utils/formatter.ts (1)
src/core/reviewer.ts (1)
  • ReviewResult (33-43)
🪛 Biome (1.9.4)
src/ai/openai.ts

[error] 427-427: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

src/utils/formatter.ts

[error] 280-280: Using this in a static context can be confusing.

this refers to the class.
Unsafe fix: Use the class name instead.

(lint/complexity/noThisInStatic)

🔇 Additional comments (6)
package.json (1)

61-61: 更新 PR ID 看起来没有问题。

此更改仅更新了脚本中的 PR ID,从 1 切换为 2,以匹配您的实际 Pull Request。在此处无需额外修改。

src/utils/formatter.ts (1)

194-271: 新增的 formatSingleFileReview 方法结构清晰。

此方法采用 Markdown 格式输出审查结果,涵盖总体评价、问题概览和关键发现等多个部分,能够有效提高可读性和可维护性,没有明显的逻辑漏洞或性能问题。

src/ai/openai.ts (4)

246-279: 新的审查提示结构更详细。

新的提示要求提供总体评价、关键发现、详细分析等,多维度地展示问题,能帮助审查者聚焦重点,增强审查质量。


387-461: 文本解析逻辑健全。

此段代码通过拆分不同段落识别严重性、行号、建议和示例等信息,逻辑较为完整,无明显漏洞。

🧰 Tools
🪛 Biome (1.9.4)

[error] 427-427: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


501-507: 提取“总体评价”部分的方式清晰。

此匹配逻辑能较好地获取“## 📝 总体评价”下的内容,实现了对不同标题格式的兼容性。


513-517: 灵活的总结提取策略。

当确实无法找到明确的总结标记时,使用第一或最后一段作为简要总结,保证了输出不会为空。

@h7ml
Copy link
Owner Author

h7ml commented Mar 28, 2025

AI代码审查总结

代码审查报告

1. 代码库整体质量评估

整体代码质量处于中等水平,主要特点如下:

  • 优点

    • 代码功能基本完整,实现了核心的AI代码审查功能
    • 有基本的错误处理和日志记录机制
    • 代码结构相对清晰,功能模块划分合理
  • 待改进点

    • 存在多处硬编码配置,缺乏灵活性
    • 错误处理和信息记录不够完善
    • 部分逻辑过于复杂,维护性较差
    • 缺乏足够的参数校验和边界条件处理
    • 文档和注释不足

代码质量评分为6.5/10,主要扣分点在可维护性、灵活性和健壮性方面。

2. 按文件列出关键问题及建议

package.json

  • 关键问题:脚本命令中硬编码PR ID
  • 建议
    • 使用环境变量或命令行参数动态指定PR ID
    • 考虑添加配置说明文档

src/ai/openai.ts

  • 关键问题1:复杂正则表达式难以维护
    • 建议:拆分为多个简单匹配步骤或使用专业解析库
  • 关键问题2:提示模板与解析逻辑不完全匹配
    • 建议:确保一致性或添加差异说明注释
  • 关键问题3:错误处理信息不足
    • 建议:记录更多上下文信息便于调试

src/utils/formatter.ts

  • 关键问题1:关键问题截断逻辑可能隐藏重要问题
    • 建议:提供配置选项或按严重程度排序
  • 关键问题2:缺乏参数校验和默认值处理
    • 建议:添加对null/undefined等边界条件的处理
  • 关键问题3:最佳实践内容硬编码
    • 建议:实现动态生成或从配置文件读取

3. 最常见的问题类型及改进方向

问题类型 出现次数 改进方向
硬编码配置 3 改用环境变量/配置文件/参数传递
错误处理不足 3 增强错误上下文记录和边界条件处理
复杂/难维护逻辑 2 简化逻辑或使用专业库
参数校验缺失 2 添加参数校验和默认值处理
文档/注释不足 1 补充必要的文档和注释

4. 优先修复的关键问题

  1. 高优先级

    • src/utils/formatter.ts中的参数校验缺失问题(可能导致运行时错误)
    • src/ai/openai.ts中的错误处理信息不足(影响问题排查效率)
  2. 中优先级

    • 所有硬编码配置问题(影响灵活性)
    • 复杂正则表达式问题(影响可维护性)
  3. 低优先级

    • 文档和注释补充
    • 最佳实践内容动态化

5. 整体代码质量改进建议

  1. 配置管理改进

    • 建立统一的配置管理系统
    • 将硬编码值替换为环境变量或配置文件
  2. 错误处理增强

    • 实现分级的错误处理策略
    • 记录更多上下文信息
    • 添加边界条件处理
  3. 代码可维护性

    • 拆分复杂逻辑为小函数
    • 使用专业库替代复杂正则
    • 添加单元测试
  4. 文档完善

    • 添加API文档
    • 补充关键算法注释
    • 编写配置指南
  5. 架构优化

    • 考虑引入依赖注入管理服务
    • 实现插件化架构增强扩展性
  6. 持续改进机制

    • 建立代码审查规范
    • 引入静态代码分析工具
    • 定期进行技术债务评估

@gitguardian
Copy link

gitguardian bot commented Mar 28, 2025

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@h7ml h7ml force-pushed the dev branch 3 times, most recently from 4c2b23b to 701e09f Compare March 28, 2025 07:24
@h7ml
Copy link
Owner Author

h7ml commented Mar 28, 2025

AI代码审查总结

代码审查综合报告

1. 代码库整体质量评估

该代码库整体质量中等偏上,主要特点如下:

优点:

  • 模块化设计良好,功能划分清晰
  • 基本实现了完整的AI代码审查流程
  • 包含了一定程度的错误处理和验证逻辑
  • 文档相对完整,特别是README.md提供了详细的使用说明

待改进点:

  • 安全性问题:多处存在敏感信息硬编码或不当处理
  • 健壮性不足:许多关键路径缺乏充分的错误处理和参数验证
  • 可维护性问题:存在硬编码值、注释掉的代码和配置不一致
  • 性能考虑不足:部分操作可能阻塞事件循环
  • 国际化支持:提示文本和消息硬编码在代码中

总体评分:7.2/10 (良好但需要改进)

2. 关键问题及建议(按文件)

1. .aireviewrc.yml (已删除但仍需注意)

  • 关键问题:敏感信息处理不当
  • 建议:如重新引入配置文件,应使用环境变量替代硬编码值,并加密存储敏感信息

2. .github/generate-config.js

  • 关键问题:参数解析和环境变量处理不够健壮
  • 建议:引入commander/yargs库处理参数,添加环境变量验证和类型转换

3. .github/generate-config.sh

  • 关键问题:安全风险和可维护性问题
  • 建议:移除硬编码路径和API密钥,添加脚本元信息注释

4. .github/workflows/review.yaml

  • 关键问题:API密钥处理错误和安全问题
  • 建议:修正变量名错误,添加敏感信息保护,完善错误处理

5. README.md

  • 关键问题:环境变量命名不一致和权限过大
  • 建议:统一命名规范,缩小权限范围,补充安全说明

6. package.json

  • 关键问题:硬编码PR ID
  • 建议:改为使用环境变量传递参数

7. src/ai/openai.ts

  • 关键问题:解析逻辑复杂且不够健壮
  • 建议:重构解析逻辑,优先处理结构化响应,提取正则表达式为常量

8. src/utils/formatter.ts

  • 关键问题:缺乏空值检查和硬编码限制
  • 建议:添加参数验证,将硬编码值提取为配置常量

3. 最常见的问题类型及改进方向

问题类型 出现频率 改进方向
硬编码值 28% 提取为配置/环境变量
缺乏验证 22% 添加参数/输入验证
安全风险 17% 加密/环境变量/最小权限
错误处理不足 14% 添加try-catch/错误边界
可维护性问题 11% 移除死代码/添加注释
性能问题 8% 异步化/优化算法

4. 优先修复的关键问题

高优先级(应立即修复):

  1. 工作流文件中的API密钥变量名错误(可能导致功能失效)
  2. 所有敏感信息硬编码问题(安全风险)
  3. 关键路径缺乏错误处理(可能导致不可预知的失败)

中优先级(应在下一版本修复):

  1. 环境变量命名不一致问题
  2. 硬编码值和配置灵活性问题
  3. 解析逻辑的健壮性改进

低优先级(可在后续迭代优化):

  1. 性能优化(如异步文件操作)
  2. 国际化支持
  3. 文档完善

5. 整体代码质量改进建议

1. 安全改进:

  • 实施统一的敏感信息管理策略(环境变量+加密)
  • 进行安全审计,特别是权限和API密钥处理
  • 添加敏感信息泄露防护(如日志过滤)

2. 代码健壮性:

  • 为所有公共方法添加参数验证
  • 实现全面的错误处理和恢复机制
  • 添加单元测试覆盖关键路径

3. 可维护性提升:

  • 建立代码规范(命名、注释、结构)
  • 实施配置中心化管理
  • 引入TypeScript增强类型安全
  • 定期清理无用代码和注释

4. 性能优化:

  • 识别并异步化阻塞操作
  • 优化正则表达式和字符串处理
  • 考虑引入缓存机制

5. 文档完善:

  • 添加架构设计文档
  • 完善API文档(如JSDoc)
  • 添加变更日志和版本说明

6. 开发流程改进:

  • 引入pre-commit检查(如lint、安全扫描)
  • 设置CI/CD质量门禁
  • 实施代码审查流程

通过系统性地解决这些问题,可以显著提升代码库的质量、安全性和可维护性,为后续功能扩展奠定坚实基础。

@h7ml h7ml force-pushed the dev branch 5 times, most recently from 5a3ac59 to 999616a Compare March 28, 2025 09:32
- 更新了代码审查提示,要求更详细的反馈结构
- 改进了问题提取算法,支持更复杂的反馈格式
- 优化了审查结果的展示方式,增加了更多细节和分类
- 添加了总体评价、关键发现等新元素,使报告更加全面
- 调整了输出格式,更适合 Markdown 查看
refactor(config): 为 AI 模型添加默认值                                                                                                 - 在环境变量中未设置 AI_REVIEWER_MODEL 时,添加默认值 'deepseek-r1:1.5b'                       - 此修改确保了在未配置模型时,应用仍能使用一个默认的 AI 模型

feat: 添加 GitHub Actions 集成支持

- 新增 GitHub Actions 配置指南,实现 PR 自动审查
- 更新 .aireviewrc.yml 配置示例,增加 OpenAI 和审查配置选项
- 在 README.md 中添加 GitHub Actions 集成详细步骤说明

feat: 添加 GitHub Actions 集成支持

- 新增 GitHub Actions 配置指南,实现 PR 自动审查
- 更新 .aireviewrc.yml 配置示例,增加 OpenAI 和审查配置选项
- 在 README.md 中添加 GitHub Actions 集成详细步骤说明

ci(github): 优化 pnpm 设置和缓存

- 设置 pnpm 版本为 10.6.2
- 添加 pnpm store 缓存配置
- 移除单独的 Node.js 设置步骤
- 更新环境变量设置,为后续步骤提供缓存路径

ci: 安装依赖项

- 在 review.yaml 文件中添加了安装依赖项的步骤
- 确保在创建配置文件之前,所有必要的依赖项都已安装

ci(workflow): 增加配置文件验证和 API 密钥检查

- 添加配置文件验证步骤,检查 .aireviewrc.yml 是否存在且有效
- 增加 API 密钥检查步骤,验证密钥格式是否正确
- 在配置文件验证或 API 密钥检查失败时,向 PR 添加评论提示

style: 优化代码审查工作流文件格式

- 删除多余的空行
- 添加必要的空行以改善可读性
- 统一使用 UNIX 风格的换行符

ci(review): 增加 AI Reviewer 配置并调试模型

- 在 GitHub Actions 中添加 AI Reviewer 配置
- 设置 OpenAI 模型、API key 和基础 URL
- 增加环境变量配置检查
- 调整代码以适应 AI Reviewer 接口

build(ci): 添加配置文件生成脚本并简化工作流

- 新增 generate-config.js 和 generate-config.sh 脚本用于生成配置文件
- 更新 review.yaml 工作流,使用新的配置文件生成脚本
- 通过脚本动态读取环境变量,提高配置灵活性

ci(workflow): 增加 GitHub Token 验证并优化 AI 代码审查流程

- 新增 GitHub Token 验证步骤,确保 Token 具有足够的权限和未过期
- 在配置文件生成后添加调试信息,方便排查问题
- 更新 AI 代码审查步骤的条件,增加 GitHub Token 验证
- 增加 GitHub Token 错误报告,当验证失败时在 PR 中留言

ci: 更新 AI 代码审查配置和工作流

- 添加 API 密钥验证逻辑
- 更新配置文件生成脚本
- 修改 GitHub Actions 工作流
- 优化错误处理和通知机制

refactor(github): 优化 GitHub API 调用和错误处理

- 重构 generate-config.js,使用 Node.js 原生模块
- 更新 review.yaml 工作流,增加 PR 信息验证步骤
- 改进 GitHubPlatform 类,添加 PR 存在性检查和错误处理
- 优化日志输出,增加调试信息

ci: 更新 GitHub API 认证方式

- 将硬编码的 $GITHUB_TOKEN 替换为 ${{ secrets.AI_REVIEWER_GITHUB_TOKEN }}
- 修改了两个使用 GitHub API 的 curl 命令,使用新的认证方式

refactor(github): 优化 GitHub Token 验证和请求头设置

- 支持 GitHub Actions 的 GITHUB_TOKEN
- 修改 Token 验证逻辑,增加对 ghs_ 开头的 Token 的支持
- 更新请求头设置,使用 Bearer 认证方式并添加 User-Agent

refactor(ci): 重构 AI 代码审查工作流

- 合并配置生成和验证步骤
- 优化 API 密钥和 GitHub Token 验证逻辑
- 简化 PR 信息获取流程
- 统一错误处理和报告
- 调整环境变量使用

ci: 优化 PR 错误信息处理

- 将错误信息转换为 JSON 数组,提高数据处理的灵活性和兼容性
- 优化错误信息的获取和判断逻辑,提高代码的鲁棒性

ci: 优化 PR 审查流程中的错误信息处理

- 将错误信息转换为单行字符串,而不是 JSON 数组
- 更新环境变量设置,增加 AI_REVIEWER_OPENAI_KEY
- 修改错误信息解析逻辑,使用字符串分割替代 JSON 解析

refactor(ci): 重构设置和验证流程

- 优化配置文件生成和验证逻辑
- 改进 API 密钥和 GitHub Token 验证
- 完善 PR 信息获取和验证
- 移除报告状态步骤,简化工作流

ci(workflow): 优化 GitHub Token 验证和 PR 存在

ci(workflow): 优化 GitHub Token 验证和 PR 存在性检查

- 增加 GitHub Token 权限验证
- 改进 PR 存在性验证,处理错误响应
- 添加工作流状态报告到 PR 评论
- 使用专用的 AI_REVIEWER_GITHUB_TOKEN 替代 GITHUB_TOKEN

ci: 更新 GitHub Actions 工作流权限和 Token 使用

- 修改了 GitHub Token 权限提示信息,建议使用更高权限的 Token
- 更新了 GITHUB_TOKEN 的来源,使用专门的 secret 替代默认的 github.token
- 移除了 Report status 步骤,简化了工作流

ci: 更新 GitHub Token 变量名称

- 将 GITHUB_TOKEN 变量名称改为 AI_REVIEWER_GITHUB_TOKEN
- 更新所有使用该变量的地方,包括 curl 命令和环境变量设置
- 这个改动是为了使 Token 变量名称更加具体化,避免潜在的混淆

ci: 优化 GitHub Token 认证方式

- 将 API 请求中的 "Authorization: Bearer" 替换为 "Authorization: token"
- 统一使用新的认证方式以提高代码一致性
- 此更改不影响功能,仅优化了 API 请求的格式

fix(platforms): 更新 GitHub API 授权头格式

- 将 'Authorization' 头中的 'Bearer' 替换为 'token',以符合 GitHub API 的要求
- 此修改涉及多个方法,包括获取 PR 信息、文件列表、提交评论等
h7ml added 3 commits March 28, 2025 17:52
- 新增 validate.sh 脚本,包含所有验证逻辑
- 更新 review.yaml 工作流,使用新的验证脚本
- 通过 chmod +x 为 validate.sh 添加可执行权限
- 调整环境变量设置,使其更加清晰和可维护
- 将 AI_REVIEWER_MODEL 和 AI_REVIEWER_BASE_URL 更新为 OpenRouter 相关值
- 移除了模型名称格式调整逻辑,由用户完全控制模型格式
- 添加了 OpenAI/OpenRouter 客户端初始化成功或失败的日志
- 在发送 API 请求前添加了调试日志
- 添加 OpenRouter 模型路由支持
- 优化 API 请求体和响应的调试日志
- 为 OpenRouter 添加模型特定的 HTTP Referer 头
- 改进错误处理,增加更多错误信息
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.

1 participant