@soat/sdk 0.17.4 → 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.mjs
CHANGED
|
@@ -886,7 +886,7 @@ var AiProviders = class {
|
|
|
886
886
|
*
|
|
887
887
|
* Deletes an AI provider configuration.
|
|
888
888
|
*
|
|
889
|
-
* Live references — chats, agents, and
|
|
889
|
+
* 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.
|
|
890
890
|
*
|
|
891
891
|
*/
|
|
892
892
|
static deleteAiProvider(options) {
|
|
@@ -2376,6 +2376,71 @@ var MemoryEntries = class {
|
|
|
2376
2376
|
});
|
|
2377
2377
|
}
|
|
2378
2378
|
};
|
|
2379
|
+
var ModelRoutes = class {
|
|
2380
|
+
/**
|
|
2381
|
+
* List model routes
|
|
2382
|
+
*
|
|
2383
|
+
* Returns the model routes defined in a project
|
|
2384
|
+
*/
|
|
2385
|
+
static listModelRoutes(options) {
|
|
2386
|
+
return (options?.client ?? client).get({
|
|
2387
|
+
url: "/api/v1/model-routes",
|
|
2388
|
+
...options
|
|
2389
|
+
});
|
|
2390
|
+
}
|
|
2391
|
+
/**
|
|
2392
|
+
* Create a model route
|
|
2393
|
+
*
|
|
2394
|
+
* 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.
|
|
2395
|
+
*/
|
|
2396
|
+
static createModelRoute(options) {
|
|
2397
|
+
return (options.client ?? client).post({
|
|
2398
|
+
url: "/api/v1/model-routes",
|
|
2399
|
+
...options,
|
|
2400
|
+
headers: {
|
|
2401
|
+
"Content-Type": "application/json",
|
|
2402
|
+
...options.headers
|
|
2403
|
+
}
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2406
|
+
/**
|
|
2407
|
+
* Delete a model route
|
|
2408
|
+
*
|
|
2409
|
+
* 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.
|
|
2410
|
+
*/
|
|
2411
|
+
static deleteModelRoute(options) {
|
|
2412
|
+
return (options.client ?? client).delete({
|
|
2413
|
+
url: "/api/v1/model-routes/{route_id}",
|
|
2414
|
+
...options
|
|
2415
|
+
});
|
|
2416
|
+
}
|
|
2417
|
+
/**
|
|
2418
|
+
* Get a model route
|
|
2419
|
+
*
|
|
2420
|
+
* Returns a specific model route
|
|
2421
|
+
*/
|
|
2422
|
+
static getModelRoute(options) {
|
|
2423
|
+
return (options.client ?? client).get({
|
|
2424
|
+
url: "/api/v1/model-routes/{route_id}",
|
|
2425
|
+
...options
|
|
2426
|
+
});
|
|
2427
|
+
}
|
|
2428
|
+
/**
|
|
2429
|
+
* Update a model route
|
|
2430
|
+
*
|
|
2431
|
+
* Updates a model route's name, targets, retry classes, or breaker configuration. Omitted fields are left unchanged.
|
|
2432
|
+
*/
|
|
2433
|
+
static updateModelRoute(options) {
|
|
2434
|
+
return (options.client ?? client).put({
|
|
2435
|
+
url: "/api/v1/model-routes/{route_id}",
|
|
2436
|
+
...options,
|
|
2437
|
+
headers: {
|
|
2438
|
+
"Content-Type": "application/json",
|
|
2439
|
+
...options.headers
|
|
2440
|
+
}
|
|
2441
|
+
});
|
|
2442
|
+
}
|
|
2443
|
+
};
|
|
2379
2444
|
var Orchestrations = class {
|
|
2380
2445
|
/**
|
|
2381
2446
|
* List orchestrations
|
|
@@ -2671,7 +2736,7 @@ var Projects = class {
|
|
|
2671
2736
|
/**
|
|
2672
2737
|
* Update a project
|
|
2673
2738
|
*
|
|
2674
|
-
* 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.
|
|
2739
|
+
* 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.
|
|
2675
2740
|
*/
|
|
2676
2741
|
static updateProject(options) {
|
|
2677
2742
|
return (options.client ?? client).patch({
|
|
@@ -3820,4 +3885,4 @@ var SoatClient = class {
|
|
|
3820
3885
|
}
|
|
3821
3886
|
};
|
|
3822
3887
|
//#endregion
|
|
3823
|
-
export { Activity, Actors, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chats, Conversations, Discussions, Documents, Embeddings, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryEntries, Orchestrations, Policies, Projects, Quotas, Secrets, Sessions, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
|
|
3888
|
+
export { Activity, Actors, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chats, Conversations, Discussions, Documents, Embeddings, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryEntries, ModelRoutes, Orchestrations, Policies, Projects, Quotas, Secrets, Sessions, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
|