You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(provider): duplicated Bedrock/SSE fixes in provider.ts's legacy custom loader missed by earlier ports #242
This fork has some provider logic duplicated in two places: a canonical copy in a packages/core plugin/helper, and a legacy copy inside packages/opencode/src/provider/provider.ts's "custom" loader / its own wrapSSE(). Two upstream (anomalyco/opencode) bug fixes were ported to the canonical copy but missed the duplicate:
Bedrock model-id resolution (amazon-bedrock custom loader's getModel()): double-prefixes full Bedrock ARNs (arn:..., which Bedrock rejects) and over-matches "deepseek" (prefixing non-R1 DeepSeek models that don't need/support cross-region inference). Already fixed in packages/core/src/plugin/provider/amazon-bedrock.ts (commit d66cefea74, upstream ac1758c0e6), not in provider/provider.ts's own copy.
wrapSSE() reader-cancel rejection: the timeout path calls void reader.cancel(err), leaving an unhandled promise rejection when the stream already errored. Already fixed in packages/core/src/aisdk.ts (commit ac3b15ba8d, upstream 69c172e8a7), not in provider/provider.ts's own wrapSSE().
How to verify
tsgo --noEmit on packages/core and packages/opencode.
oxlint on the changed file.
Re-read the fix against the sibling file it duplicates to confirm it's the same change.
Fixed in commit 3e9c5f9 by adding �rn: early return and deepseek.r1 scope in provider.ts's Bedrock getModel, and catch() handler to
eader.cancel() in wrapSSE.
Activity
alltomatos commentedon Sep 15, 2026
Fixed in commit 3e9c5f9 by adding �rn: early return and deepseek.r1 scope in provider.ts's Bedrock getModel, and catch() handler to
eader.cancel() in wrapSSE.