Skip to content

fix: enable useLegacyCompletionsEndpoint to use openai package streaming#10026

Open
uinstinct wants to merge 6 commits intocontinuedev:mainfrom
uinstinct:unverified-org
Open

fix: enable useLegacyCompletionsEndpoint to use openai package streaming#10026
uinstinct wants to merge 6 commits intocontinuedev:mainfrom
uinstinct:unverified-org

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Jan 30, 2026

Description

Add supports for useLegacyCompletionsEndpoint to use openai adapter streaming.

closes CON-5285

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Continue Tasks: ▶️ 1 queued · ✅ 1 no changes — View all


Summary by cubic

Disables streaming for OpenAI o-series/GPT-5 when the legacy completions endpoint is used, aligning behavior with model constraints. Addresses CON-5285.

Written for commit be39317. Summary will update on new commits.

@uinstinct uinstinct requested a review from a team as a code owner January 30, 2026 07:06
@uinstinct uinstinct requested review from sestinj and removed request for a team January 30, 2026 07:06
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 30, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

@uinstinct since stream is already in completion options, how does this impact functionality? I think we should avoid adding a duplicate configuration option.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jan 31, 2026
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Feb 2, 2026
@uinstinct uinstinct changed the title feat: add requestoptions.stream in model config fix: enable useLegacyCompletionsEndpoint to use openai package streaming Feb 2, 2026
@uinstinct
Copy link
Contributor Author

@uinstinct since stream is already in completion options, how does this impact functionality? I think we should avoid adding a duplicate configuration option.

My bad - I thought since completionOptions.stream was removed from config.yaml reference doc, support was dropped.

Added that back to the config.yaml reference in docs

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

@uinstinct could you clarify how useLegacyCompletionsEndpoint and stream are related? As far as I understand useLegacyCompletionsEndpoint is for using a different URL endpoint /completions which was used prior to chat/completions coming out. stream is the issue here (you can use chat/completions with stream = false)

@uinstinct
Copy link
Contributor Author

openai models (which require org verifications) cannot use the responses endpoint - so when useLegacyCompletionsEndpoint is enabled, it should only use the completions endpoint.

@RomneyDa
Copy link
Collaborator

RomneyDa commented Feb 6, 2026

@uinstinct the legacy completions endpoint is the ancient /completions, users should rarely use that for newer models. The fallback from responses should be /chat/completions.

But I don't think we need to fallback to that either, I think they can use responses, they just can't stream it. Kilo code fixed this by adding a stream toggle, I don't think they routed to a different endpoint. I think the issue is that stream isn't supported properly, or that we don't have error handling to detect the verification issue and switch streaming off.||

I think a stream toggle (which only shows when error detected) is a decent solution, as long as the stream parameter actually works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants