Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10785,7 +10785,7 @@ components:
- MAX
AiGatewayNullableRoutingRuleTierOrdering:
description: >-
How a tier orders its targets. Omission preserves the saved same-position tier on update; null resets to configured. New tiers default to configured. The weighted_affinity ordering distributes first-choice assignments by relative target weights and accepts only model targets with an explicit provider, without repeated provider and model pairs in the same tier. The `classified` ordering is allowed only in the first tier and requires a classifier, destination rubrics, and one default destination.
How a tier orders its targets. Omission preserves the saved same-position tier on update; null resets to configured. New tiers default to configured. The weighted_affinity ordering distributes first-choice assignments by relative target weights and accepts only model targets with an explicit provider, without repeated provider and model pairs in the same tier. The `classified` ordering is allowed only in the first tier and requires a classifier, destination rubrics, and one default destination. Its targets are model targets that each name one provider, not "*". Besides the default, it needs 1 to 9 destinations, each with a different rubric. Classified routing is in Preview: saving a classified tier returns 403 Forbidden unless the feature is enabled for the organization.
enum:
- configured
- weighted_affinity
Expand Down Expand Up @@ -11734,7 +11734,8 @@ components:
example: gpt-6-luna
type: string
provider:
description: Decision-model provider slug. Omit together with model to preserve the saved selection.
description: >-
Decision-model provider slug. It must name a provider of type `openai`, `baseten`, or `typesafe`, the provider types that serve a decision model. Omit together with model to preserve the saved selection.
example: openai
type: string
type: object
Expand Down Expand Up @@ -11986,13 +11987,14 @@ components:
minimum: 1
type: integer
provider:
description: Provider slug. weighted_affinity requires an explicit provider and does not allow "*".
description: Provider slug. weighted_affinity and classified tiers require an explicit provider and do not allow "*".
example: prod-us
type: string
reasoning_level:
$ref: "#/components/schemas/AiGatewayRoutingReasoningLevel"
rubric:
description: Destination rubric in a classified tier. Omission preserves a saved value; null clears it. Must be absent on the default destination.
description: >-
Destination rubric in a classified tier: when the decision model picks this destination. Up to 300 characters after leading and trailing spaces are trimmed, and different for each destination in the tier. Omission preserves a saved value; null clears it. Must be absent on the default destination.
example: Short factual questions.
maxLength: 300
nullable: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class AiGatewayNullableRoutingRuleTierOrdering(ModelSimple):
"""
How a tier orders its targets. Omission preserves the saved same-position tier on update; null resets to configured. New tiers default to configured. The weighted_affinity ordering distributes first-choice assignments by relative target weights and accepts only model targets with an explicit provider, without repeated provider and model pairs in the same tier. The `classified` ordering is allowed only in the first tier and requires a classifier, destination rubrics, and one default destination.
How a tier orders its targets. Omission preserves the saved same-position tier on update; null resets to configured. New tiers default to configured. The weighted_affinity ordering distributes first-choice assignments by relative target weights and accepts only model targets with an explicit provider, without repeated provider and model pairs in the same tier. The `classified` ordering is allowed only in the first tier and requires a classifier, destination rubrics, and one default destination. Its targets are model targets that each name one provider, not "*". Besides the default, it needs 1 to 9 destinations, each with a different rubric. Classified routing is in Preview: saving a classified tier returns 403 Forbidden unless the feature is enabled for the organization.

:param value: Must be one of ["configured", "weighted_affinity", "classified"].
:type value: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(
:param model: Decision model on the provider. Omit together with provider to preserve the saved selection.
:type model: str, optional

:param provider: Decision-model provider slug. Omit together with model to preserve the saved selection.
:param provider: Decision-model provider slug. It must name a provider of type ``openai`` , ``baseten`` , or ``typesafe`` , the provider types that serve a decision model. Omit together with model to preserve the saved selection.
:type provider: str, optional
"""
if confidence_threshold is not unset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ def __init__(
:param model_id: Opaque model catalog ID for a concrete model target. New selections require provider View; saved selections can be retained without metadata.
:type model_id: int, optional

:param provider: Provider slug. weighted_affinity requires an explicit provider and does not allow "*".
:param provider: Provider slug. weighted_affinity and classified tiers require an explicit provider and do not allow "*".
:type provider: str, optional

:param reasoning_level: Optional reasoning effort preference for this model destination. Must be supported by the selected model and provider. For provider "*", every eligible provider must support the level. An explicit value overrides the request's reasoning setting, subject to model-group policy. Omitted or null preserves request and provider behavior; none is an explicit level, not the default. On update, omission preserves a saved target override; null explicitly clears it. Routing-rule references cannot set this field; each referenced model destination owns its override. If an override cannot be applied at runtime, the gateway keeps the destination and restores the caller's original reasoning settings, or preserves the provider default when omitted. It rechecks all applicable route and model-group policies against those settings before sending. Model-group max_reasoning_level enforces hard limits; the override is not an additional cap. Normal fallback applies if governance denies the resulting request or the destination cannot otherwise serve it. Metrics and span tags record the override outcome and incompatibility reason. When response headers have not already been committed, ``X-Ai-Gateway-Reasoning-Override`` reports applied or not_applied for the returned attempt, and ``X-Ai-Gateway-Reasoning-Override-Reason`` reports the reason when not applied.
:type reasoning_level: AiGatewayRoutingReasoningLevel, none_type, optional

:param rubric: Destination rubric in a classified tier. Omission preserves a saved value; null clears it. Must be absent on the default destination.
:param rubric: Destination rubric in a classified tier: when the decision model picks this destination. Up to 300 characters after leading and trailing spaces are trimmed, and different for each destination in the tier. Omission preserves a saved value; null clears it. Must be absent on the default destination.
:type rubric: str, none_type, optional

:param slug: Organization-unique routing rule slug. New references require route View. Omit to retain a saved target by its parent-local ID. Allowed only in configured tiers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(
:param classifier: Decision model and settings for a classified tier. Omission preserves the saved classifier; null clears it. Newly selected models require provider View.
:type classifier: AiGatewayRoutingClassifierRequest, none_type, optional

:param ordering: How a tier orders its targets. Omission preserves the saved same-position tier on update; null resets to configured. New tiers default to configured. The weighted_affinity ordering distributes first-choice assignments by relative target weights and accepts only model targets with an explicit provider, without repeated provider and model pairs in the same tier. The ``classified`` ordering is allowed only in the first tier and requires a classifier, destination rubrics, and one default destination.
:param ordering: How a tier orders its targets. Omission preserves the saved same-position tier on update; null resets to configured. New tiers default to configured. The weighted_affinity ordering distributes first-choice assignments by relative target weights and accepts only model targets with an explicit provider, without repeated provider and model pairs in the same tier. The ``classified`` ordering is allowed only in the first tier and requires a classifier, destination rubrics, and one default destination. Its targets are model targets that each name one provider, not "*". Besides the default, it needs 1 to 9 destinations, each with a different rubric. Classified routing is in Preview: saving a classified tier returns 403 Forbidden unless the feature is enabled for the organization.
:type ordering: AiGatewayNullableRoutingRuleTierOrdering, none_type, optional

:param targets:
Expand Down
Loading