re-adds keychecker info to STATIC_INFO_PAGE
This commit is contained in:
+2
-1
@@ -173,7 +173,7 @@ type Config = {
|
||||
useInsecureCookies: boolean;
|
||||
/**
|
||||
* Whether to use a more minimal public Service Info page with static content.
|
||||
* This disables all stats, including traffic, keys, and queue info.
|
||||
* Disables all stats pertaining to traffic, prompt/token usage, and queues.
|
||||
* The full info page will appear if you have signed in as an admin using the
|
||||
* configured ADMIN_KEY and go to /admin/service-info.
|
||||
**/
|
||||
@@ -368,6 +368,7 @@ export const OMITTED_KEYS: (keyof Config)[] = [
|
||||
"showRecentImages",
|
||||
"useInsecureCookies",
|
||||
"staticServiceInfo",
|
||||
"checkKeys",
|
||||
];
|
||||
|
||||
const getKeys = Object.keys as <T extends object>(obj: T) => Array<keyof T>;
|
||||
|
||||
+10
-7
@@ -120,18 +120,21 @@ export function buildInfoPageHtml(baseUrl: string, asAdmin = false) {
|
||||
...(config.textModelRateLimit ? { proomptersNow: getUniqueIps() } : {}),
|
||||
};
|
||||
|
||||
const keyInfo = {
|
||||
openaiKeys,
|
||||
anthropicKeys,
|
||||
palmKeys,
|
||||
awsKeys,
|
||||
};
|
||||
const keyInfo = { openaiKeys, anthropicKeys, palmKeys, awsKeys };
|
||||
|
||||
const providerInfo = {
|
||||
...(openaiKeys ? getOpenAIInfo() : {}),
|
||||
...(anthropicKeys ? getAnthropicInfo() : {}),
|
||||
...(palmKeys ? { "palm-bison": getPalmInfo() } : {}),
|
||||
...(awsKeys ? { "aws-claude": getAwsInfo() } : {}),
|
||||
};
|
||||
|
||||
if (hideFullInfo) {
|
||||
for (const provider of Object.keys(providerInfo)) {
|
||||
delete (providerInfo as any)[provider].proomptersInQueue;
|
||||
delete (providerInfo as any)[provider].estimatedQueueTime;
|
||||
delete (providerInfo as any)[provider].usage;
|
||||
}
|
||||
}
|
||||
|
||||
const info = {
|
||||
@@ -139,7 +142,7 @@ export function buildInfoPageHtml(baseUrl: string, asAdmin = false) {
|
||||
endpoints,
|
||||
...(hideFullInfo ? {} : stats),
|
||||
...keyInfo,
|
||||
...(hideFullInfo ? {} : providerInfo),
|
||||
...providerInfo,
|
||||
config: listConfig(),
|
||||
build: process.env.BUILD_INFO || "dev",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user