Skip to content

Commit 58f6062

Browse files
committed
wip: zen
1 parent 39a47c9 commit 58f6062

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/console/app/src/routes/zen/util/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ export async function handler(
471471
reqModel,
472472
providerModel: modelProvider.model,
473473
adjustCacheUsage: providerProps.adjustCacheUsage,
474-
safetyIdentifier: ip,
474+
safetyIdentifier: modelProvider.safetyIdentifier ? ip : undefined,
475475
workspaceID: authInfo?.workspaceID,
476476
}
477477
if (format === "anthropic") return anthropicHelper(opts)

packages/console/app/src/routes/zen/util/provider/openai-compatible.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const oaCompatHelper: ProviderHelper = ({ adjustCacheUsage, safetyIdentif
3232
return {
3333
...body,
3434
...(body.stream ? { stream_options: { include_usage: true } } : {}),
35-
//...(safetyIdentifier ? { safety_identifier: safetyIdentifier } : {}),
35+
...(safetyIdentifier ? { safety_identifier: safetyIdentifier } : {}),
3636
}
3737
},
3838
createBinaryStreamDecoder: () => undefined,

packages/console/core/src/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export namespace ZenData {
3737
disabled: z.boolean().optional(),
3838
storeModel: z.string().optional(),
3939
payloadModifier: z.record(z.string(), z.any()).optional(),
40+
safetyIdentifier: z.boolean().optional(),
4041
}),
4142
),
4243
})
@@ -49,7 +50,6 @@ export namespace ZenData {
4950
payloadModifier: z.record(z.string(), z.any()).optional(),
5051
payloadMappings: z.record(z.string(), z.string()).optional(),
5152
adjustCacheUsage: z.boolean().optional(),
52-
safetyIdentifier: z.boolean().optional(),
5353
})
5454

5555
const ModelsSchema = z.object({

0 commit comments

Comments
 (0)