refactor(core): remove dead AI SDK ID stripping (#43741)

Co-authored-by: rekram1-node <63023139+rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-08-20 20:44:53 -05:00 committed by GitHub
parent 67e87f534e
commit fdc4fd8268
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -133,20 +133,6 @@ function prepareOptions(model: Info, pkg: string) {
if (abortSignals.length === 1) opts.signal = abortSignals[0]
if (abortSignals.length > 1) opts.signal = AbortSignal.any(abortSignals)
if (
(pkg === "@ai-sdk/openai" || pkg === "@ai-sdk/azure" || pkg === "@ai-sdk/amazon-bedrock/mantle") &&
opts.body &&
opts.method === "POST"
) {
const body = JSON.parse(opts.body as string)
if (body.store !== true && Array.isArray(body.input)) {
for (const item of body.input) {
if ("id" in item) delete item.id
}
opts.body = JSON.stringify(body)
}
}
if (typeof opts.body === "string" && model.body !== undefined) {
const decoded = Option.getOrUndefined(decodeJson(opts.body))
if (Schema.is(Schema.Record(Schema.String, Schema.Json))(decoded)) {