Problem
AI SDK @ai-sdk/openai@2.0.50 (Oct 12, 2025) introduced item_reference usage that breaks plugins requiring store: false.
Error:
Item with id 'fc_xxx' not found. Items are not persisted when store is set to false.
Root Cause
Normal prompts work:
session/prompt.ts:276 passes providerOptions to streamText(), allowing config store: false to apply.
Compaction broken:
session/compaction.ts:125 calls generateText() WITHOUT providerOptions:
const generated = await generateText({
maxRetries: 10,
model: model.language,
messages: [...]
// Missing: providerOptions
})
Result: AI SDK defaults to store: true, creates item_reference items that can't resolve.
Fix
Options:
- Allow for specifying which version of packages to use
- Don't set version upgrades to latest for dependencies
- Let compaction take from provider options as prompt does
Add to session/compaction.ts:125:
const generated = await generateText({
maxRetries: 10,
model: model.language,
providerOptions: {
[model.npm === "@ai-sdk/openai" ? "openai" : model.providerID]: model.info.options,
},
messages: [...]
})
Workaround Tried
Force Downgrade to @ai-sdk/openai@2.0.49 (butwill be overwritten on plugin reload):
cd ~/.cache/opencode
echo '{"dependencies":{"opencode-copilot-auth":"0.0.3","opencode-anthropic-auth":"0.0.2","@ai-sdk/openai":"2.0.49"}}' > package.json
rm -rf node_modules && npm install
Problem
AI SDK
@ai-sdk/openai@2.0.50(Oct 12, 2025) introduceditem_referenceusage that breaks plugins requiringstore: false.Error:
Item with id 'fc_xxx' not found. Items are not persisted when store is set to false.
Root Cause
Normal prompts work:
session/prompt.ts:276passesproviderOptionstostreamText(), allowing configstore: falseto apply.Compaction broken:
session/compaction.ts:125callsgenerateText()WITHOUTproviderOptions:Result: AI SDK defaults to store: true, creates item_reference items that can't resolve.
Fix
Options:
Add to session/compaction.ts:125:
Workaround Tried
Force Downgrade to @ai-sdk/openai@2.0.49 (butwill be overwritten on plugin reload):