Fix LLM gateway path, update M1.8 gate test to load real chunks (Option B)
ci / markdown (push) Waiting to run

This commit is contained in:
Story Crater Bot
2026-08-23 00:32:27 -07:00
parent a0ebc1183c
commit ae606a0685
3 changed files with 115 additions and 27 deletions
+6 -6
View File
@@ -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))