@meetkai/mka1 0.55.4 → 0.55.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +360 -360
- package/bin/mcp-server.js +1515 -1146
- package/bin/mcp-server.js.map +15 -9
- package/dist/commonjs/funcs/llmModelsGetOrgTokenQuota.d.ts +19 -0
- package/dist/commonjs/funcs/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/funcs/llmModelsGetOrgTokenQuota.js +132 -0
- package/dist/commonjs/funcs/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/funcs/llmModelsSetOrgTokenQuota.d.ts +19 -0
- package/dist/commonjs/funcs/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/funcs/llmModelsSetOrgTokenQuota.js +133 -0
- package/dist/commonjs/funcs/llmModelsSetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +5 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/llmModelsGetOrgTokenQuota.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmModelsGetOrgTokenQuota.js +64 -0
- package/dist/commonjs/mcp-server/tools/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmModelsSetOrgTokenQuota.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmModelsSetOrgTokenQuota.js +64 -0
- package/dist/commonjs/mcp-server/tools/llmModelsSetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/models/operations/createchatcompletionstream.d.ts +14 -14
- package/dist/commonjs/models/operations/createchatcompletionstream.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createchatcompletionstream.js +21 -25
- package/dist/commonjs/models/operations/createchatcompletionstream.js.map +1 -1
- package/dist/commonjs/models/operations/getorgtokenquota.d.ts +50 -0
- package/dist/commonjs/models/operations/getorgtokenquota.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getorgtokenquota.js +106 -0
- package/dist/commonjs/models/operations/getorgtokenquota.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listbudgets.d.ts +10 -10
- package/dist/commonjs/models/operations/listbudgets.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listbudgets.js +12 -12
- package/dist/commonjs/models/operations/listbudgets.js.map +1 -1
- package/dist/commonjs/models/operations/setorgtokenquota.d.ts +101 -0
- package/dist/commonjs/models/operations/setorgtokenquota.d.ts.map +1 -0
- package/dist/commonjs/models/operations/setorgtokenquota.js +180 -0
- package/dist/commonjs/models/operations/setorgtokenquota.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +2 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +2 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.core.d.ts +12 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.core.js +34 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.core.js.map +1 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.d.ts +28 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.js +60 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/react-query/llmModelsSetOrgTokenQuota.d.ts +28 -0
- package/dist/commonjs/react-query/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmModelsSetOrgTokenQuota.js +47 -0
- package/dist/commonjs/react-query/llmModelsSetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/sdk/models.d.ts +14 -0
- package/dist/commonjs/sdk/models.d.ts.map +1 -1
- package/dist/commonjs/sdk/models.js +20 -0
- package/dist/commonjs/sdk/models.js.map +1 -1
- package/dist/esm/funcs/llmModelsGetOrgTokenQuota.d.ts +19 -0
- package/dist/esm/funcs/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/funcs/llmModelsGetOrgTokenQuota.js +96 -0
- package/dist/esm/funcs/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/esm/funcs/llmModelsSetOrgTokenQuota.d.ts +19 -0
- package/dist/esm/funcs/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/funcs/llmModelsSetOrgTokenQuota.js +97 -0
- package/dist/esm/funcs/llmModelsSetOrgTokenQuota.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +5 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/llmModelsGetOrgTokenQuota.d.ts +8 -0
- package/dist/esm/mcp-server/tools/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/llmModelsGetOrgTokenQuota.js +28 -0
- package/dist/esm/mcp-server/tools/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/esm/mcp-server/tools/llmModelsSetOrgTokenQuota.d.ts +8 -0
- package/dist/esm/mcp-server/tools/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/llmModelsSetOrgTokenQuota.js +28 -0
- package/dist/esm/mcp-server/tools/llmModelsSetOrgTokenQuota.js.map +1 -0
- package/dist/esm/models/operations/createchatcompletionstream.d.ts +14 -14
- package/dist/esm/models/operations/createchatcompletionstream.d.ts.map +1 -1
- package/dist/esm/models/operations/createchatcompletionstream.js +16 -20
- package/dist/esm/models/operations/createchatcompletionstream.js.map +1 -1
- package/dist/esm/models/operations/getorgtokenquota.d.ts +50 -0
- package/dist/esm/models/operations/getorgtokenquota.d.ts.map +1 -0
- package/dist/esm/models/operations/getorgtokenquota.js +66 -0
- package/dist/esm/models/operations/getorgtokenquota.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listbudgets.d.ts +10 -10
- package/dist/esm/models/operations/listbudgets.d.ts.map +1 -1
- package/dist/esm/models/operations/listbudgets.js +11 -11
- package/dist/esm/models/operations/listbudgets.js.map +1 -1
- package/dist/esm/models/operations/setorgtokenquota.d.ts +101 -0
- package/dist/esm/models/operations/setorgtokenquota.d.ts.map +1 -0
- package/dist/esm/models/operations/setorgtokenquota.js +134 -0
- package/dist/esm/models/operations/setorgtokenquota.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +2 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +2 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.core.d.ts +12 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.core.d.ts.map +1 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.core.js +29 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.core.js.map +1 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.d.ts +28 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.js +50 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/esm/react-query/llmModelsSetOrgTokenQuota.d.ts +28 -0
- package/dist/esm/react-query/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/react-query/llmModelsSetOrgTokenQuota.js +42 -0
- package/dist/esm/react-query/llmModelsSetOrgTokenQuota.js.map +1 -0
- package/dist/esm/sdk/models.d.ts +14 -0
- package/dist/esm/sdk/models.d.ts.map +1 -1
- package/dist/esm/sdk/models.js +20 -0
- package/dist/esm/sdk/models.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/llmModelsGetOrgTokenQuota.ts +181 -0
- package/src/funcs/llmModelsSetOrgTokenQuota.ts +182 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/llmModelsGetOrgTokenQuota.ts +37 -0
- package/src/mcp-server/tools/llmModelsSetOrgTokenQuota.ts +37 -0
- package/src/models/operations/createchatcompletionstream.ts +72 -60
- package/src/models/operations/getorgtokenquota.ts +145 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listbudgets.ts +20 -20
- package/src/models/operations/setorgtokenquota.ts +287 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/llmModelsGetOrgTokenQuota.core.ts +71 -0
- package/src/react-query/llmModelsGetOrgTokenQuota.ts +136 -0
- package/src/react-query/llmModelsSetOrgTokenQuota.ts +109 -0
- package/src/sdk/models.ts +36 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { useMutation, } from "@tanstack/react-query";
|
|
5
|
+
import { llmModelsSetOrgTokenQuota } from "../funcs/llmModelsSetOrgTokenQuota.js";
|
|
6
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
7
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
8
|
+
import { useSDKContext } from "./_context.js";
|
|
9
|
+
/**
|
|
10
|
+
* Set an organization's token quota
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Cluster admins may create or replace the minute/day/month token allowance, or disable it with enabled: false. Changes apply to new admissions within 10 seconds; admitted requests finish. Limit changes preserve usage. Period changes use that period's calendar bucket; usage while disabled is not counted. The cluster organization cannot be capped.
|
|
14
|
+
*/
|
|
15
|
+
export function useLlmModelsSetOrgTokenQuotaMutation(options) {
|
|
16
|
+
const client = useSDKContext();
|
|
17
|
+
return useMutation({
|
|
18
|
+
...buildLlmModelsSetOrgTokenQuotaMutation(client, options),
|
|
19
|
+
...options,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export function mutationKeyLlmModelsSetOrgTokenQuota() {
|
|
23
|
+
return ["@meetkai/mka1", "models", "setOrgTokenQuota"];
|
|
24
|
+
}
|
|
25
|
+
export function buildLlmModelsSetOrgTokenQuotaMutation(client$, hookOptions) {
|
|
26
|
+
return {
|
|
27
|
+
mutationKey: mutationKeyLlmModelsSetOrgTokenQuota(),
|
|
28
|
+
mutationFn: function llmModelsSetOrgTokenQuotaMutationFn({ request, options, }) {
|
|
29
|
+
const mergedOptions = {
|
|
30
|
+
...hookOptions,
|
|
31
|
+
...options,
|
|
32
|
+
fetchOptions: {
|
|
33
|
+
...hookOptions?.fetchOptions,
|
|
34
|
+
...options?.fetchOptions,
|
|
35
|
+
signal: combineSignals(hookOptions?.fetchOptions?.signal, options?.fetchOptions?.signal),
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
return unwrapAsync(llmModelsSetOrgTokenQuota(client$, request, mergedOptions));
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=llmModelsSetOrgTokenQuota.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llmModelsSetOrgTokenQuota.js","sourceRoot":"","sources":["../../../src/react-query/llmModelsSetOrgTokenQuota.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,WAAW,GAEZ,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAatD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAqB9C;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC,CAClD,OAIC;IAMD,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,OAAO,WAAW,CAAC;QACjB,GAAG,sCAAsC,CAAC,MAAM,EAAE,OAAO,CAAC;QAC1D,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,oCAAoC;IAClD,OAAO,CAAC,eAAe,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,OAAgB,EAChB,WAA4B;IAO5B,OAAO;QACL,WAAW,EAAE,oCAAoC,EAAE;QACnD,UAAU,EAAE,SAAS,mCAAmC,CAAC,EACvD,OAAO,EACP,OAAO,GACR;YACC,MAAM,aAAa,GAAG;gBACpB,GAAG,WAAW;gBACd,GAAG,OAAO;gBACV,YAAY,EAAE;oBACZ,GAAG,WAAW,EAAE,YAAY;oBAC5B,GAAG,OAAO,EAAE,YAAY;oBACxB,MAAM,EAAE,cAAc,CACpB,WAAW,EAAE,YAAY,EAAE,MAAM,EACjC,OAAO,EAAE,YAAY,EAAE,MAAM,CAC9B;iBACF;aACF,CAAC;YACF,OAAO,WAAW,CAAC,yBAAyB,CAC1C,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/esm/sdk/models.d.ts
CHANGED
|
@@ -23,6 +23,20 @@ export declare class Models extends ClientSDK {
|
|
|
23
23
|
* Read applicable token limits without consuming tokens or starting a window. Organization limits may be shared across models. Use a concrete active model, not auto. Omit selectors for the authenticated caller's context, including its delegated external user. Human sessions may select an authorized api_key_id, plus service_account_id for a service-account key; selected keys use their ordinary, non-delegated context. Scopes with missing subject identities are omitted to avoid exposing shared fallback usage; their enforcement is unchanged. An empty limits array means no reportable token rules for this context. Untouched model windows have reset_at: null; organization calendar windows always report their next UTC reset. Unavailable policies or counters return 503.
|
|
24
24
|
*/
|
|
25
25
|
getQuota(request: operations.GetModelQuotaRequest, options?: RequestOptions): Promise<operations.GetModelQuotaResponseBody>;
|
|
26
|
+
/**
|
|
27
|
+
* Get an organization's token quota
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Cluster-admin read of the aggregate token policy across all models. An absent or disabled quota returns enabled: false with null limit and period. Does not require a model or change the active organization.
|
|
31
|
+
*/
|
|
32
|
+
getOrgTokenQuota(request: operations.GetOrgTokenQuotaRequest, options?: RequestOptions): Promise<operations.GetOrgTokenQuotaResponseBody>;
|
|
33
|
+
/**
|
|
34
|
+
* Set an organization's token quota
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Cluster admins may create or replace the minute/day/month token allowance, or disable it with enabled: false. Changes apply to new admissions within 10 seconds; admitted requests finish. Limit changes preserve usage. Period changes use that period's calendar bucket; usage while disabled is not counted. The cluster organization cannot be capped.
|
|
38
|
+
*/
|
|
39
|
+
setOrgTokenQuota(request: operations.SetOrgTokenQuotaRequest, options?: RequestOptions): Promise<operations.SetOrgTokenQuotaResponseBody>;
|
|
26
40
|
/**
|
|
27
41
|
* List the organization's model catalog
|
|
28
42
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/sdk/models.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/sdk/models.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,MAAO,SAAQ,SAAS;IACnC;;;;;OAKG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;OAKG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,eAAe,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAQ3C;;;;;OAKG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,yBAAyB,CAAC;IAQhD;;;;;OAKG;IACG,gBAAgB,CACpB,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC;IAQnD;;;;;OAKG;IACG,gBAAgB,CACpB,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC;IAQnD;;;;;OAKG;IACG,WAAW,CACf,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAO1C;;;;;OAKG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC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AAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC;IAQ/C;;;;;OAKG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAQ9C;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;IAQpC;;;;;OAKG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC;IAQ/C;;;;;OAKG;IACG,mBAAmB,CACvB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;CAO/C"}
|
package/dist/esm/sdk/models.js
CHANGED
|
@@ -12,6 +12,7 @@ import { llmModelsDeleteCatalogEntry } from "../funcs/llmModelsDeleteCatalogEntr
|
|
|
12
12
|
import { llmModelsDeleteOrgAutoModel } from "../funcs/llmModelsDeleteOrgAutoModel.js";
|
|
13
13
|
import { llmModelsGet } from "../funcs/llmModelsGet.js";
|
|
14
14
|
import { llmModelsGetClusterCurrency } from "../funcs/llmModelsGetClusterCurrency.js";
|
|
15
|
+
import { llmModelsGetOrgTokenQuota } from "../funcs/llmModelsGetOrgTokenQuota.js";
|
|
15
16
|
import { llmModelsGetQuota } from "../funcs/llmModelsGetQuota.js";
|
|
16
17
|
import { llmModelsList } from "../funcs/llmModelsList.js";
|
|
17
18
|
import { llmModelsListCatalog } from "../funcs/llmModelsListCatalog.js";
|
|
@@ -27,6 +28,7 @@ import { llmModelsReplaceCatalogOrgAccess } from "../funcs/llmModelsReplaceCatal
|
|
|
27
28
|
import { llmModelsSetClusterCurrency } from "../funcs/llmModelsSetClusterCurrency.js";
|
|
28
29
|
import { llmModelsSetClusterPrice } from "../funcs/llmModelsSetClusterPrice.js";
|
|
29
30
|
import { llmModelsSetOrgPrice } from "../funcs/llmModelsSetOrgPrice.js";
|
|
31
|
+
import { llmModelsSetOrgTokenQuota } from "../funcs/llmModelsSetOrgTokenQuota.js";
|
|
30
32
|
import { llmModelsUpdateCatalogEntry } from "../funcs/llmModelsUpdateCatalogEntry.js";
|
|
31
33
|
import { ClientSDK } from "../lib/sdks.js";
|
|
32
34
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -58,6 +60,24 @@ export class Models extends ClientSDK {
|
|
|
58
60
|
async getQuota(request, options) {
|
|
59
61
|
return unwrapAsync(llmModelsGetQuota(this, request, options));
|
|
60
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Get an organization's token quota
|
|
65
|
+
*
|
|
66
|
+
* @remarks
|
|
67
|
+
* Cluster-admin read of the aggregate token policy across all models. An absent or disabled quota returns enabled: false with null limit and period. Does not require a model or change the active organization.
|
|
68
|
+
*/
|
|
69
|
+
async getOrgTokenQuota(request, options) {
|
|
70
|
+
return unwrapAsync(llmModelsGetOrgTokenQuota(this, request, options));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Set an organization's token quota
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* Cluster admins may create or replace the minute/day/month token allowance, or disable it with enabled: false. Changes apply to new admissions within 10 seconds; admitted requests finish. Limit changes preserve usage. Period changes use that period's calendar bucket; usage while disabled is not counted. The cluster organization cannot be capped.
|
|
77
|
+
*/
|
|
78
|
+
async setOrgTokenQuota(request, options) {
|
|
79
|
+
return unwrapAsync(llmModelsSetOrgTokenQuota(this, request, options));
|
|
80
|
+
}
|
|
61
81
|
/**
|
|
62
82
|
* List the organization's model catalog
|
|
63
83
|
*
|
|
@@ -1 +1 @@
|
|
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,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,eAAe,CACnB,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,wBAAwB,CACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAA4C,EAC5C,OAAwB;QAExB,OAAO,WAAW,CAAC,0BAA0B,CAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,OAAwC,EACxC,OAAwB;QAExB,OAAO,WAAW,CAAC,sBAAsB,CACvC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,WAAW,CAAC,oBAAoB,CACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,OAAwC,EACxC,OAAwB;QAExB,OAAO,WAAW,CAAC,sBAAsB,CACvC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAA8C,EAC9C,OAAwB;QAExB,OAAO,WAAW,CAAC,4BAA4B,CAC7C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/sdk/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OA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AAC,CAAC;IACL,CAAC;CACF"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get an organization's token quota
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Cluster-admin read of the aggregate token policy across all models. An absent or disabled quota returns enabled: false with null limit and period. Does not require a model or change the active organization.
|
|
33
|
+
*
|
|
34
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
35
|
+
*/
|
|
36
|
+
export function llmModelsGetOrgTokenQuota(
|
|
37
|
+
client: SDKCore,
|
|
38
|
+
request: operations.GetOrgTokenQuotaRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
operations.GetOrgTokenQuotaResponseBody,
|
|
43
|
+
| SDKError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: SDKCore,
|
|
62
|
+
request: operations.GetOrgTokenQuotaRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
operations.GetOrgTokenQuotaResponseBody,
|
|
68
|
+
| SDKError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) => operations.GetOrgTokenQuotaRequest$outboundSchema.parse(value),
|
|
83
|
+
"Input validation failed",
|
|
84
|
+
);
|
|
85
|
+
if (!parsed.ok) {
|
|
86
|
+
return [parsed, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const payload = parsed.value;
|
|
89
|
+
const body = null;
|
|
90
|
+
|
|
91
|
+
const pathParams = {
|
|
92
|
+
org_id: encodeSimple("org_id", payload.org_id, {
|
|
93
|
+
explode: false,
|
|
94
|
+
charEncoding: "percent",
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
const path = pathToFunc("/api/v1/llm/models/orgs/{org_id}/token-quota")(
|
|
98
|
+
pathParams,
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
const headers = new Headers(compactMap({
|
|
102
|
+
Accept: "application/json",
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
106
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
107
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
108
|
+
|
|
109
|
+
const context = {
|
|
110
|
+
options: client._options,
|
|
111
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
112
|
+
operationID: "getOrgTokenQuota",
|
|
113
|
+
oAuth2Scopes: null,
|
|
114
|
+
|
|
115
|
+
resolvedSecurity: requestSecurity,
|
|
116
|
+
|
|
117
|
+
securitySource: client._options.bearerAuth,
|
|
118
|
+
retryConfig: options?.retries
|
|
119
|
+
|| client._options.retryConfig
|
|
120
|
+
|| {
|
|
121
|
+
strategy: "backoff",
|
|
122
|
+
backoff: {
|
|
123
|
+
initialInterval: 500,
|
|
124
|
+
maxInterval: 5000,
|
|
125
|
+
exponent: 1.5,
|
|
126
|
+
maxElapsedTime: 15000,
|
|
127
|
+
},
|
|
128
|
+
retryConnectionErrors: true,
|
|
129
|
+
}
|
|
130
|
+
|| { strategy: "none" },
|
|
131
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const requestRes = client._createRequest(context, {
|
|
135
|
+
security: requestSecurity,
|
|
136
|
+
method: "GET",
|
|
137
|
+
baseURL: options?.serverURL,
|
|
138
|
+
path: path,
|
|
139
|
+
headers: headers,
|
|
140
|
+
body: body,
|
|
141
|
+
userAgent: client._options.userAgent,
|
|
142
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
143
|
+
}, options);
|
|
144
|
+
if (!requestRes.ok) {
|
|
145
|
+
return [requestRes, { status: "invalid" }];
|
|
146
|
+
}
|
|
147
|
+
const req = requestRes.value;
|
|
148
|
+
|
|
149
|
+
const doResult = await client._do(req, {
|
|
150
|
+
context,
|
|
151
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
152
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
153
|
+
retryConfig: context.retryConfig,
|
|
154
|
+
retryCodes: context.retryCodes,
|
|
155
|
+
});
|
|
156
|
+
if (!doResult.ok) {
|
|
157
|
+
return [doResult, { status: "request-error", request: req }];
|
|
158
|
+
}
|
|
159
|
+
const response = doResult.value;
|
|
160
|
+
|
|
161
|
+
const [result] = await M.match<
|
|
162
|
+
operations.GetOrgTokenQuotaResponseBody,
|
|
163
|
+
| SDKError
|
|
164
|
+
| ResponseValidationError
|
|
165
|
+
| ConnectionError
|
|
166
|
+
| RequestAbortedError
|
|
167
|
+
| RequestTimeoutError
|
|
168
|
+
| InvalidRequestError
|
|
169
|
+
| UnexpectedClientError
|
|
170
|
+
| SDKValidationError
|
|
171
|
+
>(
|
|
172
|
+
M.json(200, operations.GetOrgTokenQuotaResponseBody$inboundSchema),
|
|
173
|
+
M.fail("4XX"),
|
|
174
|
+
M.fail("5XX"),
|
|
175
|
+
)(response, req);
|
|
176
|
+
if (!result.ok) {
|
|
177
|
+
return [result, { status: "complete", request: req, response }];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return [result, { status: "complete", request: req, response }];
|
|
181
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Set an organization's token quota
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Cluster admins may create or replace the minute/day/month token allowance, or disable it with enabled: false. Changes apply to new admissions within 10 seconds; admitted requests finish. Limit changes preserve usage. Period changes use that period's calendar bucket; usage while disabled is not counted. The cluster organization cannot be capped.
|
|
33
|
+
*
|
|
34
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
35
|
+
*/
|
|
36
|
+
export function llmModelsSetOrgTokenQuota(
|
|
37
|
+
client: SDKCore,
|
|
38
|
+
request: operations.SetOrgTokenQuotaRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
operations.SetOrgTokenQuotaResponseBody,
|
|
43
|
+
| SDKError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: SDKCore,
|
|
62
|
+
request: operations.SetOrgTokenQuotaRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
operations.SetOrgTokenQuotaResponseBody,
|
|
68
|
+
| SDKError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) => operations.SetOrgTokenQuotaRequest$outboundSchema.parse(value),
|
|
83
|
+
"Input validation failed",
|
|
84
|
+
);
|
|
85
|
+
if (!parsed.ok) {
|
|
86
|
+
return [parsed, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const payload = parsed.value;
|
|
89
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
90
|
+
|
|
91
|
+
const pathParams = {
|
|
92
|
+
org_id: encodeSimple("org_id", payload.org_id, {
|
|
93
|
+
explode: false,
|
|
94
|
+
charEncoding: "percent",
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
const path = pathToFunc("/api/v1/llm/models/orgs/{org_id}/token-quota")(
|
|
98
|
+
pathParams,
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
const headers = new Headers(compactMap({
|
|
102
|
+
"Content-Type": "application/json",
|
|
103
|
+
Accept: "application/json",
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
107
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
108
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
109
|
+
|
|
110
|
+
const context = {
|
|
111
|
+
options: client._options,
|
|
112
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
113
|
+
operationID: "setOrgTokenQuota",
|
|
114
|
+
oAuth2Scopes: null,
|
|
115
|
+
|
|
116
|
+
resolvedSecurity: requestSecurity,
|
|
117
|
+
|
|
118
|
+
securitySource: client._options.bearerAuth,
|
|
119
|
+
retryConfig: options?.retries
|
|
120
|
+
|| client._options.retryConfig
|
|
121
|
+
|| {
|
|
122
|
+
strategy: "backoff",
|
|
123
|
+
backoff: {
|
|
124
|
+
initialInterval: 500,
|
|
125
|
+
maxInterval: 5000,
|
|
126
|
+
exponent: 1.5,
|
|
127
|
+
maxElapsedTime: 15000,
|
|
128
|
+
},
|
|
129
|
+
retryConnectionErrors: true,
|
|
130
|
+
}
|
|
131
|
+
|| { strategy: "none" },
|
|
132
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const requestRes = client._createRequest(context, {
|
|
136
|
+
security: requestSecurity,
|
|
137
|
+
method: "PUT",
|
|
138
|
+
baseURL: options?.serverURL,
|
|
139
|
+
path: path,
|
|
140
|
+
headers: headers,
|
|
141
|
+
body: body,
|
|
142
|
+
userAgent: client._options.userAgent,
|
|
143
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
144
|
+
}, options);
|
|
145
|
+
if (!requestRes.ok) {
|
|
146
|
+
return [requestRes, { status: "invalid" }];
|
|
147
|
+
}
|
|
148
|
+
const req = requestRes.value;
|
|
149
|
+
|
|
150
|
+
const doResult = await client._do(req, {
|
|
151
|
+
context,
|
|
152
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
153
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
154
|
+
retryConfig: context.retryConfig,
|
|
155
|
+
retryCodes: context.retryCodes,
|
|
156
|
+
});
|
|
157
|
+
if (!doResult.ok) {
|
|
158
|
+
return [doResult, { status: "request-error", request: req }];
|
|
159
|
+
}
|
|
160
|
+
const response = doResult.value;
|
|
161
|
+
|
|
162
|
+
const [result] = await M.match<
|
|
163
|
+
operations.SetOrgTokenQuotaResponseBody,
|
|
164
|
+
| SDKError
|
|
165
|
+
| ResponseValidationError
|
|
166
|
+
| ConnectionError
|
|
167
|
+
| RequestAbortedError
|
|
168
|
+
| RequestTimeoutError
|
|
169
|
+
| InvalidRequestError
|
|
170
|
+
| UnexpectedClientError
|
|
171
|
+
| SDKValidationError
|
|
172
|
+
>(
|
|
173
|
+
M.json(200, operations.SetOrgTokenQuotaResponseBody$inboundSchema),
|
|
174
|
+
M.fail("4XX"),
|
|
175
|
+
M.fail("5XX"),
|
|
176
|
+
)(response, req);
|
|
177
|
+
if (!result.ok) {
|
|
178
|
+
return [result, { status: "complete", request: req, response }];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return [result, { status: "complete", request: req, response }];
|
|
182
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.1.0",
|
|
68
|
-
sdkVersion: "0.55.
|
|
68
|
+
sdkVersion: "0.55.5",
|
|
69
69
|
genVersion: "2.950.2",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.55.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.55.5 2.950.2 1.1.0 @meetkai/mka1",
|
|
71
71
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -333,6 +333,7 @@ import { tool$llmModelsDeleteCatalogEntry } from "./tools/llmModelsDeleteCatalog
|
|
|
333
333
|
import { tool$llmModelsDeleteOrgAutoModel } from "./tools/llmModelsDeleteOrgAutoModel.js";
|
|
334
334
|
import { tool$llmModelsGet } from "./tools/llmModelsGet.js";
|
|
335
335
|
import { tool$llmModelsGetClusterCurrency } from "./tools/llmModelsGetClusterCurrency.js";
|
|
336
|
+
import { tool$llmModelsGetOrgTokenQuota } from "./tools/llmModelsGetOrgTokenQuota.js";
|
|
336
337
|
import { tool$llmModelsGetQuota } from "./tools/llmModelsGetQuota.js";
|
|
337
338
|
import { tool$llmModelsList } from "./tools/llmModelsList.js";
|
|
338
339
|
import { tool$llmModelsListCatalog } from "./tools/llmModelsListCatalog.js";
|
|
@@ -348,6 +349,7 @@ import { tool$llmModelsReplaceCatalogOrgAccess } from "./tools/llmModelsReplaceC
|
|
|
348
349
|
import { tool$llmModelsSetClusterCurrency } from "./tools/llmModelsSetClusterCurrency.js";
|
|
349
350
|
import { tool$llmModelsSetClusterPrice } from "./tools/llmModelsSetClusterPrice.js";
|
|
350
351
|
import { tool$llmModelsSetOrgPrice } from "./tools/llmModelsSetOrgPrice.js";
|
|
352
|
+
import { tool$llmModelsSetOrgTokenQuota } from "./tools/llmModelsSetOrgTokenQuota.js";
|
|
351
353
|
import { tool$llmModelsUpdateCatalogEntry } from "./tools/llmModelsUpdateCatalogEntry.js";
|
|
352
354
|
import { tool$llmPromptsCreate } from "./tools/llmPromptsCreate.js";
|
|
353
355
|
import { tool$llmPromptsCreateVersion } from "./tools/llmPromptsCreateVersion.js";
|
|
@@ -507,7 +509,7 @@ export function createMCPServer(deps: {
|
|
|
507
509
|
}) {
|
|
508
510
|
const server = new McpServer({
|
|
509
511
|
name: "SDK",
|
|
510
|
-
version: "0.55.
|
|
512
|
+
version: "0.55.5",
|
|
511
513
|
});
|
|
512
514
|
|
|
513
515
|
const client = new SDKCore({
|
|
@@ -808,6 +810,8 @@ export function createMCPServer(deps: {
|
|
|
808
810
|
tool(tool$llmModelsList);
|
|
809
811
|
tool(tool$llmModelsGet);
|
|
810
812
|
tool(tool$llmModelsGetQuota);
|
|
813
|
+
tool(tool$llmModelsGetOrgTokenQuota);
|
|
814
|
+
tool(tool$llmModelsSetOrgTokenQuota);
|
|
811
815
|
tool(tool$llmModelsListCatalog);
|
|
812
816
|
tool(tool$llmModelsAddCatalogEntry);
|
|
813
817
|
tool(tool$llmModelsUpdateCatalogEntry);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { llmModelsGetOrgTokenQuota } from "../../funcs/llmModelsGetOrgTokenQuota.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetOrgTokenQuotaRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$llmModelsGetOrgTokenQuota: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "llm-models-get-org-token-quota",
|
|
15
|
+
description: `Get an organization's token quota
|
|
16
|
+
|
|
17
|
+
Cluster-admin read of the aggregate token policy across all models. An absent or disabled quota returns enabled: false with null limit and period. Does not require a model or change the active organization.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await llmModelsGetOrgTokenQuota(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.mcpReq.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { llmModelsSetOrgTokenQuota } from "../../funcs/llmModelsSetOrgTokenQuota.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.SetOrgTokenQuotaRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$llmModelsSetOrgTokenQuota: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "llm-models-set-org-token-quota",
|
|
15
|
+
description: `Set an organization's token quota
|
|
16
|
+
|
|
17
|
+
Cluster admins may create or replace the minute/day/month token allowance, or disable it with enabled: false. Changes apply to new admissions within 10 seconds; admitted requests finish. Limit changes preserve usage. Period changes use that period's calendar bucket; usage while disabled is not counted. The cluster organization cannot be capped.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await llmModelsSetOrgTokenQuota(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.mcpReq.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|