بهروزرسانی: دریافت زندهٔ کاتالوگ مدلها و افورتهای استدلال پشتیبانیشده بر اساس اکانت انتخابی
This commit is contained in:
+18
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user