@soat/sdk 0.17.5 → 0.18.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/dist/index.cjs +68 -2
- package/dist/index.d.cts +423 -31
- package/dist/index.d.mts +423 -31
- package/dist/index.mjs +68 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -887,7 +887,7 @@ var AiProviders = class {
|
|
|
887
887
|
*
|
|
888
888
|
* Deletes an AI provider configuration.
|
|
889
889
|
*
|
|
890
|
-
* Live references — chats, agents, and
|
|
890
|
+
* Live references — chats, agents, discussions, and model routes whose targets name this provider — always block deletion with `409 AI_PROVIDER_HAS_DEPENDENTS`; `force` does not override them, so delete or repoint those resources first. Soft dependents — price overrides, usage/generation records, and discussion participants — also block with `409` unless `force=true`, which deletes the provider's price overrides and unlinks (nulls) its usage and participant history, preserving those rows. The `409` body's `error.meta` reports the counts, a sample of offending IDs, and a `forcible` flag that is `true` when a `force=true` retry would succeed.
|
|
891
891
|
*
|
|
892
892
|
*/
|
|
893
893
|
static deleteAiProvider(options) {
|
|
@@ -2377,6 +2377,71 @@ var MemoryEntries = class {
|
|
|
2377
2377
|
});
|
|
2378
2378
|
}
|
|
2379
2379
|
};
|
|
2380
|
+
var ModelRoutes = class {
|
|
2381
|
+
/**
|
|
2382
|
+
* List model routes
|
|
2383
|
+
*
|
|
2384
|
+
* Returns the model routes defined in a project
|
|
2385
|
+
*/
|
|
2386
|
+
static listModelRoutes(options) {
|
|
2387
|
+
return (options?.client ?? client).get({
|
|
2388
|
+
url: "/api/v1/model-routes",
|
|
2389
|
+
...options
|
|
2390
|
+
});
|
|
2391
|
+
}
|
|
2392
|
+
/**
|
|
2393
|
+
* Create a model route
|
|
2394
|
+
*
|
|
2395
|
+
* Creates a project-scoped model route: a named, ordered list of provider+model targets tried in array order. Every target must reference an AI provider in the same project (400 otherwise), and the total attempt budget — the sum of `1 + max_retries` over all targets — may not exceed 10 (400 naming the computed total). A duplicate `name` in the project is rejected with 409.
|
|
2396
|
+
*/
|
|
2397
|
+
static createModelRoute(options) {
|
|
2398
|
+
return (options.client ?? client).post({
|
|
2399
|
+
url: "/api/v1/model-routes",
|
|
2400
|
+
...options,
|
|
2401
|
+
headers: {
|
|
2402
|
+
"Content-Type": "application/json",
|
|
2403
|
+
...options.headers
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2406
|
+
}
|
|
2407
|
+
/**
|
|
2408
|
+
* Delete a model route
|
|
2409
|
+
*
|
|
2410
|
+
* Deletes a model route. Returns 409 when an agent still references it — a routed agent has no pinned provider to fall back on, so the reference must be repointed or the agent deleted first.
|
|
2411
|
+
*/
|
|
2412
|
+
static deleteModelRoute(options) {
|
|
2413
|
+
return (options.client ?? client).delete({
|
|
2414
|
+
url: "/api/v1/model-routes/{route_id}",
|
|
2415
|
+
...options
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2418
|
+
/**
|
|
2419
|
+
* Get a model route
|
|
2420
|
+
*
|
|
2421
|
+
* Returns a specific model route
|
|
2422
|
+
*/
|
|
2423
|
+
static getModelRoute(options) {
|
|
2424
|
+
return (options.client ?? client).get({
|
|
2425
|
+
url: "/api/v1/model-routes/{route_id}",
|
|
2426
|
+
...options
|
|
2427
|
+
});
|
|
2428
|
+
}
|
|
2429
|
+
/**
|
|
2430
|
+
* Update a model route
|
|
2431
|
+
*
|
|
2432
|
+
* Updates a model route's name, targets, retry classes, or breaker configuration. Omitted fields are left unchanged.
|
|
2433
|
+
*/
|
|
2434
|
+
static updateModelRoute(options) {
|
|
2435
|
+
return (options.client ?? client).put({
|
|
2436
|
+
url: "/api/v1/model-routes/{route_id}",
|
|
2437
|
+
...options,
|
|
2438
|
+
headers: {
|
|
2439
|
+
"Content-Type": "application/json",
|
|
2440
|
+
...options.headers
|
|
2441
|
+
}
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
};
|
|
2380
2445
|
var Orchestrations = class {
|
|
2381
2446
|
/**
|
|
2382
2447
|
* List orchestrations
|
|
@@ -2672,7 +2737,7 @@ var Projects = class {
|
|
|
2672
2737
|
/**
|
|
2673
2738
|
* Update a project
|
|
2674
2739
|
*
|
|
2675
|
-
* Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), and/or its read-auditing opt-in (`audit_reads_enabled`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
|
|
2740
|
+
* Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its inherited model route (`default_model_route_id`), and/or its read-auditing opt-in (`audit_reads_enabled`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
|
|
2676
2741
|
*/
|
|
2677
2742
|
static updateProject(options) {
|
|
2678
2743
|
return (options.client ?? client).patch({
|
|
@@ -3842,6 +3907,7 @@ exports.IngestionRules = IngestionRules;
|
|
|
3842
3907
|
exports.Knowledge = Knowledge;
|
|
3843
3908
|
exports.Memories = Memories;
|
|
3844
3909
|
exports.MemoryEntries = MemoryEntries;
|
|
3910
|
+
exports.ModelRoutes = ModelRoutes;
|
|
3845
3911
|
exports.Orchestrations = Orchestrations;
|
|
3846
3912
|
exports.Policies = Policies;
|
|
3847
3913
|
exports.Projects = Projects;
|