Repository navigation
feat(workflows): add ordered pre-side-effect model fallback chain for text nodes - #64
Merged
Merged
Conversation
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fallbacks?: WorkflowModelTarget[](max 3) toWorkflowNode(server/workflows/types.ts) and observability fields (usedInstanceId,usedModel,fallbackAttempts) toWorkflowNodeRun.fallbacksinserver/workflows/check.ts(text nodes only, max 3, non-emptyinstanceId, no duplicates with primary or earlier fallbacks) and round-trip them throughserver/workflows/graph-spec.tsandserver/drivers/agents-workflow-tools.ts.executeTextNodeinserver/workflows/runner.tsto walk[primary, ...fallbacks]under one shared node timeout budget:runtime.errorevents and reuses existingclassifyError/engineFailureKindto fall back only on pre-side-effect availability/auth/quota/rate-limit/overload/unknown-model failures.hasSideEffectOrOutput), or on cancellation/timeout (interrupts cleanly on timeout).Why
server/host/limit-takeover.ts, whereas workflowtextnodes failed immediately on a single missing/limited/signed-out engine.DevilsAdvocatesafeguards: no duplicate side effects on mid-flight failures, no timeout multiplication, reuse of existing error classifiers, and run-level observability.Verification
oxlint --deny-warnings(0 warnings/errors),tsc -p tsconfig.server.json --noEmit(0 errors in changed files),scripts/testing/file-size-ratchet.test.tspassed.node --experimental-strip-typesagainstcreateWorkflowRunner+createWorkflowStore):runtime.error(limit: "engine") failed the workflow node immediately.spec-roundtrip,validation-limits-and-duplicates,missing-engine-skip,pre-side-effect-limit-failover,midflight-tool-blocks-fallback,timeout-blocks-fallback-and-interrupts.