pull/20159/head
Frank 2026-03-30 19:04:42 -04:00
parent 39a47c9b8c
commit 58f60629a1
3 changed files with 3 additions and 3 deletions

View File

@ -471,7 +471,7 @@ export async function handler(
reqModel, reqModel,
providerModel: modelProvider.model, providerModel: modelProvider.model,
adjustCacheUsage: providerProps.adjustCacheUsage, adjustCacheUsage: providerProps.adjustCacheUsage,
safetyIdentifier: ip, safetyIdentifier: modelProvider.safetyIdentifier ? ip : undefined,
workspaceID: authInfo?.workspaceID, workspaceID: authInfo?.workspaceID,
} }
if (format === "anthropic") return anthropicHelper(opts) if (format === "anthropic") return anthropicHelper(opts)

View File

@ -32,7 +32,7 @@ export const oaCompatHelper: ProviderHelper = ({ adjustCacheUsage, safetyIdentif
return { return {
...body, ...body,
...(body.stream ? { stream_options: { include_usage: true } } : {}), ...(body.stream ? { stream_options: { include_usage: true } } : {}),
//...(safetyIdentifier ? { safety_identifier: safetyIdentifier } : {}), ...(safetyIdentifier ? { safety_identifier: safetyIdentifier } : {}),
} }
}, },
createBinaryStreamDecoder: () => undefined, createBinaryStreamDecoder: () => undefined,

View File

@ -37,6 +37,7 @@ export namespace ZenData {
disabled: z.boolean().optional(), disabled: z.boolean().optional(),
storeModel: z.string().optional(), storeModel: z.string().optional(),
payloadModifier: z.record(z.string(), z.any()).optional(), payloadModifier: z.record(z.string(), z.any()).optional(),
safetyIdentifier: z.boolean().optional(),
}), }),
), ),
}) })
@ -49,7 +50,6 @@ export namespace ZenData {
payloadModifier: z.record(z.string(), z.any()).optional(), payloadModifier: z.record(z.string(), z.any()).optional(),
payloadMappings: z.record(z.string(), z.string()).optional(), payloadMappings: z.record(z.string(), z.string()).optional(),
adjustCacheUsage: z.boolean().optional(), adjustCacheUsage: z.boolean().optional(),
safetyIdentifier: z.boolean().optional(),
}) })
const ModelsSchema = z.object({ const ModelsSchema = z.object({