Fix LLM gateway path, update M1.8 gate test to load real chunks (Option B)
ci / markdown (push) Waiting to run
ci / markdown (push) Waiting to run
This commit is contained in:
@@ -7,7 +7,7 @@ async fn a1_sends_apikey_header() {
|
||||
let mock_server = MockServer::start().await;
|
||||
|
||||
Mock::given(method("POST"))
|
||||
.and(path("/qwen/chat/completions"))
|
||||
.and(path("/chat/completions"))
|
||||
.respond_with(ResponseTemplate::new(200).set_body_json(serde_json::json!({
|
||||
"choices": [{
|
||||
"message": {
|
||||
@@ -52,7 +52,7 @@ async fn a2_no_tools_field() {
|
||||
let mock_server = MockServer::start().await;
|
||||
|
||||
Mock::given(method("POST"))
|
||||
.and(path("/qwen/chat/completions"))
|
||||
.and(path("/chat/completions"))
|
||||
.respond_with(ResponseTemplate::new(200).set_body_json(serde_json::json!({
|
||||
"choices": [{
|
||||
"message": {
|
||||
@@ -90,7 +90,7 @@ async fn a3_retries_5xx() {
|
||||
|
||||
// First two requests return 503, third returns 200
|
||||
Mock::given(method("POST"))
|
||||
.and(path("/qwen/chat/completions"))
|
||||
.and(path("/chat/completions"))
|
||||
.respond_with(
|
||||
ResponseTemplate::new(503).set_body_json(serde_json::json!({
|
||||
"error": "Service Unavailable"
|
||||
@@ -101,7 +101,7 @@ async fn a3_retries_5xx() {
|
||||
.await;
|
||||
|
||||
Mock::given(method("POST"))
|
||||
.and(path("/qwen/chat/completions"))
|
||||
.and(path("/chat/completions"))
|
||||
.respond_with(ResponseTemplate::new(200).set_body_json(serde_json::json!({
|
||||
"choices": [{
|
||||
"message": {
|
||||
@@ -139,7 +139,7 @@ async fn a4_does_not_retry_4xx() {
|
||||
let mock_server = MockServer::start().await;
|
||||
|
||||
Mock::given(method("POST"))
|
||||
.and(path("/qwen/chat/completions"))
|
||||
.and(path("/chat/completions"))
|
||||
.respond_with(ResponseTemplate::new(400).set_body_json(serde_json::json!({
|
||||
"error": {
|
||||
"message": "[] is too short - 'messages'"
|
||||
@@ -173,7 +173,7 @@ async fn a5_timeout_is_configurable() {
|
||||
|
||||
// Set up a mock that delays for 5 seconds
|
||||
Mock::given(method("POST"))
|
||||
.and(path("/qwen/chat/completions"))
|
||||
.and(path("/chat/completions"))
|
||||
.respond_with(
|
||||
ResponseTemplate::new(200)
|
||||
.set_delay(std::time::Duration::from_secs(5))
|
||||
|
||||
Reference in New Issue
Block a user