mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-09 18:59:50 +08:00
Merge PR #669: align GPT-5.6 and Codex request protocols
This commit is contained in:
@@ -51,6 +51,7 @@ use super::super::{provider_transport, usage};
|
||||
use crate::maintenance::spawn_account_self_check_worker;
|
||||
use crate::maintenance::spawn_audit_cleanup_worker;
|
||||
use crate::maintenance::spawn_db_maintenance_worker;
|
||||
use crate::maintenance::spawn_fixed_provider_reconciliation_task;
|
||||
use crate::maintenance::spawn_gemini_file_mapping_cleanup_worker;
|
||||
use crate::maintenance::spawn_oauth_token_refresh_worker;
|
||||
use crate::maintenance::spawn_pending_cleanup_worker;
|
||||
@@ -250,6 +251,11 @@ impl AppState {
|
||||
http2_adaptive_window: true,
|
||||
..HttpClientConfig::default()
|
||||
})?;
|
||||
let owner_forward_client = build_http_client(&HttpClientConfig {
|
||||
connect_timeout_ms: Some(10_000),
|
||||
http2_adaptive_window: true,
|
||||
..HttpClientConfig::default()
|
||||
})?;
|
||||
let frontdoor_runtime_guards = Arc::new(FrontdoorRuntimeGuardConfig::from_env());
|
||||
Ok(Self {
|
||||
#[cfg(test)]
|
||||
@@ -287,6 +293,7 @@ impl AppState {
|
||||
),
|
||||
distributed_request_gate: None,
|
||||
client,
|
||||
owner_forward_client,
|
||||
auth_context_cache: Arc::new(AuthContextCache::default()),
|
||||
auth_snapshot_cache: Arc::new(AuthSnapshotCache::default()),
|
||||
admin_security_blacklist_cache: Arc::new(ValueCache::default()),
|
||||
@@ -716,6 +723,7 @@ impl AppState {
|
||||
self.data.clear_minimal_candidate_selection_cache();
|
||||
self.data.clear_routing_group_cache();
|
||||
self.data.clear_provider_catalog_cache();
|
||||
self.auth_request_cost_upper_bound_cache.clear();
|
||||
self.routing_group_selection_cache.clear();
|
||||
self.candidate_row_page_cache.clear();
|
||||
self.candidate_page_cache.clear();
|
||||
@@ -1501,6 +1509,13 @@ impl AppState {
|
||||
record_boot(crate::task_runtime::TASK_KEY_USAGE_QUEUE_WORKER);
|
||||
}
|
||||
|
||||
if let Some(handle) = spawn_fixed_provider_reconciliation_task(self.clone()) {
|
||||
supervisor.supervise_handle(
|
||||
crate::task_runtime::TASK_KEY_FIXED_PROVIDER_RECONCILIATION,
|
||||
handle,
|
||||
);
|
||||
}
|
||||
|
||||
let mut supervise_worker =
|
||||
|task_key: &'static str, handle: Option<tokio::task::JoinHandle<()>>| {
|
||||
if let Some(handle) = handle {
|
||||
|
||||
Reference in New Issue
Block a user