fix(gateway): route Gemini embedding batches correctly

This commit is contained in:
MMEXA
2026-05-17 14:24:32 +00:00
parent a2f91b4108
commit 81ff375bfd
37 changed files with 1353 additions and 120 deletions
@@ -254,6 +254,7 @@ pub(crate) async fn resolve_local_same_format_provider_candidate_payload_parts(
spec,
prepared.upstream_is_stream,
prepared.kiro_auth.as_ref(),
Some(&provider_request_body),
) else {
mark_skipped_local_same_format_provider_candidate_with_failure_diagnostic(
state,
@@ -14,6 +14,7 @@ pub(crate) fn build_same_format_upstream_url(
spec: LocalSameFormatProviderSpec,
upstream_is_stream: bool,
kiro_auth: Option<&crate::ai_serving::transport::kiro::KiroRequestAuth>,
provider_request_body: Option<&serde_json::Value>,
) -> Option<String> {
build_same_format_provider_upstream_url_impl(
transport,
@@ -23,6 +24,7 @@ pub(crate) fn build_same_format_upstream_url(
upstream_is_stream,
request_query: parts.uri.query(),
kiro_api_region: kiro_auth.map(|auth| auth.auth_config.effective_api_region()),
provider_request_body,
},
)
}