Skip to content

Streaming Answers to expand #469

Description

@esokullu

Right now streaming answers are only shown with OpenAI ChatGPT 5.6 models in Ask mode (and when it's enabled in the settings > General > Advanced (on by default))

We need to expand it to other models supporting it. I've asked my AI about it and here's its response:

• Yes. The UI work in PR #191 is already provider-agnostic: anything emitting text_delta will render Markdown live. The remaining restriction is the Ask eligibility gate in src/chrome/src/agent/agent.js:1117,
which currently requires official OpenAI Responses.

Provider group Readiness
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
llama.cpp and local OpenAI-compatible servers Good first expansion; streaming parsers already exist
───────────────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────
Anthropic API and Claude OAuth Nearly ready; native text, tool-call, and usage streaming exists
───────────────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────
Azure OpenAI Nearly ready; existing Chat Completions SSE parser
───────────────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────
Gemini, Mistral, DeepSeek, Kimi, OpenRouter, Groq, etc. Shared OpenAI-compatible parser exists, but each needs protocol/usage fixtures
───────────────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────
AWS Bedrock Not yet; its chatStream() currently performs a non-streaming request

I’d implement it as a follow-up PR, not add it to #191:

  1. Replace _shouldStreamOpenAIAsk() with a provider capability-based Ask gate.
  2. Initially enable llama.cpp/local providers, Anthropic, and Azure.
  3. Require explicit terminal events such as [DONE] or Anthropic message_stop; never accept an unexpected EOF as a completed tool call.
  4. Keep tool calls withheld until terminal completion, as the OpenAI path does now.
  5. Preserve cost accounting—some compatible cloud APIs omit usage during streaming.
  6. Stage cloud routers behind provider fixtures, then enable them individually.
  7. Leave Bedrock disabled until /converse-stream event-frame parsing is implemented.

So: very feasible, and llama.cpp is a sensible first addition. Most of the infrastructure already exists in src/chrome/src/providers/llamacpp.js:93, src/chrome/src/providers/anthropic.js:248, and src/chrome/src/
providers/azure-openai.js:135.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions