mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 18:37:46 +08:00
feat: wire specialized planner session affinity
This commit is contained in:
@@ -93,6 +93,7 @@ pub(super) async fn materialize_local_gemini_files_candidate_attempts(
|
||||
GEMINI_FILES_CLIENT_API_FORMAT,
|
||||
None,
|
||||
Some(&input.auth_snapshot),
|
||||
None,
|
||||
input.required_capabilities.as_ref(),
|
||||
None,
|
||||
None,
|
||||
@@ -163,6 +164,7 @@ pub(super) async fn build_local_gemini_files_candidate_attempt_source<'a>(
|
||||
GEMINI_FILES_CLIENT_API_FORMAT,
|
||||
None,
|
||||
Some(&input.auth_snapshot),
|
||||
None,
|
||||
input.required_capabilities.as_ref(),
|
||||
None,
|
||||
None,
|
||||
|
||||
@@ -23,6 +23,7 @@ use crate::ai_serving::{
|
||||
CandidateFailureDiagnostic, ExecutionRuntimeAuthContext, GatewayControlDecision,
|
||||
PlannerAppState,
|
||||
};
|
||||
use crate::client_session_affinity::client_session_affinity_from_parts;
|
||||
use crate::clock::current_unix_secs;
|
||||
use crate::{AppState, GatewayError};
|
||||
use aether_scheduler_core::SchedulerMinimalCandidateSelectionCandidate;
|
||||
@@ -69,6 +70,7 @@ pub(super) async fn resolve_local_openai_image_decision_input(
|
||||
|
||||
let mut input = build_local_requested_model_decision_input(resolved_input, requested_model);
|
||||
input.request_auth_channel = decision.request_auth_channel.clone();
|
||||
input.client_session_affinity = client_session_affinity_from_parts(parts, Some(body_json));
|
||||
Some(input)
|
||||
}
|
||||
|
||||
@@ -94,6 +96,7 @@ pub(super) async fn list_local_openai_image_candidate_attempts(
|
||||
false,
|
||||
input.required_capabilities.as_ref(),
|
||||
Some(&input.auth_snapshot),
|
||||
input.client_session_affinity.as_ref(),
|
||||
current_unix_secs(),
|
||||
)
|
||||
.await
|
||||
@@ -149,6 +152,7 @@ pub(super) async fn build_local_openai_image_candidate_attempt_source<'a>(
|
||||
false,
|
||||
input.required_capabilities.as_ref(),
|
||||
Some(&input.auth_snapshot),
|
||||
input.client_session_affinity.as_ref(),
|
||||
current_unix_secs(),
|
||||
)
|
||||
.await
|
||||
@@ -178,6 +182,7 @@ pub(super) async fn build_local_openai_image_candidate_attempt_source<'a>(
|
||||
api_format,
|
||||
Some(&input.requested_model),
|
||||
Some(&input.auth_snapshot),
|
||||
input.client_session_affinity.as_ref(),
|
||||
input.required_capabilities.as_ref(),
|
||||
sticky_session_token.as_deref(),
|
||||
input.request_auth_channel.as_deref(),
|
||||
@@ -242,6 +247,7 @@ async fn materialize_local_openai_image_candidate_attempts(
|
||||
api_format,
|
||||
Some(&input.requested_model),
|
||||
Some(&input.auth_snapshot),
|
||||
input.client_session_affinity.as_ref(),
|
||||
input.required_capabilities.as_ref(),
|
||||
sticky_session_token.as_deref(),
|
||||
input.request_auth_channel.as_deref(),
|
||||
|
||||
@@ -26,6 +26,7 @@ use crate::ai_serving::{
|
||||
CandidateFailureDiagnostic, ExecutionRuntimeAuthContext, GatewayControlDecision,
|
||||
PlannerAppState,
|
||||
};
|
||||
use crate::client_session_affinity::client_session_affinity_from_parts;
|
||||
use crate::clock::current_unix_secs;
|
||||
use crate::{AppState, GatewayError};
|
||||
|
||||
@@ -77,6 +78,7 @@ pub(super) async fn resolve_local_video_create_decision_input(
|
||||
|
||||
let mut input = build_local_requested_model_decision_input(resolved_input, requested_model);
|
||||
input.request_auth_channel = decision.request_auth_channel.clone();
|
||||
input.client_session_affinity = client_session_affinity_from_parts(parts, Some(body_json));
|
||||
Some(input)
|
||||
}
|
||||
|
||||
@@ -106,6 +108,7 @@ pub(super) async fn list_local_video_create_candidate_attempts(
|
||||
false,
|
||||
input.required_capabilities.as_ref(),
|
||||
Some(&input.auth_snapshot),
|
||||
input.client_session_affinity.as_ref(),
|
||||
current_unix_secs(),
|
||||
)
|
||||
.await
|
||||
@@ -161,6 +164,7 @@ pub(super) async fn build_local_video_create_candidate_attempt_source<'a>(
|
||||
false,
|
||||
input.required_capabilities.as_ref(),
|
||||
Some(&input.auth_snapshot),
|
||||
input.client_session_affinity.as_ref(),
|
||||
current_unix_secs(),
|
||||
)
|
||||
.await
|
||||
@@ -190,6 +194,7 @@ pub(super) async fn build_local_video_create_candidate_attempt_source<'a>(
|
||||
api_format,
|
||||
Some(&input.requested_model),
|
||||
Some(&input.auth_snapshot),
|
||||
input.client_session_affinity.as_ref(),
|
||||
input.required_capabilities.as_ref(),
|
||||
sticky_session_token.as_deref(),
|
||||
input.request_auth_channel.as_deref(),
|
||||
@@ -254,6 +259,7 @@ async fn materialize_local_video_create_candidate_attempts(
|
||||
api_format,
|
||||
Some(&input.requested_model),
|
||||
Some(&input.auth_snapshot),
|
||||
input.client_session_affinity.as_ref(),
|
||||
input.required_capabilities.as_ref(),
|
||||
sticky_session_token.as_deref(),
|
||||
input.request_auth_channel.as_deref(),
|
||||
|
||||
Reference in New Issue
Block a user