Skip to content

Normalize compact stream flag - #2

Closed
rabesss wants to merge 3 commits into
devfrom
overlay-migration/cliproxyapi-compact-stream-fix
Closed

Normalize compact stream flag#2
rabesss wants to merge 3 commits into
devfrom
overlay-migration/cliproxyapi-compact-stream-fix

Conversation

@rabesss

@rabesss rabesss commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • allow /v1/responses/compact requests that include stream: true
  • normalize compact requests by removing stream before dispatching the non-streaming compact executor path
  • update the compact handler test to assert the request executes and the executor payload no longer includes stream

Root Cause

The compact handler rejected stream: true before provider execution, which produced the first compact stream parity blocker against the shim path. The shim-compatible behavior is to treat compact as a JSON compact response and ignore the stream flag.

Validation

GitHub Actions unavailable due to exhausted Actions minutes; validation is local/manual only.

Local checks run:

  • go test ./sdk/api/handlers/openai -run 'TestOpenAIResponsesCompact'
  • go build -o test-output ./cmd/server then removed test-output
  • node scripts/ci/protocol-parity-harness.js --plan
  • node --test scripts/ci/protocol-parity-harness.test.js
  • git diff --check
  • focused secret scan over touched files

Live redacted parity note: the latest redacted report was inspected and identifies compact_stream_true:cline-pass-glm-5-2 as the first hard-gate blocker. A patched live redacted compare still needs to be run after deploying or launching this CLIProxyAPI build locally.

@github-actions
github-actions Bot changed the base branch from main to dev July 8, 2026 17:51
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

This pull request targeted main.

The base branch has been automatically changed to dev.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0a86aff0-5757-4050-9674-d8f7c6de74ec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rabesss
rabesss changed the base branch from dev to main July 8, 2026 17:52
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

This pull request targeted main.

The base branch has been automatically changed to dev.

@github-actions
github-actions Bot changed the base branch from main to dev July 8, 2026 17:52
@rabesss
rabesss changed the base branch from dev to main July 8, 2026 17:52
@github-actions
github-actions Bot changed the base branch from main to dev July 8, 2026 17:52
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

This pull request targeted main.

The base branch has been automatically changed to dev.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the OpenAI responses compact handler to normalize requests containing the "stream" parameter instead of rejecting them with a 400 Bad Request. Specifically, it removes the check that rejects "stream": true and instead deletes the "stream" field from the payload if it exists. The corresponding unit tests have been updated to verify this normalization behavior. I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@rabesss

rabesss commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Closing this as diagnostic evidence only. The PR proved the Codex compact stream: true direct-bypass gap, but we are not going to maintain Codex-specific Responses compatibility inside CLIProxyAPI. CLIProxyAPI should remain an upstream/provider aggregator; the maintained Codex compatibility route belongs in codex-shim. Do not merge this PR.

@rabesss rabesss closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant