Class: AIGatewayConfigsClient
Defined in: src/ai-gateway/configs-client.ts:26
Client for AI Gateway config operations (data plane).
Constructors
Constructor
new AIGatewayConfigsClient(opts): AIGatewayConfigsClient;
Defined in: src/ai-gateway/configs-client.ts:31
Parameters
| Parameter | Type |
|---|---|
opts | AIGatewaySubClientOptions |
Returns
AIGatewayConfigsClient
Methods
list()
list(opts): Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
success: ZodOptional<ZodBoolean>;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/configs-client.ts:55
List configs in a workspace.
Parameters
| Parameter | Type | Description |
|---|---|---|
opts | AIGatewayWorkspaceScopedListOptions | Must include the workspace UUID. |
Returns
Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
success: ZodOptional<ZodBoolean>;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>
Config list rows.
Remarks
List rows are a strict 12-field subset of the detail read — they do NOT carry config,
format, type, or version_id. Call get for those.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const cfgs = await gw.configs.list({ workspaceId: '16f7e90d-382a-4e78-b577-1b01eb5f8297' });
// cfgs.data[0] => { name: 'claude-code', slug: 'pc-claude-e46fe6', status: 'active', ... }
get()
get(configId): Promise<objectOutputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
} & {
config: ZodString;
format: ZodString;
type: ZodString;
version_id: ZodString;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodObject<{
config: ZodOptional<ZodObject<{
retry: ZodOptional<...>;
cache: ZodOptional<...>;
strategy: ZodOptional<...>;
targets: ZodOptional<...>;
provider: ZodOptional<...>;
virtual_key: ZodOptional<...>;
}, "strip", ZodType<GatewayJsonValue, ZodTypeDef, GatewayJsonValue>, {
retry?: ... | ...;
cache?: ... | ...;
strategy?: ... | ...;
targets?: ... | ...;
provider?: ... | ...;
virtual_key?: ... | ...;
}, {
retry?: ... | ...;
cache?: ... | ...;
strategy?: ... | ...;
targets?: ... | ...;
provider?: ... | ...;
virtual_key?: ... | ...;
}>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
config: ZodOptional<ZodObject<{
retry: ...;
cache: ...;
strategy: ...;
targets: ...;
provider: ...;
virtual_key: ...;
}, "strip", ZodType<..., ..., ...>, {
retry?: ...;
cache?: ...;
strategy?: ...;
targets?: ...;
provider?: ...;
virtual_key?: ...;
}, {
retry?: ...;
cache?: ...;
strategy?: ...;
targets?: ...;
provider?: ...;
virtual_key?: ...;
}>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
config: ZodOptional<ZodObject<{
retry: ...;
cache: ...;
strategy: ...;
targets: ...;
provider: ...;
virtual_key: ...;
}, "strip", ZodType<..., ..., ...>, {
retry?: ...;
cache?: ...;
strategy?: ...;
targets?: ...;
provider?: ...;
virtual_key?: ...;
}, {
retry?: ...;
cache?: ...;
strategy?: ...;
targets?: ...;
provider?: ...;
virtual_key?: ...;
}>>;
}, ZodTypeAny, "passthrough">>>;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/configs-client.ts:83
Fetch one config.
Parameters
| Parameter | Type | Description |
|---|---|---|
configId | string | Config UUID. |
Returns
Promise<objectOutputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
} & {
config: ZodString;
format: ZodString;
type: ZodString;
version_id: ZodString;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodObject<{
config: ZodOptional<ZodObject<{
retry: ZodOptional<...>;
cache: ZodOptional<...>;
strategy: ZodOptional<...>;
targets: ZodOptional<...>;
provider: ZodOptional<...>;
virtual_key: ZodOptional<...>;
}, "strip", ZodType<GatewayJsonValue, ZodTypeDef, GatewayJsonValue>, {
retry?: ... | ...;
cache?: ... | ...;
strategy?: ... | ...;
targets?: ... | ...;
provider?: ... | ...;
virtual_key?: ... | ...;
}, {
retry?: ... | ...;
cache?: ... | ...;
strategy?: ... | ...;
targets?: ... | ...;
provider?: ... | ...;
virtual_key?: ... | ...;
}>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
config: ZodOptional<ZodObject<{
retry: ...;
cache: ...;
strategy: ...;
targets: ...;
provider: ...;
virtual_key: ...;
}, "strip", ZodType<..., ..., ...>, {
retry?: ...;
cache?: ...;
strategy?: ...;
targets?: ...;
provider?: ...;
virtual_key?: ...;
}, {
retry?: ...;
cache?: ...;
strategy?: ...;
targets?: ...;
provider?: ...;
virtual_key?: ...;
}>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
config: ZodOptional<ZodObject<{
retry: ...;
cache: ...;
strategy: ...;
targets: ...;
provider: ...;
virtual_key: ...;
}, "strip", ZodType<..., ..., ...>, {
retry?: ...;
cache?: ...;
strategy?: ...;
targets?: ...;
provider?: ...;
virtual_key?: ...;
}, {
retry?: ...;
cache?: ...;
strategy?: ...;
targets?: ...;
provider?: ...;
virtual_key?: ...;
}>>;
}, ZodTypeAny, "passthrough">>>;
}, ZodTypeAny, "passthrough">>
The config detail — adds config (a JSON-encoded string, not an object),
format, type, and version_id on top of the list row.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const cfg = await gw.configs.get('764cf9cd-4ebf-449e-b669-08149b0fbbbc');
const routing = JSON.parse(cfg.config) as Record<string, unknown>;
// routing.provider => '@anthropic-prod'
listVersions()
listVersions(configId): Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
success: ZodOptional<ZodBoolean>;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
} & {
config: ZodString;
format: ZodString;
type: ZodString;
version_id: ZodString;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodObject<{
config: ZodOptional<...>;
}, "passthrough", ZodTypeAny, objectOutputType<{
config: ...;
}, ZodTypeAny, "passthrough">, objectInputType<{
config: ...;
}, ZodTypeAny, "passthrough">>>;
} & {
version_created_at: ZodString;
version_owner_id: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
} & {
config: ZodString;
format: ZodString;
type: ZodString;
version_id: ZodString;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodObject<{
config: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>;
} & {
version_created_at: ZodString;
version_owner_id: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
} & {
config: ZodString;
format: ZodString;
type: ZodString;
version_id: ZodString;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodObject<{
config: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>;
} & {
version_created_at: ZodString;
version_owner_id: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/configs-client.ts:107
List the immutable version history for one config. Verified live 2026-08-29.
Parameters
| Parameter | Type | Description |
|---|---|---|
configId | string | Config UUID. |
Returns
Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
success: ZodOptional<ZodBoolean>;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
} & {
config: ZodString;
format: ZodString;
type: ZodString;
version_id: ZodString;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodObject<{
config: ZodOptional<...>;
}, "passthrough", ZodTypeAny, objectOutputType<{
config: ...;
}, ZodTypeAny, "passthrough">, objectInputType<{
config: ...;
}, ZodTypeAny, "passthrough">>>;
} & {
version_created_at: ZodString;
version_owner_id: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
} & {
config: ZodString;
format: ZodString;
type: ZodString;
version_id: ZodString;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodObject<{
config: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>;
} & {
version_created_at: ZodString;
version_owner_id: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
} & {
config: ZodString;
format: ZodString;
type: ZodString;
version_id: ZodString;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodObject<{
config: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>;
} & {
version_created_at: ZodString;
version_owner_id: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>
Config versions, including version ownership and creation timestamps.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const versions = await gw.configs.listVersions('764cf9cd-4ebf-449e-b669-08149b0fbbbc');
console.log(versions.data[0].version_id);
create()
create(body): Promise<objectOutputType<{
id: ZodString;
version_id: ZodString;
slug: ZodString;
object: ZodString;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodObject<{
id: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>>;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/configs-client.ts:142
Create a config.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | { name: string; workspace_id: string; config: { retry?: { attempts?: number; on_status_codes?: number[]; }; cache?: { mode?: GatewayOpenValue<"semantic" | "simple">; max_age?: number; }; strategy?: { mode: GatewayOpenValue<"fallback" | "loadbalance" | "single">; }; targets?: { provider?: string; virtual_key?: string; }[]; provider?: string; virtual_key?: string; }; } | Name, workspace UUID, and the routing config object. |
body.name | string | - |
body.workspace_id | string | - |
body.config | { retry?: { attempts?: number; on_status_codes?: number[]; }; cache?: { mode?: GatewayOpenValue<"semantic" | "simple">; max_age?: number; }; strategy?: { mode: GatewayOpenValue<"fallback" | "loadbalance" | "single">; }; targets?: { provider?: string; virtual_key?: string; }[]; provider?: string; virtual_key?: string; } | - |
body.config.retry? | { attempts?: number; on_status_codes?: number[]; } | - |
body.config.retry.attempts? | number | - |
body.config.retry.on_status_codes? | number[] | - |
body.config.cache? | { mode?: GatewayOpenValue<"semantic" | "simple">; max_age?: number; } | - |
body.config.cache.mode? | GatewayOpenValue<"semantic" | "simple"> | - |
body.config.cache.max_age? | number | - |
body.config.strategy? | { mode: GatewayOpenValue<"fallback" | "loadbalance" | "single">; } | - |
body.config.strategy.mode | GatewayOpenValue<"fallback" | "loadbalance" | "single"> | - |
body.config.targets? | { provider?: string; virtual_key?: string; }[] | - |
body.config.provider? | string | - |
body.config.virtual_key? | string | - |
Returns
Promise<objectOutputType<{
id: ZodString;
version_id: ZodString;
slug: ZodString;
object: ZodString;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodObject<{
id: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>>;
}, ZodTypeAny, "passthrough">>
The creation receipt.
Remarks
The response is a creation receipt — { id, version_id, slug, object } — not a
GatewayConfigDetail. Call get for the full record. Verified live
2026-07-28.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const receipt = await gw.configs.create({
name: 'vertex-airs',
workspace_id: '16f7e90d-382a-4e78-b577-1b01eb5f8297',
config: { retry: { attempts: 3 }, cache: { mode: 'simple' } },
});
// receipt => { id: '...', version_id: '...', slug: 'pc-sdk-ve-14620d', object: 'config' }
update()
update(configId, body): Promise<objectOutputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodUnion<[ZodObject<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>, ZodString, ZodNumber]>>;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/configs-client.ts:173
Update a config.
Parameters
| Parameter | Type | Description |
|---|---|---|
configId | string | Config UUID. |
body | { [key: string]: any; } | One or more fields to update. A supplied config replaces the routing document. |
Returns
Promise<objectOutputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodUnion<[ZodObject<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>, ZodString, ZodNumber]>>;
}, ZodTypeAny, "passthrough">>
The raw update response. Shape unverified against a live tenant — see the PRD.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
await gw.configs.update('764cf9cd-4ebf-449e-b669-08149b0fbbbc', {
name: 'claude-code',
workspace_id: '16f7e90d-382a-4e78-b577-1b01eb5f8297',
config: { retry: { attempts: 5 } },
});
delete()
delete(configId): Promise<void>;
Defined in: src/ai-gateway/configs-client.ts:206
Delete a config.
Parameters
| Parameter | Type | Description |
|---|---|---|
configId | string | Config UUID. |
Returns
Promise<void>
Nothing.
Remarks
This is a hard delete — unlike deployments.delete
(which archives), the config disappears from list entirely. Verified live
2026-07-28. No organisation_id query param is required, unlike deployments/integrations.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
await gw.configs.delete('764cf9cd-4ebf-449e-b669-08149b0fbbbc');
// the config no longer appears in gw.configs.list()