Skip to content

Commit e150df9

Browse files
author
sin-context-bridge-builder
committed
fix: Auto-update AI SDKs in install script to prevent ProviderInitError
- opencode-config-install.sh now runs 'npm install @ai-sdk/fireworks@latest @ai-sdk/openai-compatible@latest' after config merge - Fixes ProviderInitError caused by OpenCode CLI 1.16.2 + outdated @ai-sdk/fireworks < 2.0.53 - Same fix as SIN-Code-FireworksAI-OpenCode-Config repo (da62a7d)
1 parent 05ae3d0 commit e150df9

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

opencode-config-install.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,17 @@ print(f"Reasoning: enabled (off/low/medium/high/max variants)")
229229
PYEOF
230230

231231
log_ok "opencode.json updated with Fireworks AI + Reasoning"
232+
233+
# AI-SDK compatibility fix — ensure latest provider packages
234+
if [ -d "${OPENCODE_DIR}/node_modules" ]; then
235+
log_info "Checking AI SDK versions..."
236+
cd "${OPENCODE_DIR}"
237+
if npm install @ai-sdk/fireworks@latest @ai-sdk/openai-compatible@latest --silent 2>/dev/null; then
238+
log_ok "AI SDKs updated (fireworks + openai-compatible)"
239+
else
240+
log_warn "AI SDK update failed — provider may crash if versions are incompatible"
241+
fi
242+
fi
232243
else
233244
log_info "DRY RUN — Would create/update opencode.json"
234245
fi

0 commit comments

Comments
 (0)