fix: permissions, sidebar and system prompt

This commit is contained in:
Gab
2026-03-25 20:39:20 +11:00
parent 06db5cd050
commit 5b6dfd75e8
6 changed files with 52 additions and 11 deletions

View File

@@ -151,6 +151,13 @@ export function createToothFairyAI(options: ToothFairyAIProviderSettings = {}):
finish_reason: parsed.choices[0].finish_reason,
})
}
if (parsed.usage) {
log.info("stream usage", {
prompt_tokens: parsed.usage.prompt_tokens,
completion_tokens: parsed.usage.completion_tokens,
total_tokens: parsed.usage.total_tokens,
})
}
} catch {}
}
} else {
@@ -181,6 +188,7 @@ export function createToothFairyAI(options: ToothFairyAIProviderSettings = {}):
headers: () => baseHeaders,
url: ({ path }) => `${baseURL}${path}`,
fetch: customFetch as FetchFunction,
includeUsage: true,
})
}