@mutagent/sdk 0.2.120 → 0.2.122
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 +10 -8
- package/dist/commonjs/funcs/provider-configs-get-models-catalog.d.ts +18 -0
- package/dist/commonjs/funcs/provider-configs-get-models-catalog.d.ts.map +1 -0
- package/dist/commonjs/funcs/provider-configs-get-models-catalog.js +108 -0
- package/dist/commonjs/funcs/provider-configs-get-models-catalog.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/dataset-item-id-dataset-item-index-model-column-id.d.ts +6 -8
- package/dist/commonjs/models/dataset-item-id-dataset-item-index-model-column-id.d.ts.map +1 -1
- package/dist/commonjs/models/dataset-item-id-dataset-item-index-model-column-id.js +3 -5
- package/dist/commonjs/models/dataset-item-id-dataset-item-index-model-column-id.js.map +1 -1
- package/dist/commonjs/models/id-display-name-family.d.ts +35 -0
- package/dist/commonjs/models/id-display-name-family.d.ts.map +1 -0
- package/dist/commonjs/models/{schemaany-of.js → id-display-name-family.js} +12 -7
- package/dist/commonjs/models/id-display-name-family.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +1 -2
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +1 -2
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/name-api-key-base-url.d.ts +16 -0
- package/dist/commonjs/models/name-api-key-base-url.d.ts.map +1 -1
- package/dist/commonjs/models/name-api-key-base-url.js +4 -0
- package/dist/commonjs/models/name-api-key-base-url.js.map +1 -1
- package/dist/commonjs/models/name-provider-api-key.d.ts +48 -0
- package/dist/commonjs/models/name-provider-api-key.d.ts.map +1 -1
- package/dist/commonjs/models/name-provider-api-key.js +16 -1
- package/dist/commonjs/models/name-provider-api-key.js.map +1 -1
- package/dist/commonjs/models/operations/get-models-catalog.d.ts +11 -0
- package/dist/commonjs/models/operations/get-models-catalog.d.ts.map +1 -0
- package/dist/commonjs/models/{schemaany-of2.js → operations/get-models-catalog.js} +7 -7
- package/dist/commonjs/models/operations/get-models-catalog.js.map +1 -0
- 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/prompt-id-prompt-group-id-evaluation-id.d.ts +8 -44
- package/dist/commonjs/models/prompt-id-prompt-group-id-evaluation-id.d.ts.map +1 -1
- package/dist/commonjs/models/prompt-id-prompt-group-id-evaluation-id.js +5 -30
- package/dist/commonjs/models/prompt-id-prompt-group-id-evaluation-id.js.map +1 -1
- package/dist/commonjs/models/provider-config.d.ts +25 -0
- package/dist/commonjs/models/provider-config.d.ts.map +1 -1
- package/dist/commonjs/models/provider-config.js +16 -1
- package/dist/commonjs/models/provider-config.js.map +1 -1
- package/dist/commonjs/models/provider-configs-list.d.ts +25 -0
- package/dist/commonjs/models/provider-configs-list.d.ts.map +1 -1
- package/dist/commonjs/models/provider-configs-list.js +16 -1
- package/dist/commonjs/models/provider-configs-list.js.map +1 -1
- package/dist/commonjs/models/status-summary-completed-at.d.ts +4 -5
- package/dist/commonjs/models/status-summary-completed-at.d.ts.map +1 -1
- package/dist/commonjs/models/status-summary-completed-at.js +2 -3
- package/dist/commonjs/models/status-summary-completed-at.js.map +1 -1
- 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-get-models-catalog.d.ts +18 -0
- package/dist/esm/funcs/provider-configs-get-models-catalog.d.ts.map +1 -0
- package/dist/esm/funcs/provider-configs-get-models-catalog.js +72 -0
- package/dist/esm/funcs/provider-configs-get-models-catalog.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/dataset-item-id-dataset-item-index-model-column-id.d.ts +6 -8
- package/dist/esm/models/dataset-item-id-dataset-item-index-model-column-id.d.ts.map +1 -1
- package/dist/esm/models/dataset-item-id-dataset-item-index-model-column-id.js +3 -5
- package/dist/esm/models/dataset-item-id-dataset-item-index-model-column-id.js.map +1 -1
- package/dist/esm/models/id-display-name-family.d.ts +35 -0
- package/dist/esm/models/id-display-name-family.d.ts.map +1 -0
- package/dist/esm/models/id-display-name-family.js +16 -0
- package/dist/esm/models/id-display-name-family.js.map +1 -0
- package/dist/esm/models/index.d.ts +1 -2
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +1 -2
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/name-api-key-base-url.d.ts +16 -0
- package/dist/esm/models/name-api-key-base-url.d.ts.map +1 -1
- package/dist/esm/models/name-api-key-base-url.js +4 -0
- package/dist/esm/models/name-api-key-base-url.js.map +1 -1
- package/dist/esm/models/name-provider-api-key.d.ts +48 -0
- package/dist/esm/models/name-provider-api-key.d.ts.map +1 -1
- package/dist/esm/models/name-provider-api-key.js +14 -0
- package/dist/esm/models/name-provider-api-key.js.map +1 -1
- package/dist/esm/models/operations/get-models-catalog.d.ts +11 -0
- package/dist/esm/models/operations/get-models-catalog.d.ts.map +1 -0
- package/dist/esm/models/operations/get-models-catalog.js +11 -0
- package/dist/esm/models/operations/get-models-catalog.js.map +1 -0
- 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/prompt-id-prompt-group-id-evaluation-id.d.ts +8 -44
- package/dist/esm/models/prompt-id-prompt-group-id-evaluation-id.d.ts.map +1 -1
- package/dist/esm/models/prompt-id-prompt-group-id-evaluation-id.js +4 -25
- package/dist/esm/models/prompt-id-prompt-group-id-evaluation-id.js.map +1 -1
- package/dist/esm/models/provider-config.d.ts +25 -0
- package/dist/esm/models/provider-config.d.ts.map +1 -1
- package/dist/esm/models/provider-config.js +14 -0
- package/dist/esm/models/provider-config.js.map +1 -1
- package/dist/esm/models/provider-configs-list.d.ts +25 -0
- package/dist/esm/models/provider-configs-list.d.ts.map +1 -1
- package/dist/esm/models/provider-configs-list.js +14 -0
- package/dist/esm/models/provider-configs-list.js.map +1 -1
- package/dist/esm/models/status-summary-completed-at.d.ts +4 -5
- package/dist/esm/models/status-summary-completed-at.d.ts.map +1 -1
- package/dist/esm/models/status-summary-completed-at.js +2 -3
- package/dist/esm/models/status-summary-completed-at.js.map +1 -1
- 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-get-models-catalog.ts +156 -0
- package/src/lib/config.ts +2 -2
- package/src/models/dataset-item-id-dataset-item-index-model-column-id.ts +9 -19
- package/src/models/id-display-name-family.ts +57 -0
- package/src/models/index.ts +1 -2
- package/src/models/name-api-key-base-url.ts +25 -0
- package/src/models/name-provider-api-key.ts +76 -0
- package/src/models/operations/get-models-catalog.ts +29 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/prompt-id-prompt-group-id-evaluation-id.ts +12 -89
- package/src/models/provider-config.ts +50 -0
- package/src/models/provider-configs-list.ts +50 -0
- package/src/models/status-summary-completed-at.ts +6 -11
- package/src/sdk/provider-configs.ts +16 -0
- package/dist/commonjs/models/schemaany-of.d.ts +0 -8
- package/dist/commonjs/models/schemaany-of.d.ts.map +0 -1
- package/dist/commonjs/models/schemaany-of.js.map +0 -1
- package/dist/commonjs/models/schemaany-of2.d.ts +0 -8
- package/dist/commonjs/models/schemaany-of2.d.ts.map +0 -1
- package/dist/commonjs/models/schemaany-of2.js.map +0 -1
- package/dist/esm/models/schemaany-of.d.ts +0 -8
- package/dist/esm/models/schemaany-of.d.ts.map +0 -1
- package/dist/esm/models/schemaany-of.js +0 -11
- package/dist/esm/models/schemaany-of.js.map +0 -1
- package/dist/esm/models/schemaany-of2.d.ts +0 -8
- package/dist/esm/models/schemaany-of2.d.ts.map +0 -1
- package/dist/esm/models/schemaany-of2.js +0 -11
- package/dist/esm/models/schemaany-of2.js.map +0 -1
- package/src/models/schemaany-of.ts +0 -21
- package/src/models/schemaany-of2.ts +0 -21
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { MutagentCore } from "../core.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../models/errors/http-client-errors.js";
|
|
19
|
+
import * as errors from "../models/errors/index.js";
|
|
20
|
+
import { MutagentError } from "../models/errors/mutagent-error.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
22
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
23
|
+
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
25
|
+
import { Result } from "../types/fp.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Get models catalog
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Returns the union of static known models and declared provider models for a workspace. Used by the optimizer dropdown.
|
|
32
|
+
*/
|
|
33
|
+
export function providerConfigsGetModelsCatalog(
|
|
34
|
+
client: MutagentCore,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
operations.GetModelsCatalogResponse,
|
|
39
|
+
| errors.ErrorMessage
|
|
40
|
+
| errors.ErrorMessageStatusCode
|
|
41
|
+
| MutagentError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client: MutagentCore,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): Promise<
|
|
61
|
+
[
|
|
62
|
+
Result<
|
|
63
|
+
operations.GetModelsCatalogResponse,
|
|
64
|
+
| errors.ErrorMessage
|
|
65
|
+
| errors.ErrorMessageStatusCode
|
|
66
|
+
| MutagentError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const path = pathToFunc("/api/providers/catalog")();
|
|
79
|
+
|
|
80
|
+
const headers = new Headers(compactMap({
|
|
81
|
+
Accept: "application/json",
|
|
82
|
+
}));
|
|
83
|
+
|
|
84
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
85
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
86
|
+
|
|
87
|
+
const context = {
|
|
88
|
+
options: client._options,
|
|
89
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
90
|
+
operationID: "getModelsCatalog",
|
|
91
|
+
oAuth2Scopes: null,
|
|
92
|
+
|
|
93
|
+
resolvedSecurity: requestSecurity,
|
|
94
|
+
|
|
95
|
+
securitySource: client._options.security,
|
|
96
|
+
retryConfig: options?.retries
|
|
97
|
+
|| client._options.retryConfig
|
|
98
|
+
|| { strategy: "none" },
|
|
99
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const requestRes = client._createRequest(context, {
|
|
103
|
+
security: requestSecurity,
|
|
104
|
+
method: "GET",
|
|
105
|
+
baseURL: options?.serverURL,
|
|
106
|
+
path: path,
|
|
107
|
+
headers: headers,
|
|
108
|
+
userAgent: client._options.userAgent,
|
|
109
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
110
|
+
}, options);
|
|
111
|
+
if (!requestRes.ok) {
|
|
112
|
+
return [requestRes, { status: "invalid" }];
|
|
113
|
+
}
|
|
114
|
+
const req = requestRes.value;
|
|
115
|
+
|
|
116
|
+
const doResult = await client._do(req, {
|
|
117
|
+
context,
|
|
118
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
119
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
120
|
+
retryConfig: context.retryConfig,
|
|
121
|
+
retryCodes: context.retryCodes,
|
|
122
|
+
});
|
|
123
|
+
if (!doResult.ok) {
|
|
124
|
+
return [doResult, { status: "request-error", request: req }];
|
|
125
|
+
}
|
|
126
|
+
const response = doResult.value;
|
|
127
|
+
|
|
128
|
+
const responseFields = {
|
|
129
|
+
HttpMeta: { Response: response, Request: req },
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const [result] = await M.match<
|
|
133
|
+
operations.GetModelsCatalogResponse,
|
|
134
|
+
| errors.ErrorMessage
|
|
135
|
+
| errors.ErrorMessageStatusCode
|
|
136
|
+
| MutagentError
|
|
137
|
+
| ResponseValidationError
|
|
138
|
+
| ConnectionError
|
|
139
|
+
| RequestAbortedError
|
|
140
|
+
| RequestTimeoutError
|
|
141
|
+
| InvalidRequestError
|
|
142
|
+
| UnexpectedClientError
|
|
143
|
+
| SDKValidationError
|
|
144
|
+
>(
|
|
145
|
+
M.json(200, operations.GetModelsCatalogResponse$inboundSchema),
|
|
146
|
+
M.jsonErr([400, 401, 403, 404], errors.ErrorMessage$inboundSchema),
|
|
147
|
+
M.jsonErr(500, errors.ErrorMessageStatusCode$inboundSchema),
|
|
148
|
+
M.fail("4XX"),
|
|
149
|
+
M.fail("5XX"),
|
|
150
|
+
)(response, req, { extraFields: responseFields });
|
|
151
|
+
if (!result.ok) {
|
|
152
|
+
return [result, { status: "complete", request: req, response }];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return [result, { status: "complete", request: req, response }];
|
|
156
|
+
}
|
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.2.
|
|
68
|
+
sdkVersion: "0.2.122",
|
|
69
69
|
genVersion: "2.881.0",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.2.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.2.122 2.881.0 2.0.0 @mutagent/sdk",
|
|
71
71
|
} as const;
|
|
@@ -3,16 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
-
import {
|
|
7
|
-
SchemaanyOf,
|
|
8
|
-
SchemaanyOf$Outbound,
|
|
9
|
-
SchemaanyOf$outboundSchema,
|
|
10
|
-
} from "./schemaany-of.js";
|
|
11
|
-
import {
|
|
12
|
-
SchemaanyOf2,
|
|
13
|
-
SchemaanyOf2$Outbound,
|
|
14
|
-
SchemaanyOf2$outboundSchema,
|
|
15
|
-
} from "./schemaany-of2.js";
|
|
16
6
|
|
|
17
7
|
export type EvalCriterion = {
|
|
18
8
|
/**
|
|
@@ -41,11 +31,11 @@ export type DatasetItemIdDatasetItemIndexModelColumnId = {
|
|
|
41
31
|
/**
|
|
42
32
|
* ID of the dataset item this result is for
|
|
43
33
|
*/
|
|
44
|
-
datasetItemId
|
|
34
|
+
datasetItemId?: number | undefined;
|
|
45
35
|
/**
|
|
46
36
|
* Position of dataset item at run time
|
|
47
37
|
*/
|
|
48
|
-
datasetItemIndex:
|
|
38
|
+
datasetItemIndex: number;
|
|
49
39
|
/**
|
|
50
40
|
* Model column ID matching config.models[].id
|
|
51
41
|
*/
|
|
@@ -65,7 +55,7 @@ export type DatasetItemIdDatasetItemIndexModelColumnId = {
|
|
|
65
55
|
/**
|
|
66
56
|
* Execution time in milliseconds
|
|
67
57
|
*/
|
|
68
|
-
latencyMs?:
|
|
58
|
+
latencyMs?: number | undefined;
|
|
69
59
|
/**
|
|
70
60
|
* Error message if execution failed
|
|
71
61
|
*/
|
|
@@ -107,13 +97,13 @@ export function evalCriterionToJSON(evalCriterion: EvalCriterion): string {
|
|
|
107
97
|
|
|
108
98
|
/** @internal */
|
|
109
99
|
export type DatasetItemIdDatasetItemIndexModelColumnId$Outbound = {
|
|
110
|
-
datasetItemId:
|
|
111
|
-
datasetItemIndex:
|
|
100
|
+
datasetItemId: number;
|
|
101
|
+
datasetItemIndex: number;
|
|
112
102
|
modelColumnId: string;
|
|
113
103
|
output: string;
|
|
114
104
|
evalScore?: number | null | undefined;
|
|
115
105
|
evalPassed?: boolean | null | undefined;
|
|
116
|
-
latencyMs?:
|
|
106
|
+
latencyMs?: number | undefined;
|
|
117
107
|
error?: string | undefined;
|
|
118
108
|
traceId?: string | undefined;
|
|
119
109
|
evalCriteria?: Array<EvalCriterion$Outbound> | null | undefined;
|
|
@@ -125,13 +115,13 @@ export const DatasetItemIdDatasetItemIndexModelColumnId$outboundSchema:
|
|
|
125
115
|
DatasetItemIdDatasetItemIndexModelColumnId$Outbound,
|
|
126
116
|
DatasetItemIdDatasetItemIndexModelColumnId
|
|
127
117
|
> = z.object({
|
|
128
|
-
datasetItemId:
|
|
129
|
-
datasetItemIndex:
|
|
118
|
+
datasetItemId: z._default(z.int(), 0),
|
|
119
|
+
datasetItemIndex: z.int(),
|
|
130
120
|
modelColumnId: z.string(),
|
|
131
121
|
output: z.string(),
|
|
132
122
|
evalScore: z.optional(z.nullable(z.number())),
|
|
133
123
|
evalPassed: z.optional(z.nullable(z.boolean())),
|
|
134
|
-
latencyMs: z.optional(
|
|
124
|
+
latencyMs: z.optional(z.int()),
|
|
135
125
|
error: z.optional(z.string()),
|
|
136
126
|
traceId: z.optional(z.string()),
|
|
137
127
|
evalCriteria: z.optional(
|
|
@@ -0,0 +1,57 @@
|
|
|
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 IdDisplayNameFamily = {
|
|
8
|
+
/**
|
|
9
|
+
* Model identifier
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* Human-readable name
|
|
14
|
+
*/
|
|
15
|
+
displayName?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Adapter family (openai|anthropic|inference)
|
|
18
|
+
*/
|
|
19
|
+
family?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Role list: exec, eval, opt
|
|
22
|
+
*/
|
|
23
|
+
roles?: Array<string> | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* 'discovered' | 'manual'
|
|
26
|
+
*/
|
|
27
|
+
source?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type IdDisplayNameFamily$Outbound = {
|
|
32
|
+
id: string;
|
|
33
|
+
displayName?: string | undefined;
|
|
34
|
+
family?: string | undefined;
|
|
35
|
+
roles?: Array<string> | undefined;
|
|
36
|
+
source?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const IdDisplayNameFamily$outboundSchema: z.ZodMiniType<
|
|
41
|
+
IdDisplayNameFamily$Outbound,
|
|
42
|
+
IdDisplayNameFamily
|
|
43
|
+
> = z.object({
|
|
44
|
+
id: z.string(),
|
|
45
|
+
displayName: z.optional(z.string()),
|
|
46
|
+
family: z.optional(z.string()),
|
|
47
|
+
roles: z.optional(z.array(z.string())),
|
|
48
|
+
source: z.optional(z.string()),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function idDisplayNameFamilyToJSON(
|
|
52
|
+
idDisplayNameFamily: IdDisplayNameFamily,
|
|
53
|
+
): string {
|
|
54
|
+
return JSON.stringify(
|
|
55
|
+
IdDisplayNameFamily$outboundSchema.parse(idDisplayNameFamily),
|
|
56
|
+
);
|
|
57
|
+
}
|
package/src/models/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from "./evaluation-list.js";
|
|
|
21
21
|
export * from "./evaluation-result.js";
|
|
22
22
|
export * from "./evaluation-run.js";
|
|
23
23
|
export * from "./evaluation.js";
|
|
24
|
+
export * from "./id-display-name-family.js";
|
|
24
25
|
export * from "./id-name-email.js";
|
|
25
26
|
export * from "./id-organization-id-email.js";
|
|
26
27
|
export * from "./id-prompt-id-workspace-id.js";
|
|
@@ -72,8 +73,6 @@ export * from "./prompt.js";
|
|
|
72
73
|
export * from "./provider-config.js";
|
|
73
74
|
export * from "./provider-configs-list.js";
|
|
74
75
|
export * from "./provider-success.js";
|
|
75
|
-
export * from "./schemaany-of.js";
|
|
76
|
-
export * from "./schemaany-of2.js";
|
|
77
76
|
export * from "./schemadefaul6.js";
|
|
78
77
|
export * from "./schemadefaul8.js";
|
|
79
78
|
export * from "./schemaenum2.js";
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import {
|
|
7
|
+
IdDisplayNameFamily,
|
|
8
|
+
IdDisplayNameFamily$Outbound,
|
|
9
|
+
IdDisplayNameFamily$outboundSchema,
|
|
10
|
+
} from "./id-display-name-family.js";
|
|
6
11
|
import {
|
|
7
12
|
Schemanullab4,
|
|
8
13
|
Schemanullab4$Outbound,
|
|
@@ -34,6 +39,18 @@ export type NameApiKeyBaseUrl = {
|
|
|
34
39
|
* Set or unset as default provider
|
|
35
40
|
*/
|
|
36
41
|
isDefault?: boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Azure/custom wire-format family: 'openai' | 'anthropic' | 'inference'
|
|
44
|
+
*/
|
|
45
|
+
family?: string | null | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Updated declared models (null to clear)
|
|
48
|
+
*/
|
|
49
|
+
supportedModels?: Array<IdDisplayNameFamily> | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Updated API version (null to clear)
|
|
52
|
+
*/
|
|
53
|
+
apiVersion?: string | null | undefined;
|
|
37
54
|
/**
|
|
38
55
|
* Updated metadata (null to clear)
|
|
39
56
|
*/
|
|
@@ -48,6 +65,9 @@ export type NameApiKeyBaseUrl$Outbound = {
|
|
|
48
65
|
modelOverrides?: Schemanullab4$Outbound | null | undefined;
|
|
49
66
|
isActive?: boolean | undefined;
|
|
50
67
|
isDefault?: boolean | undefined;
|
|
68
|
+
family?: string | null | undefined;
|
|
69
|
+
supportedModels?: Array<IdDisplayNameFamily$Outbound> | null | undefined;
|
|
70
|
+
apiVersion?: string | null | undefined;
|
|
51
71
|
metadata?: Schemanullab4$Outbound | null | undefined;
|
|
52
72
|
};
|
|
53
73
|
|
|
@@ -62,6 +82,11 @@ export const NameApiKeyBaseUrl$outboundSchema: z.ZodMiniType<
|
|
|
62
82
|
modelOverrides: z.optional(z.nullable(Schemanullab4$outboundSchema)),
|
|
63
83
|
isActive: z.optional(z.boolean()),
|
|
64
84
|
isDefault: z.optional(z.boolean()),
|
|
85
|
+
family: z.optional(z.nullable(z.string())),
|
|
86
|
+
supportedModels: z.optional(
|
|
87
|
+
z.nullable(z.array(IdDisplayNameFamily$outboundSchema)),
|
|
88
|
+
),
|
|
89
|
+
apiVersion: z.optional(z.nullable(z.string())),
|
|
65
90
|
metadata: z.optional(z.nullable(Schemanullab4$outboundSchema)),
|
|
66
91
|
});
|
|
67
92
|
|
|
@@ -42,6 +42,29 @@ export type Scope = {
|
|
|
42
42
|
*/
|
|
43
43
|
export type NameProviderApiKeyModelOverrides = {};
|
|
44
44
|
|
|
45
|
+
export type NameProviderApiKeySupportedModel = {
|
|
46
|
+
/**
|
|
47
|
+
* Model identifier
|
|
48
|
+
*/
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
* Human-readable name
|
|
52
|
+
*/
|
|
53
|
+
displayName?: string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Adapter family (openai|anthropic|inference)
|
|
56
|
+
*/
|
|
57
|
+
family?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Role list: exec, eval, opt
|
|
60
|
+
*/
|
|
61
|
+
roles?: Array<string> | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* 'discovered' | 'manual'
|
|
64
|
+
*/
|
|
65
|
+
source?: string | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
45
68
|
/**
|
|
46
69
|
* Additional metadata
|
|
47
70
|
*/
|
|
@@ -76,6 +99,18 @@ export type NameProviderApiKey = {
|
|
|
76
99
|
* Set as default provider for this scope
|
|
77
100
|
*/
|
|
78
101
|
isDefault?: boolean | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* Azure/custom wire-format family: 'openai' | 'anthropic' | 'inference'
|
|
104
|
+
*/
|
|
105
|
+
family?: string | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Declared models this provider serves
|
|
108
|
+
*/
|
|
109
|
+
supportedModels?: Array<NameProviderApiKeySupportedModel> | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* API version string, e.g. '2024-08-01-preview'
|
|
112
|
+
*/
|
|
113
|
+
apiVersion?: string | undefined;
|
|
79
114
|
/**
|
|
80
115
|
* Additional metadata
|
|
81
116
|
*/
|
|
@@ -125,6 +160,37 @@ export function nameProviderApiKeyModelOverridesToJSON(
|
|
|
125
160
|
);
|
|
126
161
|
}
|
|
127
162
|
|
|
163
|
+
/** @internal */
|
|
164
|
+
export type NameProviderApiKeySupportedModel$Outbound = {
|
|
165
|
+
id: string;
|
|
166
|
+
displayName?: string | undefined;
|
|
167
|
+
family?: string | undefined;
|
|
168
|
+
roles?: Array<string> | undefined;
|
|
169
|
+
source?: string | undefined;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/** @internal */
|
|
173
|
+
export const NameProviderApiKeySupportedModel$outboundSchema: z.ZodMiniType<
|
|
174
|
+
NameProviderApiKeySupportedModel$Outbound,
|
|
175
|
+
NameProviderApiKeySupportedModel
|
|
176
|
+
> = z.object({
|
|
177
|
+
id: z.string(),
|
|
178
|
+
displayName: z.optional(z.string()),
|
|
179
|
+
family: z.optional(z.string()),
|
|
180
|
+
roles: z.optional(z.array(z.string())),
|
|
181
|
+
source: z.optional(z.string()),
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
export function nameProviderApiKeySupportedModelToJSON(
|
|
185
|
+
nameProviderApiKeySupportedModel: NameProviderApiKeySupportedModel,
|
|
186
|
+
): string {
|
|
187
|
+
return JSON.stringify(
|
|
188
|
+
NameProviderApiKeySupportedModel$outboundSchema.parse(
|
|
189
|
+
nameProviderApiKeySupportedModel,
|
|
190
|
+
),
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
128
194
|
/** @internal */
|
|
129
195
|
export type NameProviderApiKeyMetadata$Outbound = {};
|
|
130
196
|
|
|
@@ -151,6 +217,11 @@ export type NameProviderApiKey$Outbound = {
|
|
|
151
217
|
baseUrl?: string | undefined;
|
|
152
218
|
modelOverrides?: NameProviderApiKeyModelOverrides$Outbound | undefined;
|
|
153
219
|
isDefault: boolean;
|
|
220
|
+
family?: string | undefined;
|
|
221
|
+
supportedModels?:
|
|
222
|
+
| Array<NameProviderApiKeySupportedModel$Outbound>
|
|
223
|
+
| undefined;
|
|
224
|
+
apiVersion?: string | undefined;
|
|
154
225
|
metadata?: NameProviderApiKeyMetadata$Outbound | undefined;
|
|
155
226
|
};
|
|
156
227
|
|
|
@@ -168,6 +239,11 @@ export const NameProviderApiKey$outboundSchema: z.ZodMiniType<
|
|
|
168
239
|
z.lazy(() => NameProviderApiKeyModelOverrides$outboundSchema),
|
|
169
240
|
),
|
|
170
241
|
isDefault: z._default(z.boolean(), false),
|
|
242
|
+
family: z.optional(z.string()),
|
|
243
|
+
supportedModels: z.optional(
|
|
244
|
+
z.array(z.lazy(() => NameProviderApiKeySupportedModel$outboundSchema)),
|
|
245
|
+
),
|
|
246
|
+
apiVersion: z.optional(z.string()),
|
|
171
247
|
metadata: z.optional(z.lazy(() => NameProviderApiKeyMetadata$outboundSchema)),
|
|
172
248
|
});
|
|
173
249
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Successful response
|
|
12
|
+
*/
|
|
13
|
+
export type GetModelsCatalogResponse = {};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const GetModelsCatalogResponse$inboundSchema: z.ZodMiniType<
|
|
17
|
+
GetModelsCatalogResponse,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({});
|
|
20
|
+
|
|
21
|
+
export function getModelsCatalogResponseFromJSON(
|
|
22
|
+
jsonString: string,
|
|
23
|
+
): SafeParseResult<GetModelsCatalogResponse, SDKValidationError> {
|
|
24
|
+
return safeParse(
|
|
25
|
+
jsonString,
|
|
26
|
+
(x) => GetModelsCatalogResponse$inboundSchema.parse(JSON.parse(x)),
|
|
27
|
+
`Failed to parse 'GetModelsCatalogResponse' from JSON`,
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -45,6 +45,7 @@ export * from "./get-evaluation-results-aggregated.js";
|
|
|
45
45
|
export * from "./get-evaluation.js";
|
|
46
46
|
export * from "./get-experiment.js";
|
|
47
47
|
export * from "./get-invitation.js";
|
|
48
|
+
export * from "./get-models-catalog.js";
|
|
48
49
|
export * from "./get-optimization-progress.js";
|
|
49
50
|
export * from "./get-optimization-results.js";
|
|
50
51
|
export * from "./get-optimization-states.js";
|
|
@@ -3,22 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
-
import { smartUnion } from "../types/smart-union.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* ID of the prompt to experiment with
|
|
10
|
-
*/
|
|
11
|
-
export type PromptId = string | number;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* ID of the evaluation criteria to use
|
|
15
|
-
*/
|
|
16
|
-
export type EvaluationId = string | number;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* ID of the dataset to use
|
|
20
|
-
*/
|
|
21
|
-
export type DatasetId = string | number;
|
|
22
6
|
|
|
23
7
|
export type Model = {
|
|
24
8
|
/**
|
|
@@ -35,16 +19,11 @@ export type Model = {
|
|
|
35
19
|
temperature: number;
|
|
36
20
|
};
|
|
37
21
|
|
|
38
|
-
/**
|
|
39
|
-
* Snapshot of dataset size at run time
|
|
40
|
-
*/
|
|
41
|
-
export type DatasetItemCount = string | number;
|
|
42
|
-
|
|
43
22
|
export type PromptIdPromptGroupIdEvaluationId = {
|
|
44
23
|
/**
|
|
45
24
|
* ID of the prompt to experiment with
|
|
46
25
|
*/
|
|
47
|
-
promptId
|
|
26
|
+
promptId?: number | undefined;
|
|
48
27
|
/**
|
|
49
28
|
* Prompt group UUID for filtering experiments by prompt family
|
|
50
29
|
*/
|
|
@@ -52,11 +31,11 @@ export type PromptIdPromptGroupIdEvaluationId = {
|
|
|
52
31
|
/**
|
|
53
32
|
* ID of the evaluation criteria to use
|
|
54
33
|
*/
|
|
55
|
-
evaluationId
|
|
34
|
+
evaluationId?: number | undefined;
|
|
56
35
|
/**
|
|
57
36
|
* ID of the dataset to use
|
|
58
37
|
*/
|
|
59
|
-
datasetId
|
|
38
|
+
datasetId?: number | undefined;
|
|
60
39
|
/**
|
|
61
40
|
* Array of model configurations (1-4 models)
|
|
62
41
|
*/
|
|
@@ -64,52 +43,13 @@ export type PromptIdPromptGroupIdEvaluationId = {
|
|
|
64
43
|
/**
|
|
65
44
|
* Snapshot of dataset size at run time
|
|
66
45
|
*/
|
|
67
|
-
datasetItemCount?:
|
|
46
|
+
datasetItemCount?: number | undefined;
|
|
68
47
|
/**
|
|
69
48
|
* Experiment name (auto-generated if not provided)
|
|
70
49
|
*/
|
|
71
50
|
name?: string | undefined;
|
|
72
51
|
};
|
|
73
52
|
|
|
74
|
-
/** @internal */
|
|
75
|
-
export type PromptId$Outbound = string | number;
|
|
76
|
-
|
|
77
|
-
/** @internal */
|
|
78
|
-
export const PromptId$outboundSchema: z.ZodMiniType<
|
|
79
|
-
PromptId$Outbound,
|
|
80
|
-
PromptId
|
|
81
|
-
> = smartUnion([z.string(), z.int()]);
|
|
82
|
-
|
|
83
|
-
export function promptIdToJSON(promptId: PromptId): string {
|
|
84
|
-
return JSON.stringify(PromptId$outboundSchema.parse(promptId));
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/** @internal */
|
|
88
|
-
export type EvaluationId$Outbound = string | number;
|
|
89
|
-
|
|
90
|
-
/** @internal */
|
|
91
|
-
export const EvaluationId$outboundSchema: z.ZodMiniType<
|
|
92
|
-
EvaluationId$Outbound,
|
|
93
|
-
EvaluationId
|
|
94
|
-
> = smartUnion([z.string(), z.int()]);
|
|
95
|
-
|
|
96
|
-
export function evaluationIdToJSON(evaluationId: EvaluationId): string {
|
|
97
|
-
return JSON.stringify(EvaluationId$outboundSchema.parse(evaluationId));
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/** @internal */
|
|
101
|
-
export type DatasetId$Outbound = string | number;
|
|
102
|
-
|
|
103
|
-
/** @internal */
|
|
104
|
-
export const DatasetId$outboundSchema: z.ZodMiniType<
|
|
105
|
-
DatasetId$Outbound,
|
|
106
|
-
DatasetId
|
|
107
|
-
> = smartUnion([z.string(), z.int()]);
|
|
108
|
-
|
|
109
|
-
export function datasetIdToJSON(datasetId: DatasetId): string {
|
|
110
|
-
return JSON.stringify(DatasetId$outboundSchema.parse(datasetId));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
53
|
/** @internal */
|
|
114
54
|
export type Model$Outbound = {
|
|
115
55
|
id: string;
|
|
@@ -129,31 +69,14 @@ export function modelToJSON(model: Model): string {
|
|
|
129
69
|
return JSON.stringify(Model$outboundSchema.parse(model));
|
|
130
70
|
}
|
|
131
71
|
|
|
132
|
-
/** @internal */
|
|
133
|
-
export type DatasetItemCount$Outbound = string | number;
|
|
134
|
-
|
|
135
|
-
/** @internal */
|
|
136
|
-
export const DatasetItemCount$outboundSchema: z.ZodMiniType<
|
|
137
|
-
DatasetItemCount$Outbound,
|
|
138
|
-
DatasetItemCount
|
|
139
|
-
> = smartUnion([z.string(), z.int()]);
|
|
140
|
-
|
|
141
|
-
export function datasetItemCountToJSON(
|
|
142
|
-
datasetItemCount: DatasetItemCount,
|
|
143
|
-
): string {
|
|
144
|
-
return JSON.stringify(
|
|
145
|
-
DatasetItemCount$outboundSchema.parse(datasetItemCount),
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
72
|
/** @internal */
|
|
150
73
|
export type PromptIdPromptGroupIdEvaluationId$Outbound = {
|
|
151
|
-
promptId:
|
|
74
|
+
promptId: number;
|
|
152
75
|
promptGroupId: string;
|
|
153
|
-
evaluationId:
|
|
154
|
-
datasetId:
|
|
76
|
+
evaluationId: number;
|
|
77
|
+
datasetId: number;
|
|
155
78
|
models: Array<Model$Outbound>;
|
|
156
|
-
datasetItemCount
|
|
79
|
+
datasetItemCount: number;
|
|
157
80
|
name?: string | undefined;
|
|
158
81
|
};
|
|
159
82
|
|
|
@@ -162,12 +85,12 @@ export const PromptIdPromptGroupIdEvaluationId$outboundSchema: z.ZodMiniType<
|
|
|
162
85
|
PromptIdPromptGroupIdEvaluationId$Outbound,
|
|
163
86
|
PromptIdPromptGroupIdEvaluationId
|
|
164
87
|
> = z.object({
|
|
165
|
-
promptId:
|
|
88
|
+
promptId: z._default(z.int(), 0),
|
|
166
89
|
promptGroupId: z.string(),
|
|
167
|
-
evaluationId:
|
|
168
|
-
datasetId:
|
|
90
|
+
evaluationId: z._default(z.int(), 0),
|
|
91
|
+
datasetId: z._default(z.int(), 0),
|
|
169
92
|
models: z.array(z.lazy(() => Model$outboundSchema)),
|
|
170
|
-
datasetItemCount: z.
|
|
93
|
+
datasetItemCount: z._default(z.int(), 0),
|
|
171
94
|
name: z.optional(z.string()),
|
|
172
95
|
});
|
|
173
96
|
|