Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Motivation
grok-superimage-1.0) with consistent server-side image generation parameters and safer streaming semantics.Description
grok-superimage-1.0inModelServiceand a server-side image config loader_superimage_server_image_config()in the chat API to enforce serversuperimagesettings for that model._safe_sse_stream()and_streaming_error_response()inapp/api/v1/chat.pyto catch exceptions during streaming and emit SSEerrorevents (usesorjson), and wrapped streaming returns to use the safe wrapper.retry.max_retry, propagatetried_tokens, and add recovery logic: additional parallel recovery attempts configured byimage.blocked_parallel_attemptsandimage.blocked_parallel_enabled; image collectors now only accept images meetingfinal_min_bytesand run extra attempts when finals are insufficient.ws_imagine) with blocked-detection tuning (blocked_grace_seconds), parallel retry collection when blocked is suspected, and clearer logging; adjusted classification rules to use a byte-size threshold for final images.ImageWSStreamProcessor,ImageWSCollectProcessor,ImageStreamProcessor) to only expose final results for chat-formatted streaming, ensure a final empty chat chunk if none were emitted, and preserve original image names forgrok-superimage-1.0URL outputs (no-finalsuffix).app/services/grok/utils/retry.py(transient_upstream) and use it inChatServiceto retry with alternate tokens on likely transient errors; also defaultedretry.max_retryfallback to3where used.app/services/reverse/app_chat.pyby normalizing SOCKS schemes and using theproxyparameter for SOCKS proxies while usingproxiesfor HTTP proxies, plus better timeout source selection.app/core/config.pyto avoid overwriting remote config with empty data during initialization and log when skipping persistence.image.blocked_grace_seconds,image.blocked_parallel_attempts,image.blocked_parallel_enabled, and a new[superimage]section inconfig.defaults.toml; updatedreadme.mdand admin JS (app/static/admin/js/config.js) to expose the new options and documentgrok-superimage-1.0behavior.get_storageimport renamed toresolve_storagein admin config to avoid name clash with endpoint function.Testing
pytest(existing tests) and the suite completed without failures.POST /v1/chat/completionsflow forgrok-superimage-1.0including streaming and non-streaming image responses and observed correct server-controlledn/size/response_formatand final-only streaming behavior.ws_imaginepath to validate blocked-detection and parallel recovery logic under simulated preview-only responses.npm build/static serve) to confirm new config fields are visible and editable in the admin panel.Codex Task