Merge pull request #76 from ecschoye/fix/provider-warmup-cold-start
fix: add provider warmup to prevent cold-start timeout on first channel message
This commit is contained in:
commit
026a917544
4 changed files with 35 additions and 0 deletions
|
|
@ -428,6 +428,13 @@ pub async fn start_channels(config: Config) -> Result<()> {
|
|||
config.api_key.as_deref(),
|
||||
&config.reliability,
|
||||
)?);
|
||||
|
||||
// Warm up the provider connection pool (TLS handshake, DNS, HTTP/2 setup)
|
||||
// so the first real message doesn't hit a cold-start timeout.
|
||||
if let Err(e) = provider.warmup().await {
|
||||
tracing::warn!("Provider warmup failed (non-fatal): {e}");
|
||||
}
|
||||
|
||||
let model = config
|
||||
.default_model
|
||||
.clone()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue