Repository navigation
fix(jev): apply initial effort to native Chat dispatch (carry #6750) #6790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -764,7 +764,7 @@ export async function executeComboResponses( | |
| initialJevDecision ? initialJevDecision.effort : comboDefaultEffort(config, comboId), | ||
| initialJevDecision?.effort === null ? [] : targetReasoningEfforts, | ||
| combo.reasoningEffortMode, | ||
| initialJevDecision !== undefined && initialJevDecision.effort !== null ? "force" : combo.defaultEffortMode, | ||
| initialJevDecision ? (initialJevDecision.effort === null ? "fallback" : "force") : combo.defaultEffortMode, | ||
| ); | ||
| if (initialJevDecision) { | ||
| delete childBody.service_tier; | ||
|
|
@@ -860,7 +860,7 @@ export async function executeComboResponses( | |
| && targetEligible(target) | ||
| && !isComboTargetInCooldown(comboId, target), | ||
| ); | ||
| const nativeChild = protocolLanes?.nativeChild(pick.target, targetRoute, targetSendBudget); | ||
| const nativeChild = protocolLanes?.nativeChild(pick.target, targetRoute, targetSendBudget, initialJevDecision); | ||
| response = nativeChild ? await dispatchNativeComboChild({ | ||
| source: options.protocolSource!, | ||
| plan: nativeChild, | ||
|
|
@@ -909,8 +909,8 @@ export async function executeComboResponses( | |
| onNativePassthroughCancel: callbackGate.onCancel, | ||
| onResponseComplete: callbackGate.onResponseComplete, | ||
| }); | ||
| // Native Chat rebuilds its own body and does not apply the initial JEV effort. | ||
| restoreOriginalRequestedEffort(childLog, nativeChild ? undefined : initialJevDecision?.effort); | ||
| // Both lanes applied the initial choice before provider pins/caps; retain those transitions. | ||
| restoreOriginalRequestedEffort(childLog, initialJevDecision?.effort); | ||
|
Comment on lines
+912
to
+913
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For a native request where JEV explicitly selects AGENTS.md reference: structure/AGENTS.md:L9-L10 Useful? React with 👍 / 👎. |
||
| } catch (error) { | ||
| callbackGate.discard(); | ||
| if (options.abortSignal?.aborted) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When native Chat is enabled and JEV selects an effort that has a provider wire alias—such as
ultra, which must becomemax, orxhighwithreasoningEffortMap: { xhigh: "high" }—this assignment sends the semantic value directly.normalizePinnedChatEffortinvokesmapReasoningEffortonly after a pin or cap rewrite, whilebuildOpenAIChatPassthroughRequestdeliberately preserves the remaining raw value, so an unpinned JEV choice can reach the provider unsupported and be rejected. Normalize this policy-produced effort before dispatch while retaining the semantic value for logging; the updated structure docs currently promise that wire normalization runs afterward.AGENTS.md reference: structure/AGENTS.md:L9-L10
Useful? React with 👍 / 👎.