Clean up transport fingerprint configuration

Remove legacy tls_profile handling, keep header fingerprint under transport profiles, and drop the duplicate auth_modules migration.
This commit is contained in:
fawney19
2026-05-06 13:54:33 +08:00
parent 6fbb867f5f
commit 68216bf868
53 changed files with 267 additions and 238 deletions

View File

@@ -730,7 +730,7 @@ async fn gateway_executes_kiro_claude_cli_sync_upstream_stream_via_local_finaliz
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-kiro-cli-finalize-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -1089,7 +1089,7 @@ async fn gateway_executes_openai_chat_stream_with_custom_path_via_local_decision
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-openai-custom-stream"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -195,7 +195,7 @@ async fn gateway_executes_openai_responses_compact_stream_via_local_decision_gat
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-openai-compact-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -245,7 +245,7 @@ async fn gateway_executes_kiro_claude_cli_stream_via_local_provider_catalog_cand
Some(
serde_json::json!({"enabled": true, "node_id":"proxy-node-kiro-cli-local-stream"}),
),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}
@@ -734,7 +734,7 @@ async fn gateway_executes_claude_cli_stream_via_local_decision_gate_without_wait
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-claude-cli-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}
@@ -1196,8 +1196,12 @@ async fn gateway_executes_claude_code_cli_stream_via_local_decision_gate_with_lo
serde_json::json!({"enabled": true, "node_id":"proxy-node-claude-code-cli-local"}),
),
Some(serde_json::json!({
"tls_profile":"claude_code_nodejs",
"user_agent":"Claude-Code/9.9"
"transport_profile": {
"profile_id": "claude_code_nodejs",
"header_fingerprint": {
"user_agent":"Claude-Code/9.9"
}
}
})),
)
.expect("key transport should build")
@@ -1709,7 +1713,7 @@ async fn gateway_executes_claude_chat_stream_via_local_decision_gate_with_local_
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-claude-chat-stream"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -172,7 +172,7 @@ async fn gateway_executes_gemini_chat_stream_via_local_decision_gate_with_local_
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-gemini-chat-stream"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -169,7 +169,7 @@ async fn gateway_executes_gemini_cli_stream_via_local_decision_gate_with_local_s
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-gemini-cli-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}
@@ -617,7 +617,7 @@ async fn gateway_executes_gemini_cli_stream_via_local_decision_gate_after_oauth_
Some(
serde_json::json!({"enabled": true, "node_id":"proxy-node-gemini-cli-oauth-local"}),
),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -2751,7 +2751,7 @@ async fn gateway_executes_openai_chat_sync_with_custom_path_via_local_decision_g
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-openai-custom-path"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -214,11 +214,15 @@ async fn gateway_executes_claude_code_cli_sync_via_local_decision_gate_with_loca
serde_json::json!({"enabled": true, "node_id":"proxy-node-claude-code-cli-local"}),
),
Some(serde_json::json!({
"tls_profile":"claude_code_nodejs",
"user_agent":"Claude-Code/9.9",
"stainless_package_version":"1.0.5",
"stainless_runtime_version":"v22.12.0",
"stainless_timeout":"900"
"transport_profile": {
"profile_id": "claude_code_nodejs",
"header_fingerprint": {
"user_agent":"Claude-Code/9.9",
"stainless_package_version":"1.0.5",
"stainless_runtime_version":"v22.12.0",
"stainless_timeout":"900"
}
}
})),
)
.expect("key transport should build")

View File

