Repository navigation
Conversation
beta 上的 lib test 目标在 6f47f7f 就已编译不过(与本次改动无关): - pipeline.rs 的 RequestQuery 初始化缺 client/api_key/production_only/completed_only - provider_loop/tests.rs 的 send_with_retry 调用少传 telemetry 的 Arc 与 images 只补齐参数与字段,不改生产逻辑。修好之后新增的回归测试才跑得起来。
PR aimod-cc#362 只去掉了 message 与 function_call 的伪造 id,但同一个 push_assistant_items 里还留着最危险的一处:reasoning 项仍用 random_id("rs") 现造 id 去配真实的 encrypted_content。 依据(官方 Responses schema):input 项的 id 一律 optional,FunctionCall.id 写明 "Populated when this item is returned via API",function_call_output 同样 optional;工具配对只认 call_id。所以重建的 input 项本来就不需要 id。 而给带密文的 reasoning 项配一个伪造 rs_ 比不带 id 更糟:严格上游 (官方 store=false)按 item id 查已存项,查不到就整轮拒绝。连续性由 encrypted_content 本体承载,与 id 无关 —— 去掉 id 不影响下一轮接续。 顺带补三条回归测试:reasoning 项无 id 但保留密文、缺 id 时 call_id 仍能 配对、空正文轮次不产生空 assistant message。
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.
修改
message与function_callinput 项伪造持久化id。call_id,确保 function call/output 仍正确配对。验证
cargo test --manifest-path desktop-tauri/src-tauri/server/Cargo.toml rebuilt_assistant_input_items_omit_ids_and_preserve_tool_pairing未能完成:测试目标编译时报E0061/E0063(provider-loop 测试调用参数与结构字段不匹配);尚未证明这些错误与本 PR 相关。🤖 本条回复由 AI Agent 生成
Generated by an AI agent.