Hierarchy

  • AIGatewayApi

Constructors

Properties

Methods

bulkCreateAiGatewayModels createAiGatewayBudget createAiGatewayDataCaptureOverride createAiGatewayModel createAiGatewayModelGroup createAiGatewayProvider createAiGatewayRateLimit createAiGatewayRoutingRule deleteAIGatewayModelByCanonical deleteAIGatewayModelPricingByCanonical deleteAiGatewayBudget deleteAiGatewayDataCaptureOverride deleteAiGatewayModel deleteAiGatewayModelGroup deleteAiGatewayModelPricing deleteAiGatewayPolicy deleteAiGatewayProvider deleteAiGatewayRateLimit deleteAiGatewayRoutingRule getAIGatewayModelPricingByCanonical getAiGatewayBudget getAiGatewayBudgetCurrentPeriod getAiGatewayBudgetInstancesSummary getAiGatewayDataCaptureConfiguration getAiGatewayGovernance getAiGatewayModelGroup getAiGatewayModelPricing getAiGatewayPolicy getAiGatewayProvider getAiGatewayRateLimit getAiGatewayRateLimitInstancesSummary getAiGatewayRateLimitUsage getAiGatewayRoutingRule listAiGatewayBudgetInstanceDimensions listAiGatewayBudgetInstances listAiGatewayBudgets listAiGatewayModelGroups listAiGatewayModels listAiGatewayModelsByCanonical listAiGatewayPolicies listAiGatewayProviderModels listAiGatewayProviders listAiGatewayRateLimitInstances listAiGatewayRateLimitInstancesSummaries listAiGatewayRateLimits listAiGatewayRoutingRules overrideAiGatewayBudgetInstanceCapacity resetAiGatewayBudgetInstanceSpend updateAIGatewayModelByCanonical updateAIGatewayModelPricingByCanonical updateAiGatewayBudget updateAiGatewayDataCaptureOverride updateAiGatewayGovernance updateAiGatewayModel updateAiGatewayModelGroup updateAiGatewayModelPricing updateAiGatewayProvider updateAiGatewayRateLimit updateAiGatewayRoutingRule upsertAiGatewayPolicy

Constructors

Properties

configuration: Configuration
requestFactory: AIGatewayApiRequestFactory
responseProcessor: AIGatewayApiResponseProcessor

Methods

  • Create an organization-owned route with ai_gateway_config_write. New provider/model and route references require View. New routes use standard unrestricted defaults. To restrict configuration access, create the route and then apply a restriction policy using its numeric route_id. Sharing follows standard restriction-policy propagation and does not grant or revoke policy-authorized inference. Data capture overrides are managed independently. Each tier has an ordering, which defaults to configured. A weighted_affinity tier distributes first-choice assignments by relative target weights (1 to 10000, default 1) and accepts only distinct model targets with an explicit provider. Weights need not total 100. Configured tiers must omit weights or set them to null.

    Parameters

    Returns Promise<AiGatewayRoutingRuleResponse>

  • Delete an override using its revision and the current configuration_revision. If deleting the override can enable full capture for affected traffic, set confirm_full_capture to true. Returns HTTP 409 when configuration_revision or the override revision is stale, including a concurrent change during deletion. Missing revisions or required full-capture confirmation returns HTTP 400. Requires ai_gateway_config_write and View and Edit access to this override. Hidden overrides return HTTP 404; visible overrides without Edit return HTTP 403. Authorization failures return HTTP 503. If permission cleanup fails after the deletion is committed, the response is HTTP 500 with code deletion_permission_cleanup_failed, meta.configuration_deleted=true, and meta.permissions_cleanup_failed=true. Do not retry the deletion.

    Parameters

    Returns Promise<void>

  • Requires ai_gateway_config_write and provider View/Edit. Models and pricing inherit provider access. Every affected route and policy membership requires the corresponding Edit permission; force=true never bypasses authorization. Providers used by routing rules return provider_in_use with HTTP 409. Each JSON:API error item's meta contains blocked, restricted_dependencies, policies, rules_to_delete, and rules_to_update. Visible policy entries contain id, name, and editable; visible route entries contain id, slug, and editable. Hidden dependencies are omitted from every collection and reported only by restricted_dependencies. A blocked response changes no configuration; an authorized editor must first remove the blocking references. Retry with force=true to confirm an authorized cascade that removes provider targets and deletes rules left without targets. Surviving tiers keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or deleted.

    Parameters

    Returns Promise<void>

  • Delete a route with ai_gateway_config_write and route View/Edit. Every affected route and policy membership requires the corresponding Edit permission. The force=true parameter confirms impact and never bypasses authorization. A denied or unavailable check changes no configuration. Visible dependencies include editable; hidden dependencies are omitted and reported only by restricted_dependencies. A blocked response means an authorized editor must first remove blocking references. Each JSON:API error item's meta contains blocked, restricted_dependencies, policies, rules_to_delete, and rules_to_update. Visible policy entries contain id, name, and editable. Route deletion entries contain rule, reason, and editable; update entries contain rule, removed_tiers, and editable. Each rule contains route_id, slug, tiers, created_at, and updated_at with hidden nested selections redacted. The removed_tiers array identifies original tier numbers removed entirely by the cascade. Already-authorized in-flight operations may finish. Referenced rules require force=true. Surviving tiers keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or deleted. Restriction cleanup occurs only after confirmed deletion. Cleanup failure returns 500 with configuration_deleted=true and permissions_cleanup_failed=true; refresh instead of assuming the route still exists.

    Parameters

    Returns Promise<void>

  • List model groups the user can view. The organization-wide policy has id "default" and explicit model, provider, and route selections. Missing or empty selections grant no organization-wide access. Its audience is fixed to the organization; it cannot be renamed or deleted. Named policies retain their access bindings. Requires configuration read permission and policy View, including for the default policy. Hidden policies are omitted from lists and return the same not-found response as missing policies.

    Parameters

    Returns Promise<AiGatewayModelGroupListResponse>

  • Update a route with ai_gateway_config_write and route View/Edit. The slug is immutable; data capture is managed independently. Omitting tiers preserves the entire graph. When tiers are supplied, saved parent-local target IDs retain omitted destination and reasoning, weight, rubric, and default settings. Omitted ordering/classifier settings preserve the saved same-position tier. Explicit null resets nullable settings. New references require View on their resources. A hidden target omitted from tiers must be explicitly listed in removed_target_ids, otherwise the update fails without changes. expected_updated_at rejects stale updates with 409. Sharing-only saves do not replace target rows. Hidden and missing routes return the same 404; visible non-editors receive 403. Inference authorization is unchanged.

    Parameters

    Returns Promise<AiGatewayRoutingRuleResponse>

Generated using TypeDoc