mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-09 18:59:50 +08:00
Normalize endpoint API root handling
This commit is contained in:
@@ -715,7 +715,7 @@ async fn gateway_executes_openai_video_remix_via_data_backed_local_follow_up_wit
|
||||
"format_converted": false
|
||||
},
|
||||
"transport": {
|
||||
"upstream_base_url": "https://api.openai.example",
|
||||
"upstream_base_url": "https://api.openai.example/v1",
|
||||
"provider_name": "openai-video",
|
||||
"provider_id": "provider-openai-video-local-1",
|
||||
"endpoint_id": "endpoint-openai-video-local-1",
|
||||
|
||||
@@ -69,7 +69,7 @@ async fn gateway_executes_openai_video_delete_via_reconstructed_data_backed_loca
|
||||
)
|
||||
.expect("endpoint should build")
|
||||
.with_transport_fields(
|
||||
"https://api.openai.example".to_string(),
|
||||
"https://api.openai.example/v1".to_string(),
|
||||
None,
|
||||
None,
|
||||
Some(2),
|
||||
|
||||
@@ -165,7 +165,7 @@ async fn gateway_background_video_task_poller_refreshes_due_openai_task_from_rep
|
||||
let (execution_runtime_url, execution_runtime_handle) = start_server(execution_runtime).await;
|
||||
let repository = Arc::new(InMemoryVideoTaskRepository::default());
|
||||
repository
|
||||
.upsert(sample_due_openai_task("https://api.openai.example"))
|
||||
.upsert(sample_due_openai_task("https://api.openai.example/v1"))
|
||||
.await
|
||||
.expect("task upsert should succeed");
|
||||
|
||||
@@ -268,9 +268,10 @@ async fn gateway_background_video_task_poller_refreshes_due_openai_task_from_rep
|
||||
);
|
||||
|
||||
let (upstream_url, upstream_handle) = start_server(upstream).await;
|
||||
let upstream_api_root = format!("{upstream_url}/v1");
|
||||
let repository = Arc::new(InMemoryVideoTaskRepository::default());
|
||||
repository
|
||||
.upsert(sample_due_openai_task(&upstream_url))
|
||||
.upsert(sample_due_openai_task(&upstream_api_root))
|
||||
.await
|
||||
.expect("task upsert should succeed");
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ async fn gateway_executes_openai_video_content_from_reconstructed_data_task_with
|
||||
)
|
||||
.expect("endpoint should build")
|
||||
.with_transport_fields(
|
||||
"https://api.openai.example".to_string(),
|
||||
"https://api.openai.example/v1".to_string(),
|
||||
None,
|
||||
None,
|
||||
Some(2),
|
||||
|
||||
Reference in New Issue
Block a user