AiRunError ai.run-error@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
ai
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/ai/run-error.v1.json

ai.run-error@1: safe, actionable words for an AI or Actor run. Raw provider responses are never display text. The code map is shared across products.

Fields

FieldTypeRequiredDescriptionConstraints
codestringyes
  • maxLength 80
wordsstringyes
  • maxLength 240
nextstringyes
  • maxLength 240
actionenumyes
  • one of "pick_model", "add_key", "retry", "retry_later", "open"
retry_atstring | null
  • format date-time

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: basic
{
  "code": "route.unavailable",
  "words": "No model could take this task.",
  "next": "Choose a model and retry.",
  "action": "pick_model"
}
Rejected: raw
{
  "code": "route.unavailable",
  "words": "Unavailable",
  "next": "Retry",
  "action": "retry",
  "raw": "provider payload"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('ai.run-error@1', value);   // { valid, errors: [{ path, message }] }