@mutagent/sdk 0.3.11 → 0.3.12
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 +9 -6
- package/dist/commonjs/funcs/provider-configs-list-provider-models.d.ts +19 -0
- package/dist/commonjs/funcs/provider-configs-list-provider-models.d.ts.map +1 -0
- package/dist/commonjs/funcs/provider-configs-list-provider-models.js +125 -0
- package/dist/commonjs/funcs/provider-configs-list-provider-models.js.map +1 -0
- package/dist/commonjs/funcs/provider-configs-list-providers.js +0 -3
- package/dist/commonjs/funcs/provider-configs-list-providers.js.map +1 -1
- package/dist/commonjs/funcs/provider-configs-update-provider.js +1 -1
- package/dist/commonjs/funcs/provider-configs-update-provider.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/errors/workspace-model-listing-error.d.ts +45 -0
- package/dist/commonjs/models/errors/workspace-model-listing-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/workspace-model-listing-error.js +76 -0
- package/dist/commonjs/models/errors/workspace-model-listing-error.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +1 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +1 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/name-api-key-base-url.d.ts +3 -3
- package/dist/commonjs/models/name-api-key-base-url.d.ts.map +1 -1
- package/dist/commonjs/models/name-api-key-base-url.js +1 -1
- package/dist/commonjs/models/name-api-key-base-url.js.map +1 -1
- package/dist/commonjs/models/name-provider-api-key.d.ts +16 -23
- package/dist/commonjs/models/name-provider-api-key.d.ts.map +1 -1
- package/dist/commonjs/models/name-provider-api-key.js +8 -11
- package/dist/commonjs/models/name-provider-api-key.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/list-provider-models.d.ts +12 -0
- package/dist/commonjs/models/operations/list-provider-models.d.ts.map +1 -0
- package/dist/commonjs/models/operations/list-provider-models.js +49 -0
- package/dist/commonjs/models/operations/list-provider-models.js.map +1 -0
- package/dist/commonjs/models/operations/list-providers.d.ts +0 -6
- package/dist/commonjs/models/operations/list-providers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/list-providers.js +0 -3
- package/dist/commonjs/models/operations/list-providers.js.map +1 -1
- package/dist/commonjs/models/workspace-model-listing.d.ts +64 -0
- package/dist/commonjs/models/workspace-model-listing.d.ts.map +1 -0
- package/dist/commonjs/models/workspace-model-listing.js +77 -0
- package/dist/commonjs/models/workspace-model-listing.js.map +1 -0
- package/dist/commonjs/sdk/provider-configs.d.ts +7 -0
- package/dist/commonjs/sdk/provider-configs.d.ts.map +1 -1
- package/dist/commonjs/sdk/provider-configs.js +10 -0
- package/dist/commonjs/sdk/provider-configs.js.map +1 -1
- package/dist/esm/funcs/provider-configs-list-provider-models.d.ts +19 -0
- package/dist/esm/funcs/provider-configs-list-provider-models.d.ts.map +1 -0
- package/dist/esm/funcs/provider-configs-list-provider-models.js +89 -0
- package/dist/esm/funcs/provider-configs-list-provider-models.js.map +1 -0
- package/dist/esm/funcs/provider-configs-list-providers.js +0 -3
- package/dist/esm/funcs/provider-configs-list-providers.js.map +1 -1
- package/dist/esm/funcs/provider-configs-update-provider.js +1 -1
- package/dist/esm/funcs/provider-configs-update-provider.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/errors/workspace-model-listing-error.d.ts +45 -0
- package/dist/esm/models/errors/workspace-model-listing-error.d.ts.map +1 -0
- package/dist/esm/models/errors/workspace-model-listing-error.js +39 -0
- package/dist/esm/models/errors/workspace-model-listing-error.js.map +1 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/name-api-key-base-url.d.ts +3 -3
- package/dist/esm/models/name-api-key-base-url.d.ts.map +1 -1
- package/dist/esm/models/name-api-key-base-url.js +1 -1
- package/dist/esm/models/name-api-key-base-url.js.map +1 -1
- package/dist/esm/models/name-provider-api-key.d.ts +16 -23
- package/dist/esm/models/name-provider-api-key.d.ts.map +1 -1
- package/dist/esm/models/name-provider-api-key.js +6 -9
- package/dist/esm/models/name-provider-api-key.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/list-provider-models.d.ts +12 -0
- package/dist/esm/models/operations/list-provider-models.d.ts.map +1 -0
- package/dist/esm/models/operations/list-provider-models.js +12 -0
- package/dist/esm/models/operations/list-provider-models.js.map +1 -0
- package/dist/esm/models/operations/list-providers.d.ts +0 -6
- package/dist/esm/models/operations/list-providers.d.ts.map +1 -1
- package/dist/esm/models/operations/list-providers.js +0 -3
- package/dist/esm/models/operations/list-providers.js.map +1 -1
- package/dist/esm/models/workspace-model-listing.d.ts +64 -0
- package/dist/esm/models/workspace-model-listing.d.ts.map +1 -0
- package/dist/esm/models/workspace-model-listing.js +39 -0
- package/dist/esm/models/workspace-model-listing.js.map +1 -0
- package/dist/esm/sdk/provider-configs.d.ts +7 -0
- package/dist/esm/sdk/provider-configs.d.ts.map +1 -1
- package/dist/esm/sdk/provider-configs.js +10 -0
- package/dist/esm/sdk/provider-configs.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/provider-configs-list-provider-models.ts +182 -0
- package/src/funcs/provider-configs-list-providers.ts +0 -3
- package/src/funcs/provider-configs-update-provider.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/workspace-model-listing-error.ts +82 -0
- package/src/models/index.ts +1 -0
- package/src/models/name-api-key-base-url.ts +4 -4
- package/src/models/name-provider-api-key.ts +27 -30
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/list-provider-models.ts +30 -0
- package/src/models/operations/list-providers.ts +0 -9
- package/src/models/workspace-model-listing.ts +109 -0
- package/src/sdk/provider-configs.ts +18 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
7
|
+
import * as types from "../types/primitives.js";
|
|
8
|
+
/**
|
|
9
|
+
* 'live' — listed from the provider just now; 'stored' — the persisted allow-list
|
|
10
|
+
*/
|
|
11
|
+
export var Source;
|
|
12
|
+
(function (Source) {
|
|
13
|
+
Source["Live"] = "live";
|
|
14
|
+
Source["Stored"] = "stored";
|
|
15
|
+
})(Source || (Source = {}));
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const Model$inboundSchema = z.object({
|
|
18
|
+
id: types.string(),
|
|
19
|
+
displayName: types.string(),
|
|
20
|
+
enabled: types.boolean(),
|
|
21
|
+
roles: z.array(types.string()),
|
|
22
|
+
modelVerified: types.boolean(),
|
|
23
|
+
});
|
|
24
|
+
export function modelFromJSON(jsonString) {
|
|
25
|
+
return safeParse(jsonString, (x) => Model$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Model' from JSON`);
|
|
26
|
+
}
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const Source$inboundSchema = openEnums.inboundSchema(Source);
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const WorkspaceModelListing$inboundSchema = z.object({
|
|
31
|
+
models: z.array(z.lazy(() => Model$inboundSchema)),
|
|
32
|
+
source: z._default(Source$inboundSchema, Source.Live),
|
|
33
|
+
degraded: types.boolean(),
|
|
34
|
+
message: types.nullable(types.string()),
|
|
35
|
+
});
|
|
36
|
+
export function workspaceModelListingFromJSON(jsonString) {
|
|
37
|
+
return safeParse(jsonString, (x) => WorkspaceModelListing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WorkspaceModelListing' from JSON`);
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=workspace-model-listing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-model-listing.js","sourceRoot":"","sources":["../../../src/models/workspace-model-listing.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AA0BhD;;GAEG;AACH,MAAM,CAAN,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,uBAAa,CAAA;IACb,2BAAiB,CAAA;AACnB,CAAC,EAHW,MAAM,KAAN,MAAM,QAGjB;AAyBD,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAkC,CAAC,CAAC,MAAM,CAAC;IACzE,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE;IAC3B,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;IACxB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAC9B,aAAa,EAAE,KAAK,CAAC,OAAO,EAAE;CAC/B,CAAC,CAAC;AAEH,MAAM,UAAU,aAAa,CAC3B,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/C,mCAAmC,CACpC,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,oBAAoB,GAC/B,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAElC,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAG5C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAC;IAClD,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC;IACrD,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE;IACzB,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;CACxC,CAAC,CAAC;AAEH,MAAM,UAAU,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
|
|
@@ -51,6 +51,13 @@ export declare class ProviderConfigs extends ClientSDK {
|
|
|
51
51
|
* Returns the union of static known models and declared provider models for a workspace. Used by the optimizer dropdown.
|
|
52
52
|
*/
|
|
53
53
|
getModelsCatalog(options?: RequestOptions): Promise<operations.GetModelsCatalogResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* List a provider configuration models
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* The models this provider configuration offers, listed live from the provider and narrowed to the catalog's allow-list policy, with this workspace's per-model enablement applied. When the provider cannot be reached the stored allow-list is returned with `degraded: true` and the reason — an empty list is never presented as 'no models'.
|
|
59
|
+
*/
|
|
60
|
+
listProviderModels(request: operations.ListProviderModelsRequest, options?: RequestOptions): Promise<models.WorkspaceModelListing>;
|
|
54
61
|
/**
|
|
55
62
|
* Test provider connection
|
|
56
63
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-configs.d.ts","sourceRoot":"","sources":["../../../src/sdk/provider-configs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"provider-configs.d.ts","sourceRoot":"","sources":["../../../src/sdk/provider-configs.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,eAAgB,SAAQ,SAAS;IAC5C;;;;;OAKG;IACG,aAAa,CACjB,OAAO,CAAC,EAAE,UAAU,CAAC,oBAAoB,GAAG,SAAS,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAC;IAQtC;;;;;OAKG;IACG,cAAc,CAClB,OAAO,EAAE,MAAM,CAAC,kBAAkB,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC;IAQjC;;;;;OAKG;IACG,mBAAmB,CACvB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC;IAOlD;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC;IAQjC;;;;;OAKG;IACG,cAAc,CAClB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC;IAQjC;;;;;OAKG;IACG,cAAc,CAClB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC;IAQlC;;;;;OAKG;IACG,gBAAgB,CACpB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC;IAO/C;;;;;OAKG;IACG,kBAAkB,CACtB,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAQxC;;;;;OAKG;IACG,YAAY,CAChB,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC;CAOxC"}
|
|
@@ -6,6 +6,7 @@ import { providerConfigsDeleteProvider } from "../funcs/provider-configs-delete-
|
|
|
6
6
|
import { providerConfigsGetModelsCatalog } from "../funcs/provider-configs-get-models-catalog.js";
|
|
7
7
|
import { providerConfigsGetProvider } from "../funcs/provider-configs-get-provider.js";
|
|
8
8
|
import { providerConfigsListAvailableModels } from "../funcs/provider-configs-list-available-models.js";
|
|
9
|
+
import { providerConfigsListProviderModels } from "../funcs/provider-configs-list-provider-models.js";
|
|
9
10
|
import { providerConfigsListProviders } from "../funcs/provider-configs-list-providers.js";
|
|
10
11
|
import { providerConfigsTestProvider } from "../funcs/provider-configs-test-provider.js";
|
|
11
12
|
import { providerConfigsUpdateProvider } from "../funcs/provider-configs-update-provider.js";
|
|
@@ -75,6 +76,15 @@ export class ProviderConfigs extends ClientSDK {
|
|
|
75
76
|
async getModelsCatalog(options) {
|
|
76
77
|
return unwrapAsync(providerConfigsGetModelsCatalog(this, options));
|
|
77
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* List a provider configuration models
|
|
81
|
+
*
|
|
82
|
+
* @remarks
|
|
83
|
+
* The models this provider configuration offers, listed live from the provider and narrowed to the catalog's allow-list policy, with this workspace's per-model enablement applied. When the provider cannot be reached the stored allow-list is returned with `degraded: true` and the reason — an empty list is never presented as 'no models'.
|
|
84
|
+
*/
|
|
85
|
+
async listProviderModels(request, options) {
|
|
86
|
+
return unwrapAsync(providerConfigsListProviderModels(this, request, options));
|
|
87
|
+
}
|
|
78
88
|
/**
|
|
79
89
|
* Test provider connection
|
|
80
90
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-configs.js","sourceRoot":"","sources":["../../../src/sdk/provider-configs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,kCAAkC,EAAE,MAAM,oDAAoD,CAAC;AACxG,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,OAAqD,EACrD,OAAwB;QAExB,OAAO,WAAW,CAAC,4BAA4B,CAC7C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,OAAkC,EAClC,OAAwB;QAExB,OAAO,WAAW,CAAC,6BAA6B,CAC9C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAAwB;QAExB,OAAO,WAAW,CAAC,kCAAkC,CACnD,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,WAAW,CAAC,0BAA0B,CAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,WAAW,CAAC,6BAA6B,CAC9C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,WAAW,CAAC,6BAA6B,CAC9C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,gBAAgB,CACpB,OAAwB;QAExB,OAAO,WAAW,CAAC,+BAA+B,CAChD,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,2BAA2B,CAC5C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"provider-configs.js","sourceRoot":"","sources":["../../../src/sdk/provider-configs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,kCAAkC,EAAE,MAAM,oDAAoD,CAAC;AACxG,OAAO,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,OAAqD,EACrD,OAAwB;QAExB,OAAO,WAAW,CAAC,4BAA4B,CAC7C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,OAAkC,EAClC,OAAwB;QAExB,OAAO,WAAW,CAAC,6BAA6B,CAC9C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAAwB;QAExB,OAAO,WAAW,CAAC,kCAAkC,CACnD,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,WAAW,CAAC,0BAA0B,CAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,WAAW,CAAC,6BAA6B,CAC9C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,WAAW,CAAC,6BAA6B,CAC9C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,gBAAgB,CACpB,OAAwB;QAExB,OAAO,WAAW,CAAC,+BAA+B,CAChD,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,kBAAkB,CACtB,OAA6C,EAC7C,OAAwB;QAExB,OAAO,WAAW,CAAC,iCAAiC,CAClD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,2BAA2B,CAC5C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { MutagentCore } from "../core.js";
|
|
7
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/http-client-errors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { MutagentError } from "../models/errors/mutagent-error.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
26
|
+
import * as models from "../models/index.js";
|
|
27
|
+
import * as operations from "../models/operations/index.js";
|
|
28
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
29
|
+
import { Result } from "../types/fp.js";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* List a provider configuration models
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* The models this provider configuration offers, listed live from the provider and narrowed to the catalog's allow-list policy, with this workspace's per-model enablement applied. When the provider cannot be reached the stored allow-list is returned with `degraded: true` and the reason — an empty list is never presented as 'no models'.
|
|
36
|
+
*/
|
|
37
|
+
export function providerConfigsListProviderModels(
|
|
38
|
+
client: MutagentCore,
|
|
39
|
+
request: operations.ListProviderModelsRequest,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<
|
|
42
|
+
Result<
|
|
43
|
+
models.WorkspaceModelListing,
|
|
44
|
+
| errors.ProviderError
|
|
45
|
+
| errors.WorkspaceModelListingError
|
|
46
|
+
| MutagentError
|
|
47
|
+
| ResponseValidationError
|
|
48
|
+
| ConnectionError
|
|
49
|
+
| RequestAbortedError
|
|
50
|
+
| RequestTimeoutError
|
|
51
|
+
| InvalidRequestError
|
|
52
|
+
| UnexpectedClientError
|
|
53
|
+
| SDKValidationError
|
|
54
|
+
>
|
|
55
|
+
> {
|
|
56
|
+
return new APIPromise($do(
|
|
57
|
+
client,
|
|
58
|
+
request,
|
|
59
|
+
options,
|
|
60
|
+
));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function $do(
|
|
64
|
+
client: MutagentCore,
|
|
65
|
+
request: operations.ListProviderModelsRequest,
|
|
66
|
+
options?: RequestOptions,
|
|
67
|
+
): Promise<
|
|
68
|
+
[
|
|
69
|
+
Result<
|
|
70
|
+
models.WorkspaceModelListing,
|
|
71
|
+
| errors.ProviderError
|
|
72
|
+
| errors.WorkspaceModelListingError
|
|
73
|
+
| MutagentError
|
|
74
|
+
| ResponseValidationError
|
|
75
|
+
| ConnectionError
|
|
76
|
+
| RequestAbortedError
|
|
77
|
+
| RequestTimeoutError
|
|
78
|
+
| InvalidRequestError
|
|
79
|
+
| UnexpectedClientError
|
|
80
|
+
| SDKValidationError
|
|
81
|
+
>,
|
|
82
|
+
APICall,
|
|
83
|
+
]
|
|
84
|
+
> {
|
|
85
|
+
const parsed = safeParse(
|
|
86
|
+
request,
|
|
87
|
+
(value) =>
|
|
88
|
+
z.parse(operations.ListProviderModelsRequest$outboundSchema, value),
|
|
89
|
+
"Input validation failed",
|
|
90
|
+
);
|
|
91
|
+
if (!parsed.ok) {
|
|
92
|
+
return [parsed, { status: "invalid" }];
|
|
93
|
+
}
|
|
94
|
+
const payload = parsed.value;
|
|
95
|
+
const body = null;
|
|
96
|
+
|
|
97
|
+
const pathParams = {
|
|
98
|
+
id: encodeSimple("id", payload.id, {
|
|
99
|
+
explode: false,
|
|
100
|
+
charEncoding: "percent",
|
|
101
|
+
}),
|
|
102
|
+
};
|
|
103
|
+
const path = pathToFunc("/api/providers/{id}/models")(pathParams);
|
|
104
|
+
|
|
105
|
+
const headers = new Headers(compactMap({
|
|
106
|
+
Accept: "application/json",
|
|
107
|
+
}));
|
|
108
|
+
|
|
109
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
110
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
111
|
+
|
|
112
|
+
const context = {
|
|
113
|
+
options: client._options,
|
|
114
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
115
|
+
operationID: "listProviderModels",
|
|
116
|
+
oAuth2Scopes: null,
|
|
117
|
+
|
|
118
|
+
resolvedSecurity: requestSecurity,
|
|
119
|
+
|
|
120
|
+
securitySource: client._options.security,
|
|
121
|
+
retryConfig: options?.retries
|
|
122
|
+
|| client._options.retryConfig
|
|
123
|
+
|| { strategy: "none" },
|
|
124
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const requestRes = client._createRequest(context, {
|
|
128
|
+
security: requestSecurity,
|
|
129
|
+
method: "GET",
|
|
130
|
+
baseURL: options?.serverURL,
|
|
131
|
+
path: path,
|
|
132
|
+
headers: headers,
|
|
133
|
+
body: body,
|
|
134
|
+
userAgent: client._options.userAgent,
|
|
135
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
136
|
+
}, options);
|
|
137
|
+
if (!requestRes.ok) {
|
|
138
|
+
return [requestRes, { status: "invalid" }];
|
|
139
|
+
}
|
|
140
|
+
const req = requestRes.value;
|
|
141
|
+
|
|
142
|
+
const doResult = await client._do(req, {
|
|
143
|
+
context,
|
|
144
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
145
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
146
|
+
retryConfig: context.retryConfig,
|
|
147
|
+
retryCodes: context.retryCodes,
|
|
148
|
+
});
|
|
149
|
+
if (!doResult.ok) {
|
|
150
|
+
return [doResult, { status: "request-error", request: req }];
|
|
151
|
+
}
|
|
152
|
+
const response = doResult.value;
|
|
153
|
+
|
|
154
|
+
const responseFields = {
|
|
155
|
+
HttpMeta: { Response: response, Request: req },
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const [result] = await M.match<
|
|
159
|
+
models.WorkspaceModelListing,
|
|
160
|
+
| errors.ProviderError
|
|
161
|
+
| errors.WorkspaceModelListingError
|
|
162
|
+
| MutagentError
|
|
163
|
+
| ResponseValidationError
|
|
164
|
+
| ConnectionError
|
|
165
|
+
| RequestAbortedError
|
|
166
|
+
| RequestTimeoutError
|
|
167
|
+
| InvalidRequestError
|
|
168
|
+
| UnexpectedClientError
|
|
169
|
+
| SDKValidationError
|
|
170
|
+
>(
|
|
171
|
+
M.json(200, models.WorkspaceModelListing$inboundSchema),
|
|
172
|
+
M.jsonErr(401, errors.ProviderError$inboundSchema),
|
|
173
|
+
M.jsonErr(404, errors.WorkspaceModelListingError$inboundSchema),
|
|
174
|
+
M.fail("4XX"),
|
|
175
|
+
M.fail("5XX"),
|
|
176
|
+
)(response, req, { extraFields: responseFields });
|
|
177
|
+
if (!result.ok) {
|
|
178
|
+
return [result, { status: "complete", request: req, response }];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return [result, { status: "complete", request: req, response }];
|
|
182
|
+
}
|
|
@@ -99,10 +99,7 @@ async function $do(
|
|
|
99
99
|
|
|
100
100
|
const query = encodeFormQuery({
|
|
101
101
|
"includeInactive": payload?.includeInactive,
|
|
102
|
-
"organizationId": payload?.organizationId,
|
|
103
102
|
"provider": payload?.provider,
|
|
104
|
-
"userId": payload?.userId,
|
|
105
|
-
"workspaceId": payload?.workspaceId,
|
|
106
103
|
});
|
|
107
104
|
|
|
108
105
|
const headers = new Headers(compactMap({
|
|
@@ -166,7 +166,7 @@ async function $do(
|
|
|
166
166
|
| SDKValidationError
|
|
167
167
|
>(
|
|
168
168
|
M.json(200, models.ProviderConfig$inboundSchema),
|
|
169
|
-
M.jsonErr([401, 404, 409], errors.ProviderError$inboundSchema),
|
|
169
|
+
M.jsonErr([400, 401, 404, 409], errors.ProviderError$inboundSchema),
|
|
170
170
|
M.jsonErr(500, errors.ProviderError$inboundSchema),
|
|
171
171
|
M.fail("4XX"),
|
|
172
172
|
M.fail("5XX"),
|
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: "2.0.0",
|
|
68
|
-
sdkVersion: "0.3.
|
|
68
|
+
sdkVersion: "0.3.12",
|
|
69
69
|
genVersion: "2.926.2",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.3.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.3.12 2.926.2 2.0.0 @mutagent/sdk",
|
|
71
71
|
} as const;
|
|
@@ -11,4 +11,5 @@ export * from "./response-validation-error.js";
|
|
|
11
11
|
export * from "./sdk-error.js";
|
|
12
12
|
export * from "./sdk-validation-error.js";
|
|
13
13
|
export * from "./test-connection-result-error.js";
|
|
14
|
+
export * from "./workspace-model-listing-error.js";
|
|
14
15
|
export * from "./ws-error.js";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import * as types from "../../types/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
import { MutagentError } from "./mutagent-error.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A provider configuration's models, with this workspace's enablement applied
|
|
12
|
+
*/
|
|
13
|
+
export type WorkspaceModelListingErrorData = {
|
|
14
|
+
models: Array<models.Model>;
|
|
15
|
+
/**
|
|
16
|
+
* 'live' — listed from the provider just now; 'stored' — the persisted allow-list
|
|
17
|
+
*/
|
|
18
|
+
source?: models.SourceOpen | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* True when the live listing failed and the stored allow-list is being shown
|
|
21
|
+
*/
|
|
22
|
+
degraded: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Why the listing degraded, or a provider-stated caveat. Null when neither.
|
|
25
|
+
*/
|
|
26
|
+
message: string | null;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A provider configuration's models, with this workspace's enablement applied
|
|
31
|
+
*/
|
|
32
|
+
export class WorkspaceModelListingError extends MutagentError {
|
|
33
|
+
models: Array<models.Model>;
|
|
34
|
+
/**
|
|
35
|
+
* 'live' — listed from the provider just now; 'stored' — the persisted allow-list
|
|
36
|
+
*/
|
|
37
|
+
source?: models.SourceOpen | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* True when the live listing failed and the stored allow-list is being shown
|
|
40
|
+
*/
|
|
41
|
+
degraded: boolean;
|
|
42
|
+
|
|
43
|
+
/** The original data that was passed to this error instance. */
|
|
44
|
+
data$: WorkspaceModelListingErrorData;
|
|
45
|
+
|
|
46
|
+
constructor(
|
|
47
|
+
err: WorkspaceModelListingErrorData,
|
|
48
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
49
|
+
) {
|
|
50
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
51
|
+
super(message, httpMeta);
|
|
52
|
+
this.data$ = err;
|
|
53
|
+
this.models = err.models;
|
|
54
|
+
if (err.source != null) this.source = err.source;
|
|
55
|
+
this.degraded = err.degraded;
|
|
56
|
+
|
|
57
|
+
this.name = "WorkspaceModelListingError";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const WorkspaceModelListingError$inboundSchema: z.ZodMiniType<
|
|
63
|
+
WorkspaceModelListingError,
|
|
64
|
+
unknown
|
|
65
|
+
> = z.pipe(
|
|
66
|
+
z.object({
|
|
67
|
+
models: z.array(models.Model$inboundSchema),
|
|
68
|
+
source: z._default(models.Source$inboundSchema, models.Source.Live),
|
|
69
|
+
degraded: types.boolean(),
|
|
70
|
+
message: types.nullable(types.string()),
|
|
71
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
72
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
73
|
+
body$: z.string(),
|
|
74
|
+
}),
|
|
75
|
+
z.transform((v) => {
|
|
76
|
+
return new WorkspaceModelListingError(v, {
|
|
77
|
+
request: v.request$,
|
|
78
|
+
response: v.response$,
|
|
79
|
+
body: v.body$,
|
|
80
|
+
});
|
|
81
|
+
}),
|
|
82
|
+
);
|
package/src/models/index.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * from "./success-message.js";
|
|
|
36
36
|
export * from "./test-connection-result.js";
|
|
37
37
|
export * from "./user-id-role-status.js";
|
|
38
38
|
export * from "./user-id-role.js";
|
|
39
|
+
export * from "./workspace-model-listing.js";
|
|
39
40
|
export * from "./workspace.js";
|
|
40
41
|
export * from "./workspaces-list.js";
|
|
41
42
|
export * from "./ws-success.js";
|
|
@@ -40,9 +40,9 @@ export type NameApiKeyBaseUrl = {
|
|
|
40
40
|
*/
|
|
41
41
|
isDefault?: boolean | undefined;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Which hosted model family a gateway configuration targets (null to clear). Named for the column it populates.
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
hostedFamily?: string | null | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* Updated declared models (null to clear)
|
|
48
48
|
*/
|
|
@@ -65,7 +65,7 @@ export type NameApiKeyBaseUrl$Outbound = {
|
|
|
65
65
|
modelOverrides?: Schemanullab2$Outbound | null | undefined;
|
|
66
66
|
isActive?: boolean | undefined;
|
|
67
67
|
isDefault?: boolean | undefined;
|
|
68
|
-
|
|
68
|
+
hostedFamily?: string | null | undefined;
|
|
69
69
|
supportedModels?: Array<IdDisplayNameFamily$Outbound> | null | undefined;
|
|
70
70
|
apiVersion?: string | null | undefined;
|
|
71
71
|
metadata?: Schemanullab2$Outbound | null | undefined;
|
|
@@ -82,7 +82,7 @@ export const NameApiKeyBaseUrl$outboundSchema: z.ZodMiniType<
|
|
|
82
82
|
modelOverrides: z.optional(z.nullable(Schemanullab2$outboundSchema)),
|
|
83
83
|
isActive: z.optional(z.boolean()),
|
|
84
84
|
isDefault: z.optional(z.boolean()),
|
|
85
|
-
|
|
85
|
+
hostedFamily: z.optional(z.nullable(z.string())),
|
|
86
86
|
supportedModels: z.optional(
|
|
87
87
|
z.nullable(z.array(IdDisplayNameFamily$outboundSchema)),
|
|
88
88
|
),
|
|
@@ -22,14 +22,9 @@ export enum Provider {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Per-entry credential material keyed by the catalog wire names for this provider. GET /providers/catalog declares which fields each entry accepts. The secret is extracted and encrypted; only the non-secret remainder is stored.
|
|
26
26
|
*/
|
|
27
|
-
export type
|
|
28
|
-
/**
|
|
29
|
-
* Workspace this provider configuration belongs to
|
|
30
|
-
*/
|
|
31
|
-
workspaceId: string;
|
|
32
|
-
};
|
|
27
|
+
export type CredentialFields = {};
|
|
33
28
|
|
|
34
29
|
/**
|
|
35
30
|
* Model name mappings (e.g., {"gpt-4": "custom-gpt-4"})
|
|
@@ -74,13 +69,17 @@ export type NameProviderApiKey = {
|
|
|
74
69
|
*/
|
|
75
70
|
provider?: Provider | undefined;
|
|
76
71
|
/**
|
|
77
|
-
*
|
|
72
|
+
* The entry's single secret, when sent in this top-level slot. OPTIONAL because the secret's wire name is per-entry — ten entries call it 'apiKey', Google Vertex calls it 'serviceAccountKey'. Send it here or as the correspondingly-named key in credentialFields.
|
|
73
|
+
*/
|
|
74
|
+
apiKey?: string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Per-entry credential material keyed by the catalog wire names for this provider. GET /providers/catalog declares which fields each entry accepts. The secret is extracted and encrypted; only the non-secret remainder is stored.
|
|
78
77
|
*/
|
|
79
|
-
|
|
78
|
+
credentialFields?: CredentialFields | undefined;
|
|
80
79
|
/**
|
|
81
|
-
*
|
|
80
|
+
* Which hosted model family a gateway configuration targets. Required for gateways hosting more than one (Azure, Google Vertex); derived for single-family gateways (AWS Bedrock); not accepted for direct providers.
|
|
82
81
|
*/
|
|
83
|
-
|
|
82
|
+
hostedFamily?: string | undefined;
|
|
84
83
|
/**
|
|
85
84
|
* Custom base URL for the provider API
|
|
86
85
|
*/
|
|
@@ -93,10 +92,6 @@ export type NameProviderApiKey = {
|
|
|
93
92
|
* Set as default provider for this scope
|
|
94
93
|
*/
|
|
95
94
|
isDefault?: boolean | undefined;
|
|
96
|
-
/**
|
|
97
|
-
* Azure/custom wire-format family: 'openai' | 'anthropic' | 'inference'
|
|
98
|
-
*/
|
|
99
|
-
family?: string | undefined;
|
|
100
95
|
/**
|
|
101
96
|
* Declared models this provider serves
|
|
102
97
|
*/
|
|
@@ -117,18 +112,20 @@ export const Provider$outboundSchema: z.ZodMiniEnum<typeof Provider> = z.enum(
|
|
|
117
112
|
);
|
|
118
113
|
|
|
119
114
|
/** @internal */
|
|
120
|
-
export type
|
|
121
|
-
workspaceId: string;
|
|
122
|
-
};
|
|
115
|
+
export type CredentialFields$Outbound = {};
|
|
123
116
|
|
|
124
117
|
/** @internal */
|
|
125
|
-
export const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
118
|
+
export const CredentialFields$outboundSchema: z.ZodMiniType<
|
|
119
|
+
CredentialFields$Outbound,
|
|
120
|
+
CredentialFields
|
|
121
|
+
> = z.object({});
|
|
129
122
|
|
|
130
|
-
export function
|
|
131
|
-
|
|
123
|
+
export function credentialFieldsToJSON(
|
|
124
|
+
credentialFields: CredentialFields,
|
|
125
|
+
): string {
|
|
126
|
+
return JSON.stringify(
|
|
127
|
+
CredentialFields$outboundSchema.parse(credentialFields),
|
|
128
|
+
);
|
|
132
129
|
}
|
|
133
130
|
|
|
134
131
|
/** @internal */
|
|
@@ -202,12 +199,12 @@ export function nameProviderApiKeyMetadataToJSON(
|
|
|
202
199
|
export type NameProviderApiKey$Outbound = {
|
|
203
200
|
name: string;
|
|
204
201
|
provider: string;
|
|
205
|
-
apiKey
|
|
206
|
-
|
|
202
|
+
apiKey?: string | undefined;
|
|
203
|
+
credentialFields?: CredentialFields$Outbound | undefined;
|
|
204
|
+
hostedFamily?: string | undefined;
|
|
207
205
|
baseUrl?: string | undefined;
|
|
208
206
|
modelOverrides?: NameProviderApiKeyModelOverrides$Outbound | undefined;
|
|
209
207
|
isDefault: boolean;
|
|
210
|
-
family?: string | undefined;
|
|
211
208
|
supportedModels?:
|
|
212
209
|
| Array<NameProviderApiKeySupportedModel$Outbound>
|
|
213
210
|
| undefined;
|
|
@@ -222,14 +219,14 @@ export const NameProviderApiKey$outboundSchema: z.ZodMiniType<
|
|
|
222
219
|
> = z.object({
|
|
223
220
|
name: z.string(),
|
|
224
221
|
provider: z._default(Provider$outboundSchema, Provider.Openai),
|
|
225
|
-
apiKey: z.string(),
|
|
226
|
-
|
|
222
|
+
apiKey: z.optional(z.string()),
|
|
223
|
+
credentialFields: z.optional(z.lazy(() => CredentialFields$outboundSchema)),
|
|
224
|
+
hostedFamily: z.optional(z.string()),
|
|
227
225
|
baseUrl: z.optional(z.string()),
|
|
228
226
|
modelOverrides: z.optional(
|
|
229
227
|
z.lazy(() => NameProviderApiKeyModelOverrides$outboundSchema),
|
|
230
228
|
),
|
|
231
229
|
isDefault: z._default(z.boolean(), false),
|
|
232
|
-
family: z.optional(z.string()),
|
|
233
230
|
supportedModels: z.optional(
|
|
234
231
|
z.array(z.lazy(() => NameProviderApiKeySupportedModel$outboundSchema)),
|
|
235
232
|
),
|
|
@@ -29,6 +29,7 @@ export * from "./list-available-models.js";
|
|
|
29
29
|
export * from "./list-invitations.js";
|
|
30
30
|
export * from "./list-organization-members.js";
|
|
31
31
|
export * from "./list-organizations.js";
|
|
32
|
+
export * from "./list-provider-models.js";
|
|
32
33
|
export * from "./list-providers.js";
|
|
33
34
|
export * from "./list-sessions.js";
|
|
34
35
|
export * from "./list-workspace-members.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type ListProviderModelsRequest = {
|
|
8
|
+
id: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type ListProviderModelsRequest$Outbound = {
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const ListProviderModelsRequest$outboundSchema: z.ZodMiniType<
|
|
18
|
+
ListProviderModelsRequest$Outbound,
|
|
19
|
+
ListProviderModelsRequest
|
|
20
|
+
> = z.object({
|
|
21
|
+
id: z.string(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function listProviderModelsRequestToJSON(
|
|
25
|
+
listProviderModelsRequest: ListProviderModelsRequest,
|
|
26
|
+
): string {
|
|
27
|
+
return JSON.stringify(
|
|
28
|
+
ListProviderModelsRequest$outboundSchema.parse(listProviderModelsRequest),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -5,18 +5,12 @@
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
|
|
7
7
|
export type ListProvidersRequest = {
|
|
8
|
-
organizationId?: string | undefined;
|
|
9
|
-
workspaceId?: string | undefined;
|
|
10
|
-
userId?: string | undefined;
|
|
11
8
|
provider?: string | undefined;
|
|
12
9
|
includeInactive?: boolean | undefined;
|
|
13
10
|
};
|
|
14
11
|
|
|
15
12
|
/** @internal */
|
|
16
13
|
export type ListProvidersRequest$Outbound = {
|
|
17
|
-
organizationId?: string | undefined;
|
|
18
|
-
workspaceId?: string | undefined;
|
|
19
|
-
userId?: string | undefined;
|
|
20
14
|
provider?: string | undefined;
|
|
21
15
|
includeInactive?: boolean | undefined;
|
|
22
16
|
};
|
|
@@ -26,9 +20,6 @@ export const ListProvidersRequest$outboundSchema: z.ZodMiniType<
|
|
|
26
20
|
ListProvidersRequest$Outbound,
|
|
27
21
|
ListProvidersRequest
|
|
28
22
|
> = z.object({
|
|
29
|
-
organizationId: z.optional(z.string()),
|
|
30
|
-
workspaceId: z.optional(z.string()),
|
|
31
|
-
userId: z.optional(z.string()),
|
|
32
23
|
provider: z.optional(z.string()),
|
|
33
24
|
includeInactive: z.optional(z.boolean()),
|
|
34
25
|
});
|