fix(providers): stop killing streaming responses at the total request timeout (#10620)

Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
This commit is contained in:
filip
2026-08-04 15:11:51 -07:00
committed by GitHub
parent affd1cea10
commit 7e431ac6f8
24 changed files with 418 additions and 69 deletions
@@ -265,6 +265,7 @@ impl GithubCopilotProvider {
is_user_initiated: bool,
payload: &mut Value,
has_images: bool,
streaming: bool,
) -> Result<Response, ProviderError> {
let (endpoint, token) = self.get_api_info().await?;
let auth = AuthMethod::BearerToken(token);
@@ -281,6 +282,7 @@ impl GithubCopilotProvider {
api_client
.request(path)
.model_headers(model_config)?
.streaming(streaming)
.response_post(payload)
.await
.map_err(|e| e.into())
@@ -420,6 +422,7 @@ impl GithubCopilotProvider {
is_user_initiated,
&mut payload_clone,
has_images,
true,
)
.await?;
handle_status(resp).await
@@ -467,6 +470,7 @@ impl GithubCopilotProvider {
is_user_initiated,
&mut payload_clone,
has_images,
true,
)
.await?;
handle_status(resp).await
@@ -497,6 +501,7 @@ impl GithubCopilotProvider {
is_user_initiated,
&mut payload_clone,
has_images,
false,
)
.await
})