Q62: cancelled and finished provider requests keep their final state

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 10:47:25 -04:00
1 parent 46cd167c2c
commit acbafcd6de
5 files changed
+79 -24

No files matched your search

@@ -152,7 +152,7 @@ export class ProviderBackgroundService {
if (result.status === "completed") {
const responseText = requireBackgroundText(result.text, provider.provider_key);
this.requestStore.clearPollFailures(request.id);
this.requestStore.markSucceeded({
const finished = this.requestStore.markSucceeded({
orgId: request.org_id,
requestId: request.id,
responseText,
@@ -161,6 +161,7 @@ export class ProviderBackgroundService {
externalResponseId: result.responseId,
completedAt: new Date().toISOString(),
});
if (!finished) return;
this.responseObserver.recordSuccess({
orgId: request.org_id,
provider,