Repository navigation
Conversation
Three leftovers from merging main, none of them intentional: - ReActAgent.Builder.copy() assigned copy.agentId twice, the second one after copy.description. Builder setters are idempotent so behaviour is unchanged, but the method no longer matched main and the extra line reads as if two different fields were being wired. - HarnessAgentIdTest chained legacySessionHistory(true) twice in the same builder call, in both fixtures. Harmless, but that file belongs to the agentId change, not to a structured-output fix. - MockModel's javadoc for supportsToolChoiceSpecific justified its true default with "since most models support it; only the few providers that don't override it to false". That rationale is the one this branch reverses when it flips the interface default to false, and it calls a test mock a "provider". Reworded to say what the mock does and to point at setSupportsToolChoiceSpecific for opting out. No production behaviour change.
wahllllll
force-pushed
the
fix/structured-output-merge-residue
branch
from
October 10, 2026 07:00
15f090f to
8184a65
Compare
Author
|
Closing this — you did the same cleanup yourself in I checked the three files at your head:
So there is nothing left to merge here, and a conflicting PR sitting in your fork is just noise. Note that the four review points in my comment on agentscope-ai#2697 are untouched by that commit, so they are still open for discussion there. The one I would most like a decision on is the |
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 this is
Follow-up to agentscope-ai#2697. I reviewed the branch and found three leftovers from the merge of
main— all cosmetic, but two of them are the kind of thing that makes the next reviewer stop and re-derive intent. I fixed them here rather than only commenting, so you can take the commit as-is if you agree.Branch:
wahllllll:fix/structured-output-merge-residue, three files,+7 / −5, no production behaviour change.The three cleanups
1.
ReActAgent.Builder.copy()assignedcopy.agentIdtwice (agentscope-core/src/main/java/io/agentscope/core/ReActAgent.java)copy.name = this.name; copy.agentId = this.agentId; copy.description = this.description; - copy.agentId = this.agentId; copy.sysPrompt = this.sysPrompt;mainhas exactly onecopy.agentIdline. The setters are idempotent so nothing changes at runtime, but the duplicate sits aftercopy.description, so at a glance it reads as if a field between the two lines was being re-wired.2.
HarnessAgentIdTestchainedlegacySessionHistory(true)twice (agentscope-harness/src/test/java/io/agentscope/harness/agent/HarnessAgentIdTest.java).legacySessionHistory(true) .model(stubModel()) .workspace(workspace) - .legacySessionHistory(true) .build();Both fixtures, same shape. After the fix the file is byte-identical to
mainand drops out of agentscope-ai#2697's diff entirely — which also answers the "why is this file in a structured-output PR" question for free.3.
MockModel's javadoc defends its default with the assumption this branch drops (agentscope-core/src/test/java/io/agentscope/core/agent/test/MockModel.java)The comment read:
Two things are off now. "Most models support it" is precisely the assumption this branch drops when it flips the interface default to
false, so the only reason a reader is given for the mock returningtrueis the claim the branch just rejected — the reader has no way to tell that the mock is deliberately diverging. And it calls a test mock a "provider". Rewritten to state what the mock actually does and to point atsetSupportsToolChoiceSpecific(...)for opting out.Four things I did not change
These are judgement calls on your design, not defects I should be editing under you. Details and evidence are in my review comment on agentscope-ai#2697; short version:
Model.supportsToolChoiceSpecific()default flippedtrue→falsein4fe0e54f. That is the right instinct (never assume a namedtool_choiceon an unknown endpoint) but it silently moves every OpenAI-compatible deployment pointed at a self-hosted or gateway URL — vLLM, internal gateways, direct Moonshot — off the hard constraint and onto the prompt reminder. For those users the hard constraint was the reliability this PR adds. Worth an explicit migration note and a release-notes line.supportsToolChoiceSpecific() == falsemodels the forced retry cannot escalate. The reminder text is regenerated identically each round and the hard constraint is gated onsoForceToolChoiceCount > 0, so rounds 2 and 3 only re-append the model's own rejected answer. Your owntestStructuredOutputPromptReminderPresentOnEveryFallbackRoundassertsList.of(1, 1, 1)— same count every round. The three-round budget is real; the pressure is not.state.contextMutable()(theeventMsgadd runs before theisFinishedcheck), so up to three rejected answers persist — unlike the deliberately transient reminder right next to them.KimiModelProvider'snativeStructuredOutputflippedfalse→true. Unlike the other three this one is not a defect — you updated the class javadoc in step, so it is deliberate. It is just the one change in4fe0e54fthat has nothing to do withtool_choice, and it changes which path Kimi takes, so it deserves its own line in the release notes rather than riding along inside a tool_choice fix.Verification
BUILD SUCCESS,MVN_EXIT=0.ReActAgentStructuredOutputTest: 13 run, 0 failures, 0 errors, 1 skipped.HarnessAgentIdTest: 1 run, 0 failures. Spotless clean on both modules.Your
3421ac5merge ofmaindoes not change any of this — I re-read all three files at that revision and the counts are unchanged (copy.agentId×2,.legacySessionHistory(true)×5). This PR is stillMERGEABLEagainst your branch.Take it, cherry-pick it, or ignore it — the review comment stands on its own.