Fix Codex OAuth empty responses for gpt-5.4#2443
Open
Pepelospalotes2005 wants to merge 1 commit intosipeed:mainfrom
Open
Fix Codex OAuth empty responses for gpt-5.4#2443Pepelospalotes2005 wants to merge 1 commit intosipeed:mainfrom
Pepelospalotes2005 wants to merge 1 commit intosipeed:mainfrom
Conversation
|
|
a688e03 to
28830bc
Compare
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
Fix empty-response handling for Codex/OpenAI OAuth
gpt-5.4by improving fallback extraction when the final SDK response arrivescompletedbut without hydrated output items.Problem
With OpenAI OAuth connected and model
gpt-5.4, PicoClaw could reach the Codex backend successfully, consume tokens, and still return an empty assistant response.Observed behavior:
auth_method = oauthwas applied correctly toopenai/gpt-5.4content_len=0and surfaced the fallback:The model returned an empty response. This may indicate a provider error or token limit.Root cause
Two related response-shape issues:
responses.Responsecould arrivecompletedbut with no hydratedOutputitemsResponseobject remained effectively emptyFix
1. Responses parser fallback
In
pkg/providers/openai_responses_common/responses_common.go:apiResp.OutputText()when the manualOutputtraversal produces empty content2. Codex streaming fallback
In
pkg/providers/codex_provider.go:response.output_text.deltaresponse.output_text.doneresponse.reasoning_text.deltaValidation
Validated on a live ARM64 Linux VPS running the forked binary behind the real launcher/dashboard flow:
gpt-5.4now returns actual text instead of the empty-response fallbackNotes
This PR intentionally excludes local ARM64 Matrix/libolm build workarounds used only for building on the test VPS.