@databricks/sdk-modelserving 0.1.0-dev.4 → 0.2.0

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 ADDED
@@ -0,0 +1,23 @@
1
+ # @databricks/sdk-modelserving
2
+
3
+ > [!NOTE]
4
+ >
5
+ > ## Beta
6
+ >
7
+ > **This SDK is in Beta and is supported for production use cases.** Interfaces might still change slightly before GA (e.g. name standardization and minor ergonomic tweaks). We are keen to hear feedback from early adopters — please [file issues](https://github.com/databricks/sdk-js/issues), and we will address them.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @databricks/sdk-modelserving
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```typescript
18
+ import {ModelServingClient} from '@databricks/sdk-modelserving/v1';
19
+
20
+ const client = new ModelServingClient({});
21
+ ```
22
+
23
+ For a full getting-started guide, see the [root README](../../README.md).
@@ -3,18 +3,20 @@ import type { ClientOptions } from '@databricks/sdk-options/client';
3
3
  import type { LroOptions } from '@databricks/sdk-options/lro';
4
4
  import type { CreateInferenceEndpointRequest, CreatePtEndpointRequest, DeleteInferenceEndpointRequest, DeleteInferenceEndpointResponse, ExportMetricsResponse, ExternalFunctionRequest, ExternalFunctionResponse, GetExportEndpointMetricsRequest, GetInferenceEndpointRequest, GetInferenceEndpointSchemaRequest, GetOpenApiResponse, GetServedModelBuildLogsRequest, GetServedModelBuildLogsResponse, GetServedModelLogsRequest, GetServedModelLogsResponse, InferenceEndpointDetailed, ListInferenceEndpointsRequest, ListInferenceEndpointsResponse, PatchInferenceEndpointTagsRequest, PatchInferenceEndpointTagsResponse, PutInferenceEndpointAiGatewayRequest, PutInferenceEndpointAiGatewayResponse, PutInferenceEndpointConfigRequest, PutInferenceEndpointRateLimitsRequest, PutInferenceEndpointRateLimitsResponse, PutPtEndpointConfigRequest, UpdateInferenceEndpointNotificationsRequest, UpdateInferenceEndpointNotificationsResponse } from './model';
5
5
  export declare class ModelServingClient {
6
- private readonly host;
7
- private readonly workspaceId;
8
- private readonly httpClient;
6
+ private readonly options;
9
7
  private readonly logger;
10
8
  private readonly userAgent;
9
+ private config;
11
10
  constructor(options: ClientOptions);
11
+ private resolveConfig;
12
12
  /** Create a new serving endpoint. */
13
- private createInferenceEndpoint;
14
- createInferenceEndpointWaiter(req: CreateInferenceEndpointRequest, options?: CallOptions): Promise<CreateInferenceEndpointWaiter>;
13
+ private createInferenceEndpointBase;
14
+ /** Create a new serving endpoint. */
15
+ createInferenceEndpoint(req: CreateInferenceEndpointRequest, options?: CallOptions): Promise<CreateInferenceEndpointWaiter>;
16
+ /** Create a new PT serving endpoint. */
17
+ private createProvisionedThroughputInferenceEndpointBase;
15
18
  /** Create a new PT serving endpoint. */
16
- private createProvisionedThroughputInferenceEndpoint;
17
- createProvisionedThroughputInferenceEndpointWaiter(req: CreatePtEndpointRequest, options?: CallOptions): Promise<CreateProvisionedThroughputInferenceEndpointWaiter>;
19
+ createProvisionedThroughputInferenceEndpoint(req: CreatePtEndpointRequest, options?: CallOptions): Promise<CreateProvisionedThroughputInferenceEndpointWaiter>;
18
20
  /** Delete a serving endpoint. */
19
21
  deleteInferenceEndpoint(req: DeleteInferenceEndpointRequest, options?: CallOptions): Promise<DeleteInferenceEndpointResponse>;
20
22
  /** Retrieves the metrics associated with the provided serving endpoint in either Prometheus or OpenMetrics exposition format. */
@@ -34,13 +36,15 @@ export declare class ModelServingClient {
34
36
  /** Used to update the AI Gateway of a serving endpoint. NOTE: External model, provisioned throughput, and pay-per-token endpoints are fully supported; agent endpoints currently only support inference tables. */
35
37
  putInferenceEndpointAiGateway(req: PutInferenceEndpointAiGatewayRequest, options?: CallOptions): Promise<PutInferenceEndpointAiGatewayResponse>;
36
38
  /** Updates any combination of the serving endpoint's served entities, the compute configuration of those served entities, and the endpoint's traffic config. An endpoint that already has an update in progress can not be updated until the current update completes or fails. */
37
- private putInferenceEndpointConfig;
38
- putInferenceEndpointConfigWaiter(req: PutInferenceEndpointConfigRequest, options?: CallOptions): Promise<PutInferenceEndpointConfigWaiter>;
39
+ private putInferenceEndpointConfigBase;
40
+ /** Updates any combination of the serving endpoint's served entities, the compute configuration of those served entities, and the endpoint's traffic config. An endpoint that already has an update in progress can not be updated until the current update completes or fails. */
41
+ putInferenceEndpointConfig(req: PutInferenceEndpointConfigRequest, options?: CallOptions): Promise<PutInferenceEndpointConfigWaiter>;
39
42
  /** Deprecated: Please use AI Gateway to manage rate limits instead. */
40
43
  putInferenceEndpointRateLimits(req: PutInferenceEndpointRateLimitsRequest, options?: CallOptions): Promise<PutInferenceEndpointRateLimitsResponse>;
41
44
  /** Updates any combination of the pt endpoint's served entities, the compute configuration of those served entities, and the endpoint's traffic config. Updates are instantaneous and endpoint should be updated instantly */
42
- private putProvisionedThroughputInferenceEndpointConfig;
43
- putProvisionedThroughputInferenceEndpointConfigWaiter(req: PutPtEndpointConfigRequest, options?: CallOptions): Promise<PutProvisionedThroughputInferenceEndpointConfigWaiter>;
45
+ private putProvisionedThroughputInferenceEndpointConfigBase;
46
+ /** Updates any combination of the pt endpoint's served entities, the compute configuration of those served entities, and the endpoint's traffic config. Updates are instantaneous and endpoint should be updated instantly */
47
+ putProvisionedThroughputInferenceEndpointConfig(req: PutPtEndpointConfigRequest, options?: CallOptions): Promise<PutProvisionedThroughputInferenceEndpointConfigWaiter>;
44
48
  /** Updates the email and webhook notification settings for an endpoint. */
45
49
  updateInferenceEndpointNotifications(req: UpdateInferenceEndpointNotificationsRequest, options?: CallOptions): Promise<UpdateInferenceEndpointNotificationsResponse>;
46
50
  /** Make external services call using the credentials stored in UC Connection. */
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/v1/client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAC,UAAU,EAAC,MA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C3D,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;CAsBpD;AAED,qBAAa,kDAAkD;IAE3D,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM;gBADJ,MAAM,EAAE,kBAAkB,EAClC,IAAI,EAAE,MAAM;IAGvB;;;;OAIG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAqCpE,iEAAiE;IAC3D,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;CAsBpD;AAED,qBAAa,gCAAgC;IAEzC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM;gBADJ,MAAM,EAAE,kBAAkB,EAClC,IAAI,EAAE,MAAM;IAGvB;;;;OAIG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAqCpE,iEAAiE;IAC3D,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;CAsBpD;AAED,qBAAa,qDAAqD;IAE9D,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM;gBADJ,MAAM,EAAE,kBAAkB,EAClC,IAAI,EAAE,MAAM;IAGvB;;;;OAIG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAqCpE,iEAAiE;IAC3D,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;CAsBpD"}
package/dist/v1/client.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { VERSION as AUTH_VERSION } from '@databricks/sdk-auth';
3
3
  import { createDefault } from '@databricks/sdk-core/clientinfo';
4
4
  import { NoOpLogger } from '@databricks/sdk-core/logger';
5
- import { newHttpClient } from './transport';
5
+ import { resolveClientConfig } from './transport';
6
6
  import { buildHttpRequest, executeCall, executeHttpCall, sendAndCheckError, marshalRequest, parseResponse, executeWait, StillRunningError, } from './utils';
7
7
  import pkgJson from '../../package.json' with { type: 'json' };
8
8
  import { InferenceEndpointState_ConfigUpdateState, marshalCreateInferenceEndpointRequestSchema, marshalCreatePtEndpointRequestSchema, marshalExternalFunctionRequestSchema, marshalPatchInferenceEndpointTagsRequestSchema, marshalPutInferenceEndpointAiGatewayRequestSchema, marshalPutInferenceEndpointConfigRequestSchema, marshalPutInferenceEndpointRateLimitsRequestSchema, marshalPutPtEndpointConfigRequestSchema, marshalUpdateInferenceEndpointNotificationsRequestSchema, unmarshalDeleteInferenceEndpointResponseSchema, unmarshalGetServedModelBuildLogsResponseSchema, unmarshalGetServedModelLogsResponseSchema, unmarshalInferenceEndpointDetailedSchema, unmarshalListInferenceEndpointsResponseSchema, unmarshalPatchInferenceEndpointTagsResponseSchema, unmarshalPutInferenceEndpointAiGatewayResponseSchema, unmarshalPutInferenceEndpointRateLimitsResponseSchema, unmarshalUpdateInferenceEndpointNotificationsResponseSchema, } from './model';
@@ -12,46 +12,45 @@ const PACKAGE_SEGMENT = {
12
12
  value: pkgJson.version,
13
13
  };
14
14
  export class ModelServingClient {
15
- host;
16
- // Workspace ID used to route workspace-level calls on unified hosts (SPOG).
17
- // When set, workspace-level methods send X-Databricks-Org-Id on every
18
- // request.
19
- workspaceId;
20
- httpClient;
15
+ options;
21
16
  logger;
22
17
  // User-Agent header value. Composed once at construction from
23
18
  // createDefault() merged with this package's identity and the active
24
19
  // credential's name.
25
20
  userAgent;
21
+ // Memoized configuration. The profile is resolved once, lazily, on the first
22
+ // request, then reused; host, workspaceId/accountId, and credentials are
23
+ // filled from it when not set explicitly on the options.
24
+ config;
26
25
  constructor(options) {
27
- if (options.host === undefined) {
28
- throw new Error('Host is required.');
29
- }
30
- this.host = options.host.replace(/\/$/, '');
31
- this.workspaceId = options.workspaceId;
26
+ this.options = options;
32
27
  this.logger = options.logger ?? new NoOpLogger();
33
28
  const info = createDefault()
34
29
  .with(PACKAGE_SEGMENT)
35
30
  .with({ key: 'sdk-js-auth', value: AUTH_VERSION })
36
31
  .with({ key: 'auth', value: options.credentials?.name() ?? 'default' });
37
32
  this.userAgent = info.toString();
38
- this.httpClient = newHttpClient(options);
33
+ }
34
+ resolveConfig() {
35
+ this.config ??= resolveClientConfig(this.options);
36
+ return this.config;
39
37
  }
40
38
  /** Create a new serving endpoint. */
41
- async createInferenceEndpoint(req, options) {
42
- const url = `${this.host}/api/2.0/serving-endpoints`;
39
+ async createInferenceEndpointBase(req, options) {
40
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
41
+ const url = `${host}/api/2.0/serving-endpoints`;
43
42
  const body = marshalRequest(req, marshalCreateInferenceEndpointRequestSchema);
44
43
  let resp;
45
44
  const call = async (callSignal) => {
46
45
  const headers = new Headers({ 'Content-Type': 'application/json' });
47
- if (this.workspaceId !== undefined) {
48
- headers.set('X-Databricks-Org-Id', this.workspaceId);
46
+ if (workspaceId !== undefined) {
47
+ headers.set('X-Databricks-Org-Id', workspaceId);
49
48
  }
50
49
  headers.set('User-Agent', this.userAgent);
51
50
  const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
52
51
  const respBody = await executeHttpCall({
53
52
  request: httpReq,
54
- httpClient: this.httpClient,
53
+ httpClient,
55
54
  logger: this.logger,
56
55
  });
57
56
  resp = parseResponse(respBody, unmarshalInferenceEndpointDetailedSchema);
@@ -62,28 +61,30 @@ export class ModelServingClient {
62
61
  }
63
62
  return resp;
64
63
  }
65
- async createInferenceEndpointWaiter(req, options) {
66
- await this.createInferenceEndpoint(req, options);
64
+ /** Create a new serving endpoint. */
65
+ async createInferenceEndpoint(req, options) {
66
+ await this.createInferenceEndpointBase(req, options);
67
67
  if (req.name === undefined) {
68
68
  throw new Error('request field name required for polling is missing');
69
69
  }
70
70
  return new CreateInferenceEndpointWaiter(this, req.name);
71
71
  }
72
72
  /** Create a new PT serving endpoint. */
73
- async createProvisionedThroughputInferenceEndpoint(req, options) {
74
- const url = `${this.host}/api/2.0/serving-endpoints/pt`;
73
+ async createProvisionedThroughputInferenceEndpointBase(req, options) {
74
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
75
+ const url = `${host}/api/2.0/serving-endpoints/pt`;
75
76
  const body = marshalRequest(req, marshalCreatePtEndpointRequestSchema);
76
77
  let resp;
77
78
  const call = async (callSignal) => {
78
79
  const headers = new Headers({ 'Content-Type': 'application/json' });
79
- if (this.workspaceId !== undefined) {
80
- headers.set('X-Databricks-Org-Id', this.workspaceId);
80
+ if (workspaceId !== undefined) {
81
+ headers.set('X-Databricks-Org-Id', workspaceId);
81
82
  }
82
83
  headers.set('User-Agent', this.userAgent);
83
84
  const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
84
85
  const respBody = await executeHttpCall({
85
86
  request: httpReq,
86
- httpClient: this.httpClient,
87
+ httpClient,
87
88
  logger: this.logger,
88
89
  });
89
90
  resp = parseResponse(respBody, unmarshalInferenceEndpointDetailedSchema);
@@ -94,8 +95,9 @@ export class ModelServingClient {
94
95
  }
95
96
  return resp;
96
97
  }
97
- async createProvisionedThroughputInferenceEndpointWaiter(req, options) {
98
- await this.createProvisionedThroughputInferenceEndpoint(req, options);
98
+ /** Create a new PT serving endpoint. */
99
+ async createProvisionedThroughputInferenceEndpoint(req, options) {
100
+ await this.createProvisionedThroughputInferenceEndpointBase(req, options);
99
101
  if (req.name === undefined) {
100
102
  throw new Error('request field name required for polling is missing');
101
103
  }
@@ -103,18 +105,19 @@ export class ModelServingClient {
103
105
  }
104
106
  /** Delete a serving endpoint. */
105
107
  async deleteInferenceEndpoint(req, options) {
106
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}`;
108
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
109
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}`;
107
110
  let resp;
108
111
  const call = async (callSignal) => {
109
112
  const headers = new Headers();
110
- if (this.workspaceId !== undefined) {
111
- headers.set('X-Databricks-Org-Id', this.workspaceId);
113
+ if (workspaceId !== undefined) {
114
+ headers.set('X-Databricks-Org-Id', workspaceId);
112
115
  }
113
116
  headers.set('User-Agent', this.userAgent);
114
117
  const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
115
118
  const respBody = await executeHttpCall({
116
119
  request: httpReq,
117
- httpClient: this.httpClient,
120
+ httpClient,
118
121
  logger: this.logger,
119
122
  });
120
123
  resp = parseResponse(respBody, unmarshalDeleteInferenceEndpointResponseSchema);
@@ -127,18 +130,19 @@ export class ModelServingClient {
127
130
  }
128
131
  /** Retrieves the metrics associated with the provided serving endpoint in either Prometheus or OpenMetrics exposition format. */
129
132
  async getExportEndpointMetrics(req, options) {
130
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}/metrics`;
133
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
134
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}/metrics`;
131
135
  let resp;
132
136
  const call = async (callSignal) => {
133
137
  const headers = new Headers();
134
- if (this.workspaceId !== undefined) {
135
- headers.set('X-Databricks-Org-Id', this.workspaceId);
138
+ if (workspaceId !== undefined) {
139
+ headers.set('X-Databricks-Org-Id', workspaceId);
136
140
  }
137
141
  headers.set('User-Agent', this.userAgent);
138
142
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
139
143
  const httpResp = await sendAndCheckError({
140
144
  request: httpReq,
141
- httpClient: this.httpClient,
145
+ httpClient,
142
146
  logger: this.logger,
143
147
  });
144
148
  resp = {
@@ -153,18 +157,19 @@ export class ModelServingClient {
153
157
  }
154
158
  /** Retrieves the details for a single serving endpoint. */
155
159
  async getInferenceEndpoint(req, options) {
156
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}`;
160
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
161
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}`;
157
162
  let resp;
158
163
  const call = async (callSignal) => {
159
164
  const headers = new Headers();
160
- if (this.workspaceId !== undefined) {
161
- headers.set('X-Databricks-Org-Id', this.workspaceId);
165
+ if (workspaceId !== undefined) {
166
+ headers.set('X-Databricks-Org-Id', workspaceId);
162
167
  }
163
168
  headers.set('User-Agent', this.userAgent);
164
169
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
165
170
  const respBody = await executeHttpCall({
166
171
  request: httpReq,
167
- httpClient: this.httpClient,
172
+ httpClient,
168
173
  logger: this.logger,
169
174
  });
170
175
  resp = parseResponse(respBody, unmarshalInferenceEndpointDetailedSchema);
@@ -177,18 +182,19 @@ export class ModelServingClient {
177
182
  }
178
183
  /** Get the query schema of the serving endpoint in OpenAPI format. The schema contains information for the supported paths, input and output format and datatypes. */
179
184
  async getInferenceEndpointSchema(req, options) {
180
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}/openapi`;
185
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
186
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}/openapi`;
181
187
  let resp;
182
188
  const call = async (callSignal) => {
183
189
  const headers = new Headers();
184
- if (this.workspaceId !== undefined) {
185
- headers.set('X-Databricks-Org-Id', this.workspaceId);
190
+ if (workspaceId !== undefined) {
191
+ headers.set('X-Databricks-Org-Id', workspaceId);
186
192
  }
187
193
  headers.set('User-Agent', this.userAgent);
188
194
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
189
195
  const httpResp = await sendAndCheckError({
190
196
  request: httpReq,
191
- httpClient: this.httpClient,
197
+ httpClient,
192
198
  logger: this.logger,
193
199
  });
194
200
  resp = {
@@ -203,18 +209,19 @@ export class ModelServingClient {
203
209
  }
204
210
  /** Retrieves the build logs associated with the provided served model. */
205
211
  async getServedModelBuildLogs(req, options) {
206
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}/served-models/${req.servedModelName ?? ''}/build-logs`;
212
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
213
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}/served-models/${req.servedModelName ?? ''}/build-logs`;
207
214
  let resp;
208
215
  const call = async (callSignal) => {
209
216
  const headers = new Headers();
210
- if (this.workspaceId !== undefined) {
211
- headers.set('X-Databricks-Org-Id', this.workspaceId);
217
+ if (workspaceId !== undefined) {
218
+ headers.set('X-Databricks-Org-Id', workspaceId);
212
219
  }
213
220
  headers.set('User-Agent', this.userAgent);
214
221
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
215
222
  const respBody = await executeHttpCall({
216
223
  request: httpReq,
217
- httpClient: this.httpClient,
224
+ httpClient,
218
225
  logger: this.logger,
219
226
  });
220
227
  resp = parseResponse(respBody, unmarshalGetServedModelBuildLogsResponseSchema);
@@ -227,18 +234,19 @@ export class ModelServingClient {
227
234
  }
228
235
  /** Retrieves the service logs associated with the provided served model. */
229
236
  async getServedModelLogs(req, options) {
230
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}/served-models/${req.servedModelName ?? ''}/logs`;
237
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
238
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}/served-models/${req.servedModelName ?? ''}/logs`;
231
239
  let resp;
232
240
  const call = async (callSignal) => {
233
241
  const headers = new Headers();
234
- if (this.workspaceId !== undefined) {
235
- headers.set('X-Databricks-Org-Id', this.workspaceId);
242
+ if (workspaceId !== undefined) {
243
+ headers.set('X-Databricks-Org-Id', workspaceId);
236
244
  }
237
245
  headers.set('User-Agent', this.userAgent);
238
246
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
239
247
  const respBody = await executeHttpCall({
240
248
  request: httpReq,
241
- httpClient: this.httpClient,
249
+ httpClient,
242
250
  logger: this.logger,
243
251
  });
244
252
  resp = parseResponse(respBody, unmarshalGetServedModelLogsResponseSchema);
@@ -251,18 +259,19 @@ export class ModelServingClient {
251
259
  }
252
260
  /** Get all serving endpoints. */
253
261
  async listInferenceEndpoints(_req, options) {
254
- const url = `${this.host}/api/2.0/serving-endpoints`;
262
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
263
+ const url = `${host}/api/2.0/serving-endpoints`;
255
264
  let resp;
256
265
  const call = async (callSignal) => {
257
266
  const headers = new Headers();
258
- if (this.workspaceId !== undefined) {
259
- headers.set('X-Databricks-Org-Id', this.workspaceId);
267
+ if (workspaceId !== undefined) {
268
+ headers.set('X-Databricks-Org-Id', workspaceId);
260
269
  }
261
270
  headers.set('User-Agent', this.userAgent);
262
271
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
263
272
  const respBody = await executeHttpCall({
264
273
  request: httpReq,
265
- httpClient: this.httpClient,
274
+ httpClient,
266
275
  logger: this.logger,
267
276
  });
268
277
  resp = parseResponse(respBody, unmarshalListInferenceEndpointsResponseSchema);
@@ -275,19 +284,20 @@ export class ModelServingClient {
275
284
  }
276
285
  /** Used to batch add and delete tags from a serving endpoint with a single API call. */
277
286
  async patchInferenceEndpointTags(req, options) {
278
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}/tags`;
287
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
288
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}/tags`;
279
289
  const body = marshalRequest(req, marshalPatchInferenceEndpointTagsRequestSchema);
280
290
  let resp;
281
291
  const call = async (callSignal) => {
282
292
  const headers = new Headers({ 'Content-Type': 'application/json' });
283
- if (this.workspaceId !== undefined) {
284
- headers.set('X-Databricks-Org-Id', this.workspaceId);
293
+ if (workspaceId !== undefined) {
294
+ headers.set('X-Databricks-Org-Id', workspaceId);
285
295
  }
286
296
  headers.set('User-Agent', this.userAgent);
287
297
  const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);
288
298
  const respBody = await executeHttpCall({
289
299
  request: httpReq,
290
- httpClient: this.httpClient,
300
+ httpClient,
291
301
  logger: this.logger,
292
302
  });
293
303
  resp = parseResponse(respBody, unmarshalPatchInferenceEndpointTagsResponseSchema);
@@ -300,19 +310,20 @@ export class ModelServingClient {
300
310
  }
301
311
  /** Used to update the AI Gateway of a serving endpoint. NOTE: External model, provisioned throughput, and pay-per-token endpoints are fully supported; agent endpoints currently only support inference tables. */
302
312
  async putInferenceEndpointAiGateway(req, options) {
303
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}/ai-gateway`;
313
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
314
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}/ai-gateway`;
304
315
  const body = marshalRequest(req, marshalPutInferenceEndpointAiGatewayRequestSchema);
305
316
  let resp;
306
317
  const call = async (callSignal) => {
307
318
  const headers = new Headers({ 'Content-Type': 'application/json' });
308
- if (this.workspaceId !== undefined) {
309
- headers.set('X-Databricks-Org-Id', this.workspaceId);
319
+ if (workspaceId !== undefined) {
320
+ headers.set('X-Databricks-Org-Id', workspaceId);
310
321
  }
311
322
  headers.set('User-Agent', this.userAgent);
312
323
  const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
313
324
  const respBody = await executeHttpCall({
314
325
  request: httpReq,
315
- httpClient: this.httpClient,
326
+ httpClient,
316
327
  logger: this.logger,
317
328
  });
318
329
  resp = parseResponse(respBody, unmarshalPutInferenceEndpointAiGatewayResponseSchema);
@@ -324,20 +335,21 @@ export class ModelServingClient {
324
335
  return resp;
325
336
  }
326
337
  /** Updates any combination of the serving endpoint's served entities, the compute configuration of those served entities, and the endpoint's traffic config. An endpoint that already has an update in progress can not be updated until the current update completes or fails. */
327
- async putInferenceEndpointConfig(req, options) {
328
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}/config`;
338
+ async putInferenceEndpointConfigBase(req, options) {
339
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
340
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}/config`;
329
341
  const body = marshalRequest(req, marshalPutInferenceEndpointConfigRequestSchema);
330
342
  let resp;
331
343
  const call = async (callSignal) => {
332
344
  const headers = new Headers({ 'Content-Type': 'application/json' });
333
- if (this.workspaceId !== undefined) {
334
- headers.set('X-Databricks-Org-Id', this.workspaceId);
345
+ if (workspaceId !== undefined) {
346
+ headers.set('X-Databricks-Org-Id', workspaceId);
335
347
  }
336
348
  headers.set('User-Agent', this.userAgent);
337
349
  const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
338
350
  const respBody = await executeHttpCall({
339
351
  request: httpReq,
340
- httpClient: this.httpClient,
352
+ httpClient,
341
353
  logger: this.logger,
342
354
  });
343
355
  resp = parseResponse(respBody, unmarshalInferenceEndpointDetailedSchema);
@@ -348,8 +360,9 @@ export class ModelServingClient {
348
360
  }
349
361
  return resp;
350
362
  }
351
- async putInferenceEndpointConfigWaiter(req, options) {
352
- await this.putInferenceEndpointConfig(req, options);
363
+ /** Updates any combination of the serving endpoint's served entities, the compute configuration of those served entities, and the endpoint's traffic config. An endpoint that already has an update in progress can not be updated until the current update completes or fails. */
364
+ async putInferenceEndpointConfig(req, options) {
365
+ await this.putInferenceEndpointConfigBase(req, options);
353
366
  if (req.name === undefined) {
354
367
  throw new Error('request field name required for polling is missing');
355
368
  }
@@ -357,19 +370,20 @@ export class ModelServingClient {
357
370
  }
358
371
  /** Deprecated: Please use AI Gateway to manage rate limits instead. */
359
372
  async putInferenceEndpointRateLimits(req, options) {
360
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}/rate-limits`;
373
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
374
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}/rate-limits`;
361
375
  const body = marshalRequest(req, marshalPutInferenceEndpointRateLimitsRequestSchema);
362
376
  let resp;
363
377
  const call = async (callSignal) => {
364
378
  const headers = new Headers({ 'Content-Type': 'application/json' });
365
- if (this.workspaceId !== undefined) {
366
- headers.set('X-Databricks-Org-Id', this.workspaceId);
379
+ if (workspaceId !== undefined) {
380
+ headers.set('X-Databricks-Org-Id', workspaceId);
367
381
  }
368
382
  headers.set('User-Agent', this.userAgent);
369
383
  const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
370
384
  const respBody = await executeHttpCall({
371
385
  request: httpReq,
372
- httpClient: this.httpClient,
386
+ httpClient,
373
387
  logger: this.logger,
374
388
  });
375
389
  resp = parseResponse(respBody, unmarshalPutInferenceEndpointRateLimitsResponseSchema);
@@ -381,20 +395,21 @@ export class ModelServingClient {
381
395
  return resp;
382
396
  }
383
397
  /** Updates any combination of the pt endpoint's served entities, the compute configuration of those served entities, and the endpoint's traffic config. Updates are instantaneous and endpoint should be updated instantly */
384
- async putProvisionedThroughputInferenceEndpointConfig(req, options) {
385
- const url = `${this.host}/api/2.0/serving-endpoints/pt/${req.name ?? ''}/config`;
398
+ async putProvisionedThroughputInferenceEndpointConfigBase(req, options) {
399
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
400
+ const url = `${host}/api/2.0/serving-endpoints/pt/${req.name ?? ''}/config`;
386
401
  const body = marshalRequest(req, marshalPutPtEndpointConfigRequestSchema);
387
402
  let resp;
388
403
  const call = async (callSignal) => {
389
404
  const headers = new Headers({ 'Content-Type': 'application/json' });
390
- if (this.workspaceId !== undefined) {
391
- headers.set('X-Databricks-Org-Id', this.workspaceId);
405
+ if (workspaceId !== undefined) {
406
+ headers.set('X-Databricks-Org-Id', workspaceId);
392
407
  }
393
408
  headers.set('User-Agent', this.userAgent);
394
409
  const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
395
410
  const respBody = await executeHttpCall({
396
411
  request: httpReq,
397
- httpClient: this.httpClient,
412
+ httpClient,
398
413
  logger: this.logger,
399
414
  });
400
415
  resp = parseResponse(respBody, unmarshalInferenceEndpointDetailedSchema);
@@ -405,8 +420,9 @@ export class ModelServingClient {
405
420
  }
406
421
  return resp;
407
422
  }
408
- async putProvisionedThroughputInferenceEndpointConfigWaiter(req, options) {
409
- await this.putProvisionedThroughputInferenceEndpointConfig(req, options);
423
+ /** Updates any combination of the pt endpoint's served entities, the compute configuration of those served entities, and the endpoint's traffic config. Updates are instantaneous and endpoint should be updated instantly */
424
+ async putProvisionedThroughputInferenceEndpointConfig(req, options) {
425
+ await this.putProvisionedThroughputInferenceEndpointConfigBase(req, options);
410
426
  if (req.name === undefined) {
411
427
  throw new Error('request field name required for polling is missing');
412
428
  }
@@ -414,19 +430,20 @@ export class ModelServingClient {
414
430
  }
415
431
  /** Updates the email and webhook notification settings for an endpoint. */
416
432
  async updateInferenceEndpointNotifications(req, options) {
417
- const url = `${this.host}/api/2.0/serving-endpoints/${req.name ?? ''}/notifications`;
433
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
434
+ const url = `${host}/api/2.0/serving-endpoints/${req.name ?? ''}/notifications`;
418
435
  const body = marshalRequest(req, marshalUpdateInferenceEndpointNotificationsRequestSchema);
419
436
  let resp;
420
437
  const call = async (callSignal) => {
421
438
  const headers = new Headers({ 'Content-Type': 'application/json' });
422
- if (this.workspaceId !== undefined) {
423
- headers.set('X-Databricks-Org-Id', this.workspaceId);
439
+ if (workspaceId !== undefined) {
440
+ headers.set('X-Databricks-Org-Id', workspaceId);
424
441
  }
425
442
  headers.set('User-Agent', this.userAgent);
426
443
  const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);
427
444
  const respBody = await executeHttpCall({
428
445
  request: httpReq,
429
- httpClient: this.httpClient,
446
+ httpClient,
430
447
  logger: this.logger,
431
448
  });
432
449
  resp = parseResponse(respBody, unmarshalUpdateInferenceEndpointNotificationsResponseSchema);
@@ -439,19 +456,20 @@ export class ModelServingClient {
439
456
  }
440
457
  /** Make external services call using the credentials stored in UC Connection. */
441
458
  async httpRequest(req, options) {
442
- const url = `${this.host}/api/2.0/external-function`;
459
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
460
+ const url = `${host}/api/2.0/external-function`;
443
461
  const body = marshalRequest(req, marshalExternalFunctionRequestSchema);
444
462
  let resp;
445
463
  const call = async (callSignal) => {
446
464
  const headers = new Headers({ 'Content-Type': 'application/json' });
447
- if (this.workspaceId !== undefined) {
448
- headers.set('X-Databricks-Org-Id', this.workspaceId);
465
+ if (workspaceId !== undefined) {
466
+ headers.set('X-Databricks-Org-Id', workspaceId);
449
467
  }
450
468
  headers.set('User-Agent', this.userAgent);
451
469
  const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
452
470
  const httpResp = await sendAndCheckError({
453
471
  request: httpReq,
454
- httpClient: this.httpClient,
472
+ httpClient,
455
473
  logger: this.logger,
456
474
  });
457
475
  resp = {