@@ -264,7 +264,7 @@ async fn gateway_executes_kiro_claude_cli_sync_via_local_provider_catalog_candid
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-kiro-cli-local-sync"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -199,7 +199,7 @@ async fn gateway_executes_claude_chat_sync_via_local_decision_gate_with_local_sy
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-claude-chat-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}
@@ -768,7 +768,7 @@ async fn gateway_returns_claude_chat_error_for_local_sync_failure_impl() {
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-claude-chat-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -199,7 +199,7 @@ async fn gateway_executes_claude_cli_sync_via_local_decision_gate_with_local_syn
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-claude-cli-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}
@@ -644,7 +644,7 @@ async fn gateway_returns_claude_cli_error_for_local_sync_failure_impl() {
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-claude-cli-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -191,7 +191,7 @@ async fn gateway_executes_openai_responses_sync_via_local_decision_gate_with_loc
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-openai-cli-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}
@@ -1418,7 +1418,7 @@ async fn gateway_returns_openai_responses_error_for_local_sync_failure() {
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-openai-cli-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -199,7 +199,7 @@ async fn gateway_executes_gemini_cli_sync_via_local_decision_gate_with_local_syn
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-gemini-cli-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}
@@ -630,7 +630,7 @@ async fn gateway_returns_gemini_cli_error_for_local_sync_failure_impl() {
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-gemini-cli-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}
@@ -936,7 +936,7 @@ async fn gateway_executes_gemini_cli_sync_via_local_decision_gate_after_oauth_re
Some(
serde_json::json!({"enabled": true, "node_id":"proxy-node-gemini-cli-oauth-local"}),
),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -199,7 +199,7 @@ async fn gateway_executes_gemini_chat_sync_via_local_decision_gate_with_local_sy
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-gemini-chat-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}
@@ -620,7 +620,7 @@ async fn gateway_returns_gemini_chat_error_for_local_sync_failure_impl() {
None,
None,
Some(serde_json::json!({"enabled": true, "node_id":"proxy-node-gemini-chat-local"})),
Some(serde_json::json!({"tls_profile":"chrome_136"})),
Some(serde_json::json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -552,7 +552,7 @@ async fn gateway_cancels_openai_video_task_via_internal_async_task_endpoint() {
"content_type": "application/json",
"model_name": "sora-2-upstream",
"proxy": null,
"tls_profile": null,
"transport_profile": null,
"timeouts": null
}
}
@@ -714,7 +714,7 @@ async fn gateway_cancels_openai_video_task_via_internal_async_task_endpoint_with
"content_type": "application/json",
"model_name": "sora-2-upstream",
"proxy": null,
"tls_profile": null,
"transport_profile": null,
"timeouts": null
}
}

View File

@@ -581,7 +581,7 @@ async fn gateway_cancels_admin_video_task_locally_with_trusted_admin_principal()
"content_type": "application/json",
"model_name": "sora-2-upstream",
"proxy": null,
"tls_profile": null,
"transport_profile": null,
"timeouts": null
}
}

View File

@@ -198,7 +198,7 @@ async fn gateway_executes_gemini_files_download_via_local_decision_gate_with_loc
key.proxy = Some(
serde_json::json!({"enabled": true, "node_id":"proxy-node-gemini-files-download-local"}),
);
key.fingerprint = Some(serde_json::json!({"tls_profile":"chrome_136"}));
key.fingerprint = Some(serde_json::json!({"transport_profile":"chrome_136"}));
let provider_catalog_repository = Arc::new(InMemoryProviderCatalogReadRepository::seed(
vec![provider],
vec![endpoint],

View File

@@ -202,7 +202,7 @@ async fn gateway_executes_gemini_files_upload_via_local_decision_gate_with_local
key.proxy = Some(
serde_json::json!({"enabled": true, "node_id":"proxy-node-gemini-files-upload-local"}),
);
key.fingerprint = Some(serde_json::json!({"tls_profile":"chrome_136"}));
key.fingerprint = Some(serde_json::json!({"transport_profile":"chrome_136"}));
let provider_catalog_repository = Arc::new(InMemoryProviderCatalogReadRepository::seed(
vec![provider],
vec![endpoint],

View File

@@ -108,7 +108,7 @@ fn sample_gemini_video_task(
"content_type": "application/json",
"model_name": "veo-3-upstream",
"proxy": null,
"tls_profile": null,
"transport_profile": null,
"timeouts": null
}
}

View File

@@ -189,7 +189,7 @@ async fn gateway_executes_gemini_video_create_via_local_decision_gate_with_local
None,
None,
None,
Some(json!({"tls_profile":"chrome_136"})),
Some(json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}

View File

@@ -232,7 +232,7 @@ async fn gateway_executes_gemini_video_cancel_via_data_backed_local_follow_up_wi
"content_type": "application/json",
"model_name": "veo-3-upstream",
"proxy": null,
"tls_profile": null,
"transport_profile": null,
"timeouts": null
}
}

View File

@@ -194,7 +194,7 @@ async fn gateway_executes_openai_video_create_via_local_decision_gate_with_local
None,
None,
None,
Some(json!({"tls_profile":"chrome_136"})),
Some(json!({"transport_profile":"chrome_136"})),
)
.expect("key transport should build")
}
@@ -726,7 +726,7 @@ async fn gateway_executes_openai_video_remix_via_data_backed_local_follow_up_wit
"content_type": "application/json",
"model_name": "sora-2-upstream",
"proxy": null,
"tls_profile": null,
"transport_profile": null,
"timeouts": null
}
}

View File

@@ -96,7 +96,7 @@ fn sample_due_openai_task(upstream_base_url: &str) -> UpsertVideoTask {
"content_type": "application/json",
"model_name": "sora-2-upstream",
"proxy": null,
"tls_profile": null,
"transport_profile": null,
"timeouts": null
}
}