rig icon indicating copy to clipboard operation
rig copied to clipboard

refactor: Unify openai-with-reasoning streaming

Open Sytten opened this issue 1 month ago • 1 comments

Right now we do a great job of re-using streaming for providers that are openai completion api compliant. But we don't do a good job of those that are also the same but allow reasoning (openrouter, together, groq).

Open to suggestions where we could put that code, but the streaming logic is identical except the reasoning. We might want to externalize that logic into it's own module external to any provider with its own set of structures?

streaming/
  - completion.rs
  - completion_reasoning.rs
  - response.rs

Sytten avatar Nov 21 '25 18:11 Sytten

RIG-1054

linear[bot] avatar Nov 21 '25 18:11 linear[bot]