refactor(codex): generalize fingerprint convergence

This commit is contained in:
elky
2026-09-01 17:05:54 +08:00
parent ef7caa40e7
commit d07dc86376
7 changed files with 146 additions and 45 deletions
@@ -168,7 +168,7 @@ pub(crate) fn apply_provider_request_routing_policy_to_decision_with_websocket_m
provider_api_format.as_str(),
);
}
apply_codex_oauth_fingerprint_convergence_to_decision(
apply_codex_fingerprint_convergence_to_decision(
input,
decision,
transport,
@@ -231,7 +231,7 @@ pub(crate) fn apply_provider_request_routing_policy_to_decision_with_websocket_m
provider_api_format.as_str(),
);
}
apply_codex_oauth_fingerprint_convergence_to_decision(
apply_codex_fingerprint_convergence_to_decision(
input,
decision,
transport,
@@ -356,7 +356,7 @@ pub(crate) fn apply_provider_request_routing_policy_to_decision_with_websocket_m
if original_provider_request_body.is_some() {
decision.provider_request_body = Some(provider_request_body);
}
apply_codex_oauth_fingerprint_convergence_to_decision(
apply_codex_fingerprint_convergence_to_decision(
input,
decision,
transport,
@@ -366,7 +366,7 @@ pub(crate) fn apply_provider_request_routing_policy_to_decision_with_websocket_m
Ok(())
}
fn apply_codex_oauth_fingerprint_convergence_to_decision(
fn apply_codex_fingerprint_convergence_to_decision(
input: &LocalRequestedModelDecisionInput,
decision: &mut AiExecutionDecision,
transport: Option<&GatewayProviderTransportSnapshot>,
@@ -380,14 +380,13 @@ fn apply_codex_oauth_fingerprint_convergence_to_decision(
let Some(context) = input.codex_fingerprint_context.as_ref() else {
return;
};
let applied =
crate::ai_serving::transport::apply_codex_oauth_fingerprint_convergence_with_context(
transport,
provider_api_format,
context,
&mut decision.provider_request_headers,
provider_request_body,
);
let applied = crate::ai_serving::transport::apply_codex_fingerprint_convergence_with_context(
transport,
provider_api_format,
context,
&mut decision.provider_request_headers,
provider_request_body,
);
if applied {
decision.prompt_cache_key = provider_request_body
.get("prompt_cache_key")
@@ -59,10 +59,9 @@ pub(crate) mod windsurf {
}
pub(crate) use aether_provider_transport::{
append_transport_diagnostics_to_value, apply_codex_oauth_fingerprint_convergence,
apply_codex_oauth_fingerprint_convergence_with_context,
apply_local_auth_config_header_overrides, apply_local_body_rules,
apply_local_body_rules_with_request_headers, apply_local_header_rules,
append_transport_diagnostics_to_value, apply_codex_fingerprint_convergence,
apply_codex_fingerprint_convergence_with_context, apply_local_auth_config_header_overrides,
apply_local_body_rules, apply_local_body_rules_with_request_headers, apply_local_header_rules,
apply_local_header_rules_with_request_headers, apply_standard_provider_request_body_rules,
apply_standard_provider_request_body_rules_with_request_headers,
apply_transport_request_body_semantics, body_rules_are_locally_supported,