gemini 迁移公共构造与停止判据复核 (fix #335) - #361
Merged
Merged
Conversation
第三家引擎接入 createByokEngine:错误体特例保留在适配器内, 请求格式与凭据走请求头不变。停止判据复核:构造未新增参数与 特例扩展点,适配器定义读起来不劣于改造前,判据未触发。 Co-Authored-By: zhexuancai-uts <261878103+zhexuancai-uts@users.noreply.github.com>
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.
问题
Gemini 仍自持整段骨架,且其错误体特例(读响应体区分认证失败与其他 4xx)需要验证能否经现有扩展点接入公共构造。
根因
第三家引擎未迁移,#309 的停止判据未复核。
修复
Gemini 迁移到
createByokEngine:错误体特例保留在适配器内(classifyError读错误体,错误体明示认证失败归 key 无效、模型名错误或内容过长归瞬时),请求格式与凭据传递方式(x-goog-api-key 请求头而非查询串)不变。停止判据复核:公共构造参数数量未增长(适配器定义读起来不劣于改造前),也无需为本家引擎加入第二个特例扩展点 —— 判据未触发,保留三家引擎接入。
验证
pnpm typecheck通过;pnpm test647 个用例全部通过(gemini HTTP、跨引擎分类契约、探测契约等既有测试未修改且全部通过);pnpm build正常。Closes #335