به‌روزرسانی: دریافت زندهٔ کاتالوگ مدل‌ها و افورت‌های استدلال پشتیبانی‌شده بر اساس اکانت انتخابی

This commit is contained in:
mjalmoudy94
2026-10-13 07:41:00 +00:00
parent da5a2a5d1a
commit 0b72c4ec6d
10 changed files with 229 additions and 39 deletions
+18 -3
View File
@@ -447,9 +447,24 @@ export const api = {
output_tokens: number;
}>(`/api/admin/agy/accounts/${accountId}/test`, { method: "POST" }),
// Live model catalog of one account — fetched from Google on every call, so
// the model dropdown always matches that subscription's entitlement.
agyAccountModels: (accountId: string) =>
apiRequest<string[]>(`/api/admin/agy/accounts/${accountId}/models`),
// the model dropdown always matches that subscription's entitlement along with
// its supported reasoning efforts.
agyAccountModels: async (accountId: string) => {
const raw = await apiRequest<(import("@agy/contracts").AgyAccountModel | string)[]>(
`/api/admin/agy/accounts/${accountId}/models`,
);
return raw.map((item): import("@agy/contracts").AgyAccountModel => {
if (typeof item === "string") {
return {
id: item,
display_name: item,
supports_thinking: false,
supported_efforts: [],
};
}
return item;
});
},
adminModels: () => apiRequest<import("@agy/contracts").AdminModel[]>("/api/admin/models"),
adminCreateModel: (body: {
internal_name: string;