==================
Single fallback model IDs and computed expressions
==================

> fallback: openai:backup
> fallback: `models['backup']`

---

(source_file
  (fallback_directive
    value: (directive_value))
  (fallback_directive
    value: (inline_python_expr
      code: (python_inline_body))))

==================
Ordered fallback model entries
==================

> fallback:
  openai:first
  openrouter:provider/second
  `choose_model()`

---

(source_file
  (fallback_directive
    body: (fallback_body
      (fallback_entry
        value: (directive_value))
      (fallback_entry
        value: (directive_value))
      (fallback_entry
        value: (inline_python_expr
          code: (python_inline_body))))))

==================
Fallback in a procedure
==================

@review():
  > fallback:
    openai:first
    `backup`
  = ready

---

(source_file
  (procedure_def
    name: (identifier)
    body: (block
      (fallback_directive
        body: (fallback_body
          (fallback_entry
            value: (directive_value))
          (fallback_entry
            value: (inline_python_expr
              code: (python_inline_body)))))
      (return_stmt
        value: (template_expr
          (text_segment))))))

==================
Conditional profile fallback followed by model selection
==================

> profile: resilient:
  > if: `ready`:
    > fallback:
      openai:first
      `backup`
  > else:
    > fallback: openai:last
  > model: openai:primary

---

(source_file
  (profile_directive
    name: (identifier)
    body: (profile_body
      (profile_if_stmt
        condition: (inline_python_expr
          code: (python_inline_body))
        consequence: (profile_body
          (fallback_directive
            body: (fallback_body
              (fallback_entry
                value: (directive_value))
              (fallback_entry
                value: (inline_python_expr
                  code: (python_inline_body))))))
        alternative: (profile_body
          (fallback_directive
            value: (directive_value))))
      (model_directive
        value: (model_plain_value)))))

==================
Capability fallback remains parseable for semantic rejection
==================

> capability: resources:
  > fallback: openai:backup
  > if: `ready`:
    > fallback:
      openai:first
      `backup`

---

(source_file
  (capability_directive
    name: (identifier)
    body: (capability_body
      (fallback_directive
        value: (directive_value))
      (capability_if_stmt
        condition: (inline_python_expr
          code: (python_inline_body))
        consequence: (capability_body
          (fallback_directive
            body: (fallback_body
              (fallback_entry
                value: (directive_value))
              (fallback_entry
                value: (inline_python_expr
                  code: (python_inline_body))))))))))
