Repository navigation
GPT-OSS: return a whole declared call written as the answer or inside the analysis - #2694
Merged
Merged
Conversation
… the analysis For an auto request that declares tools, GPT-OSS sometimes answers after the loop guard ended its analysis with the call's JSON arguments and no recipient, or ends an analysis it never closes with a complete call frame, and the Harmony parser returns no call. GPTOSSToolCallRecovery holds the answer after the loop guard's exit to the end of generation and returns it as a call when it is one final (or recipientless commentary) message holding a single JSON object that exactly one declared tool admits: every key a declared property and the caller's schema holding (ToolConstraintValidation.breaksDeclaration). A still-open analysis that ends with to=functions.<declared>, its header, <|message|> and one JSON object the schema holds returns that call. Anything else, an answer cut at the limit, or a response that has a call, leaves as before. No rendered prompt changes. DARKBLOOM_GPTOSS_TOOL_CALL_RECOVERY=0|off|false|no turns it off.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
DARKBLOOM_GPTOSS_TOOL_CALL_RECOVERY joins LaunchAgent.inferencePassthroughEnvKeys, so its off word reaches a provider run by launchd, as the other GPT-OSS switches do; tested with the passthrough. The scheduler routes through the recovery with optional chaining.
This was referenced Nov 24, 2026
…ice serves A required choice refuses an anyOf parameter before any recovery is made, so the check now declares a plain integer parameter.
jonathan308
added a commit
that referenced
this pull request
Nov 24, 2026
5 of 6 tasks
The configuration reference gains rows on both sides at the same place; the merge keeps both. No code change.
jonathan308
added a commit
that referenced
this pull request
Nov 24, 2026
This was referenced Nov 24, 2026
This branch was successfully deployed
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.
Summary
For an
autoGPT-OSS request that declares tools, the model sometimes writes the call in a form the Harmony handler doesn't return as a call:to=functions.<name>frame.GPTOSSToolCallRecoverynow returns these as calls, under strict conditions:ToolConstraintValidationfinds nothing the declaration rules out.Unchanged: anything else, answers cut at the limit or by length, and responses that already hold a call. The rendered prompt doesn't change.
DARKBLOOM_GPTOSS_TOOL_CALL_RECOVERY(0/off/false/no) turns it off; it is on by default and forwarded to the LaunchAgent (testtheSwitchReachesTheDaemon). #2700 holds the same change with the default off.Stacked on #2689 (the pin to SDK main
e7918994a7); the base moves todevonce that lands. No SDK change.Linked issue
None.
Test plan
GPTOSSToolCallRecoveryTests.{};tool_choicenone/required, other models, the switch off;df05929921): its recovery holds nothing and returns no call, so exactly these fail:anAnswerThatIsOneToolsArgumentsLeavesAsThatCall(both cases);aRecipientlessCommentaryAnswerAlsoLeavesAsTheCall;anAnswerCutAtTheLimitOrWithACallIsNotRead(nothing is held, so a call does not release held text before itself);aCompleteFrameEndingTheOpenAnalysisLeavesAsTheCall;theSchedulerReturnsTheRecoveredCalls(streamed and complete).scripts/changelog.py check,scripts/docs-impact-check.py.Refactor pass: no change justified.
Components touched
Protocol / interface changes
DARKBLOOM_GPTOSS_TOOL_CALL_RECOVERY(on by default); no wire or release change.Documentation impact
docs/reference/configuration.md; changelog fragmentchangelog.d/gptoss-tool-call-recovery.md.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.