Repository navigation
feat(gemini): 移植 Argon 字段与推理映射 (#168) - #178
Merged
Merged
Conversation
(cherry picked from commit 52c1730)
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.
🔗 关联任务 / Related Issue
Closes #168
上游提交: QuantumNous@52c1730
🚀 变更类型 / Type of change
📝 变更描述 / Description
移植 Gemini Argon 字段及推理映射:支持 continuationToken、mediaProcessing 与请求蛇形别名;CONTINUATION 在流式及非流式 OpenAI 转换中映射为 length;加入 Argon 推理等级与默认值。仅改动授权的三个 relaykit 文件,保留 fork 现有行为,稳定 patch-id 与上游一致。
由 Codex 辅助移植与验证。当前 git 身份 woncc 与仓库主要历史作者一致。此 PR 等待独立人工审阅。
📸 运行证明 / Proof of Work
在 relaykit 目录,均设置 GOWORK=off GOMAXPROCS=2 RAYON_NUM_THREADS=2:
go test -p=2 ./dto/ ./relayconvert/internal/gemini_chat/ ./relayconvert/reasoning/ -count=1:dto、reasoning 通过;gemini_chat 原无测试。go test -p=2 -overlay=/home/box/.parallel-project-orchestrator/programs/new-api-cherry-20261022/runtime/R0209W168/g4-R0209W168-52c173038-01/tools/overlay.json ./relayconvert/internal/gemini_chat/ -run '^TestR0209' -count=1 -v:3 个定向测试全部通过,覆盖字段往返及显式零值、Argon 默认值与等级/预算转换、两种响应的 CONTINUATION/MAX_TOKENS 映射。测试通过 Go overlay 注入,未新增仓库文件。go build -p=2 ./...:退出码 0,证明模块独立构建。git diff --check HEAD^ HEAD:通过。未调用真实 Gemini 服务;未运行全仓或数据库矩阵(本次无数据库改动)。原始日志和补丁清单已归档于工作包 evidence/R0209W168/g4-R0209W168-52c173038-01。
✅ 提交前检查项 / Checklist