|
30 | 30 | //! replacements for `axum::routing::{get, post, ...}` that wrap handlers in |
31 | 31 | //! [`crate::compat::WasmHandler`], asserting `Send` since wasm32 is single-threaded. |
32 | 32 |
|
33 | | -use std::sync::Arc; |
| 33 | +use std::{collections::HashMap, sync::Arc}; |
34 | 34 |
|
35 | 35 | use axum::{ |
36 | 36 | Extension, Json, Router, |
@@ -477,7 +477,27 @@ fn wasm_default_config() -> config::GatewayConfig { |
477 | 477 | mode: config::AuthMode::None, |
478 | 478 | ..Default::default() |
479 | 479 | }, |
480 | | - providers: config::ProvidersConfig::default(), |
| 480 | + providers: config::ProvidersConfig { |
| 481 | + default_provider: Some("test".to_string()), |
| 482 | + providers: HashMap::from([( |
| 483 | + "test".to_string(), |
| 484 | + config::ProviderConfig::Test(config::TestProviderConfig { |
| 485 | + model_name: "test-model".to_string(), |
| 486 | + failure_mode: config::TestFailureMode::None, |
| 487 | + timeout_secs: 30, |
| 488 | + allowed_models: Vec::new(), |
| 489 | + model_aliases: HashMap::new(), |
| 490 | + models: HashMap::new(), |
| 491 | + retry: config::RetryConfig::default(), |
| 492 | + circuit_breaker: config::CircuitBreakerConfig::default(), |
| 493 | + fallback_providers: Vec::new(), |
| 494 | + model_fallbacks: HashMap::new(), |
| 495 | + health_check: config::ProviderHealthCheckConfig::default(), |
| 496 | + catalog_provider: None, |
| 497 | + sovereignty: None, |
| 498 | + }), |
| 499 | + )]), |
| 500 | + }, |
481 | 501 | limits: config::LimitsConfig::default(), |
482 | 502 | features: config::FeaturesConfig { |
483 | 503 | static_models_cache: config::StaticModelsCacheConfig { |
|
0 commit comments