mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-04 16:13:11 +00:00
add optional headers field to model config (#3546)
This commit is contained in:
@@ -37,6 +37,7 @@ export namespace ModelsDev {
|
||||
experimental: z.boolean().optional(),
|
||||
status: z.enum(["alpha", "beta"]).optional(),
|
||||
options: z.record(z.string(), z.any()),
|
||||
headers: z.record(z.string(), z.string()).optional(),
|
||||
provider: z.object({ npm: z.string() }).optional(),
|
||||
})
|
||||
.meta({
|
||||
|
||||
@@ -306,6 +306,7 @@ export namespace Provider {
|
||||
input: ["text"],
|
||||
output: ["text"],
|
||||
},
|
||||
headers: model.headers,
|
||||
provider: model.provider ?? existing?.provider,
|
||||
}
|
||||
if (model.id && model.id !== modelID) {
|
||||
|
||||
Reference in New Issue
Block a user