fix(skills): align llm-provider stream() signature across platforms#178
Open
xiaolai wants to merge 1 commit intocaliber-ai-org:masterfrom
Open
fix(skills): align llm-provider stream() signature across platforms#178xiaolai wants to merge 1 commit intocaliber-ai-org:masterfrom
xiaolai wants to merge 1 commit intocaliber-ai-org:masterfrom
Conversation
The .agents/ and .cursor/ llm-provider skills described incompatible LLMProvider.stream() signatures that contradict src/llm/types.ts: - .agents/ used AsyncGenerator<string> (generator pattern) - .cursor/ used AsyncIterable<StreamChunk> with ChatMessage[]/ChatParams The actual interface is callback-based: stream(options: LLMStreamOptions, callbacks: LLMStreamCallbacks): Promise<void> Updated both platform copies to match the authoritative .claude/ version and the actual src/llm/types.ts definition. Co-Authored-By: Claude Code <noreply@anthropic.com>
This was referenced Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
The
.agents/and.cursor/copies ofskills/llm-provider/SKILL.mddocument incompatibleLLMProvider.stream()signatures that contradict the actual interface insrc/llm/types.ts:stream()signature.claude/stream(options: LLMStreamOptions, callbacks: LLMStreamCallbacks): Promise<void>✅.agents/async *stream(request: LLMRequest): AsyncGenerator<string>❌.cursor/async *stream(messages: ChatMessage[], params: ChatParams): AsyncIterable<StreamChunk>❌The actual interface (from
src/llm/types.ts):Why it matters
An agent following the
.agents/or.cursor/skill will generate a provider class with a generator-basedstream()method that doesn't match theLLMProviderinterface. This produces a TypeScript compile error (does not implement LLMProvider) before any code runs, breaking provider development for anyone using those platform skills.Fix
Updated
.agents/and.cursor/to document the correct callback-based signature, matching.claude/and the actualsrc/llm/types.tsdefinition. Import types and constructor pattern also corrected in the.cursor/version which had diverged more significantly (was usingChatMessage[],ChatParams,ChatError,StreamChunk— none of which exist in this codebase).