You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Give decision API rejections a stable error code #114
Decision API rejections are plain Errors with no status code, so llamadart has to classify them by message text (leehack/llamadart#620, webgpu_decision.dart_bridgeException): "Load the decision head again", "No model loaded", "Bridge has been disposed", "was cancelled", "during active generation" and "decision encoder context". Rewording any of these silently changes which exception llamadart throws.
Proposal: before the decision API's first published assets, attach a stable code to rejected errors: the core status (for example -4) or a string such as 'head-lost', 'no-model', 'disposed', 'cancelled', 'busy', 'context'. Document the codes in docs/api.md next to apiVersion 1.
Status: decision API 1 shipped without codes in v0.1.47, and llamadart main now pins it. leehack/llamadart#620 merged, so _bridgeException in lib/src/backends/webgpu/webgpu_decision.dart classifies rejections by message text in production. Adding a code is still additive. Keep the current messages unchanged until llamadart switches to the codes.
Activity
leehack commentedon Sep 24, 2026
Status: decision API 1 shipped without codes in
v0.1.47, and llamadart main now pins it. leehack/llamadart#620 merged, so_bridgeExceptioninlib/src/backends/webgpu/webgpu_decision.dartclassifies rejections by message text in production. Adding acodeis still additive. Keep the current messages unchanged until llamadart switches to the codes.