feat(ai-provider): messages.stream — the adapter half that was missing #5627
ccantynzAI Reviewcommented 19h ago
AI Triage
(no summary)
Priority: medium Risk area: mixed
Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)
Suggestions only — nothing has been applied. The PR author stays in control.
gluecron[bot]🤖 botAI Reviewcommented 19h ago
AI review unavailable
The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Summary
PR B of the multi-provider build.
AiClientLikeimplemented onlymessages.create, soAI_PROVIDER=openaicrashed all four streaming features (personal-chat, repo-chat, spec-ai, streaming-review) withmessages.stream is not a function.for awaitover Anthropic-shaped events (content_block_delta/message_deltawith usage /message_stop) and.on("text")+.finalMessage().stream_options.include_usageasks for token counts on the tail chunk so cost tracking sees real numbers; servers that ignore it degrade to 0, never NaN.With this merged, one env var (
AI_PROVIDER=openai+AI_BASE_URL) points the entire platform — streaming features included — at OpenAI, Azure, OpenRouter, Groq, Together, Ollama, vLLM, or llama.cpp.Test plan
tsc --noEmitclean,bun buildclean