pub struct RouteDecision {
pub decision_id: String,
pub model: String,
pub routed_from: String,
pub provider_id: Option<String>,
pub upstream_base: Option<String>,
pub credential: Option<ResolvedProvider>,
pub local: Option<bool>,
pub xlat: bool,
}Expand description
What the router decided for one request. Applied by the forward path:
model already swapped in the body by route_request; the caller
re-targets the upstream and injects the registry credential if set.
Fields§
§decision_id: StringFeedback correlation id unique to this routed request.
model: StringModel now in the body.
routed_from: StringOriginally requested model (usage record routed_from).
provider_id: Option<String>Registry/builtin provider id serving the request after routing
(usage attribution); None = upstream unchanged.
upstream_base: Option<String>Override for the upstream base URL; None = keep the handler’s.
credential: Option<ResolvedProvider>Registry entry whose api_key_env credential must be injected before
the request leaves (gateway-held keys, enterprise#7).
local: Option<bool>Target’s local-inference flag (shadow-rate billing): Some for
registry targets, None for built-ins (URL heuristic applies).
xlat: boolCross-shape route (enterprise#16, feature shape-xlat): the Anthropic
request body must be translated to OpenAI Chat Completions before it
leaves, and the response translated back. Always false within-shape.
Trait Implementations§
Source§impl Clone for RouteDecision
impl Clone for RouteDecision
Source§fn clone(&self) -> RouteDecision
fn clone(&self) -> RouteDecision
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RouteDecision
impl Debug for RouteDecision
Source§impl PartialEq for RouteDecision
impl PartialEq for RouteDecision
impl StructuralPartialEq for RouteDecision
Auto Trait Implementations§
impl Freeze for RouteDecision
impl RefUnwindSafe for RouteDecision
impl Send for RouteDecision
impl Sync for RouteDecision
impl Unpin for RouteDecision
impl UnsafeUnpin for RouteDecision
impl UnwindSafe for RouteDecision
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more