Fix Codex stream recovery when terminal output is empty - #33091
Closed
AslanJ wants to merge 3 commits into
Closed
Conversation
Separate Kimi Code and Moonshot China provider mappings so the model picker does not show duplicate or misleading Kimi rows. Kimi Code uses api.kimi.com/coding and exposes kimi-for-coding. Moonshot China uses api.moonshot.cn/v1 and exposes K2/Kimi models.
…rate_limit The function is defined in run_agent.py but conversation_loop.py called it as a bare name. Since the module is only imported lazily inside _ra(), the symbol was not available in the local namespace. Use _ra()._pool_may_recover_from_rate_limit() so the call goes through the lazy reference, matching the pattern used elsewhere. Fixes: NameError when rate-limit fallback logic is triggered.
Collaborator
Contributor
|
Closing as obsolete — same reason as #33103. PR #33042 (commit cb38ce2) eliminates the SDK's |
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
Fixes Codex Responses streaming recovery when the OpenAI SDK encounters a terminal response with
output=None.Changes include:
TypeError: 'NoneType' object is not iterableduring Responses stream parsingresponses.create(stream=True)output_textfallback access in normalization and validation pathsTesting
venv/bin/pytest tests/run_agent/test_run_agent_codex_responses.py -k 'codex_stream or codex_empty_output' tests/run_agent/test_codex_xai_oauth_recovery.py