Skip to content

[BUG] OpenAI Compatible provider using "user" role when not streaming #8215

@whitfin

Description

@whitfin

Problem (one or two sentences)

We hit an issue with our OpenAI compatible API because when "Enable Streaming" is not checked, the system prompt is provided with a "user" role: https://github.com/RooCodeInc/Roo-Code/blob/main/src/api/providers/openai.ts#L222-L225

I'm happy to file the PR for this, but as I'm not fully familiar with why this was done I'm filing it as a bug with hopes of clarification.

Context (who is affected and when)

This happens when using OpenAI Compatible providers, when a user switches between streaming and non-streamed responses.

Reproduction steps

  1. Any Roo environment using "OpenAI Compatible" provider
  2. Create a request with streaming enabled
  3. Create a request with streaming disabled

Expected result

Role shows as "system" for both requests

Actual result

Role shows "user" for request with streaming disabled

Variations tried (optional)

No response

App Version

3.28.5

API Provider (optional)

OpenAI Compatible

Model Used (optional)

No response

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions