mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
Implement transport profile routing
This commit is contained in:
@@ -130,7 +130,7 @@ pub fn build_ai_execution_plan_from_decision(
|
||||
provider_api_format: parts.core.provider_api_format,
|
||||
model_name: payload.model_name.take(),
|
||||
proxy: payload.proxy.take(),
|
||||
tls_profile: payload.tls_profile.take(),
|
||||
transport_profile: payload.transport_profile.take(),
|
||||
timeouts: payload.timeouts.take(),
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ pub fn build_ai_execution_decision_from_plan(
|
||||
provider_api_format,
|
||||
model_name,
|
||||
proxy,
|
||||
tls_profile,
|
||||
transport_profile,
|
||||
timeouts,
|
||||
} = parts.plan;
|
||||
let auth_pair = parts
|
||||
@@ -209,7 +209,7 @@ pub fn build_ai_execution_decision_from_plan(
|
||||
provider_request_body_base64: body_bytes_b64,
|
||||
content_type,
|
||||
proxy,
|
||||
tls_profile,
|
||||
transport_profile,
|
||||
timeouts,
|
||||
upstream_is_stream: stream,
|
||||
report_kind: parts.report_kind,
|
||||
@@ -451,7 +451,7 @@ mod tests {
|
||||
provider_api_format: "claude:messages".to_string(),
|
||||
model_name: Some("mapped".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
transport_profile: None,
|
||||
timeouts: None,
|
||||
};
|
||||
|
||||
@@ -512,7 +512,7 @@ mod tests {
|
||||
provider_request_body_base64: None,
|
||||
content_type: None,
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
transport_profile: None,
|
||||
timeouts: None,
|
||||
upstream_is_stream: false,
|
||||
report_kind: None,
|
||||
|
||||
@@ -4,7 +4,7 @@ use aether_ai_formats::api::{
|
||||
ExecutionRuntimeAuthContext, EXECUTION_RUNTIME_STREAM_DECISION_ACTION,
|
||||
EXECUTION_RUNTIME_SYNC_DECISION_ACTION,
|
||||
};
|
||||
use aether_contracts::{ExecutionTimeouts, ProxySnapshot};
|
||||
use aether_contracts::{ExecutionTimeouts, ProxySnapshot, ResolvedTransportProfile};
|
||||
|
||||
use crate::{AiExecutionDecision, ConversionMode, ExecutionStrategy};
|
||||
|
||||
@@ -34,7 +34,7 @@ pub struct AiExecutionDecisionResponseParts {
|
||||
pub provider_request_body_base64: Option<String>,
|
||||
pub content_type: Option<String>,
|
||||
pub proxy: Option<ProxySnapshot>,
|
||||
pub tls_profile: Option<String>,
|
||||
pub transport_profile: Option<ResolvedTransportProfile>,
|
||||
pub timeouts: Option<ExecutionTimeouts>,
|
||||
pub upstream_is_stream: bool,
|
||||
pub report_kind: Option<String>,
|
||||
@@ -74,7 +74,7 @@ pub fn build_ai_execution_decision_response(
|
||||
provider_request_body_base64: parts.provider_request_body_base64,
|
||||
content_type: parts.content_type,
|
||||
proxy: parts.proxy,
|
||||
tls_profile: parts.tls_profile,
|
||||
transport_profile: parts.transport_profile,
|
||||
timeouts: parts.timeouts,
|
||||
upstream_is_stream: parts.upstream_is_stream,
|
||||
report_kind: parts.report_kind,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use aether_ai_formats::api::ExecutionRuntimeAuthContext;
|
||||
use aether_contracts::{ExecutionPlan, ExecutionTimeouts, ProxySnapshot};
|
||||
use aether_contracts::{ExecutionPlan, ExecutionTimeouts, ProxySnapshot, ResolvedTransportProfile};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
@@ -117,7 +117,7 @@ pub struct AiExecutionDecision {
|
||||
#[serde(default)]
|
||||
pub proxy: Option<ProxySnapshot>,
|
||||
#[serde(default)]
|
||||
pub tls_profile: Option<String>,
|
||||
pub transport_profile: Option<ResolvedTransportProfile>,
|
||||
#[serde(default)]
|
||||
pub timeouts: Option<ExecutionTimeouts>,
|
||||
#[serde(default)]
|
||||
@@ -217,7 +217,7 @@ mod tests {
|
||||
provider_request_body_base64: None,
|
||||
content_type: None,
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
transport_profile: None,
|
||||
timeouts: None,
|
||||
upstream_is_stream: false,
|
||||
report_kind: None,
|
||||
|
||||
@@ -101,7 +101,7 @@ mod tests {
|
||||
provider_api_format: "openai:chat".to_string(),
|
||||
model_name: Some("model".to_string()),
|
||||
proxy: None,
|
||||
tls_profile: None,
|
||||
transport_profile: None,
|
||||
timeouts: None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user