Repository navigation
fix: verify channel inference and streaming endpoints separately - #1
Merged
Merged
Conversation
Collaborator
|
非常感谢 @LiuS1mple!两个 PR 都已合并,并随 v0.4.1 发布。 发布前我用真实上游验证过:
有一个小问题,如果你愿意可以再提个 PR 跟进(不强求):
再次感谢你认真的工作,尤其是测试和 DESIGN.md 里的说明。欢迎一起共建!!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
原来的 OpenAI 渠道测试只请求
/v1/models,因此模型列表返回 200 就会显示“测试成功”,即使 Chat 或 Codex 所需的 Responses 接口实际不可用。现在按配置模型分别展示各接口的调用结果,例如“Chat 通过,Responses 返回 404”。Validation
python -m pytest -q tests/test_channel_checks.py:23 passed,覆盖 Chat 可用而 Responses 不可用、完整原生流、HTTP 200 错误、无结束事件、心跳超时、多行 SSE、密钥脱敏、冷却 Key、权限和限频。npm run build:通过类型检查与生产构建。python -X utf8 scripts/release_check.py:通过。scripts/channel_checks_ui_check.py,使用模拟 API 响应。test_query_budget.py中两个 SQL 查询预算断言,以及test_secret_key.py的 POSIX0600权限断言;均已在未修改的上游提交1e67f1d上复现,后者在 Windows 上运行。当前环境为 Windows / Python 3.12。验证使用合成上游响应,未调用真实厂商;本次未运行需要独立 MySQL / Redis 的集成测试。
Upgrade
POST /api/channels/{id}/test支持请求体{"model":"渠道内配置的模型名"};不传请求体时使用第一个配置模型,仅支持文本生成模型。success、status_code、error,新增model、actual_model和逐项checks。success现在表示所有检测项目均通过;应根据具体项目判断某个接口是否可用。