Skip to content

test: react_using_mellea.py example fails intermittently — ReACT loop exceeds 10 iteration budget #684

@planetf1

Description

@planetf1

docs/examples/agents/react/react_using_mellea.py fails when the model does not converge on a final_answer within the default loop budget:

RuntimeError: could not complete react loop in 10 iterations

To reproduce:

uv sync --all-extras --all-groups
uv run pytest --durations=0 --ignore=test/formatters/granite/test_intrinsics_formatters.py -v

Environment:

  • MacBook M1 (Apple Silicon, macOS)
  • Python 3.12.8
  • Backend: ollama, model: granite4:micro

Observed behaviour: The model repeatedly calls duckduckgo_results_json but never calls final_answer, exhausting all 10 iterations. This is non-deterministic — it depends on model output.

Current markers: # pytest: ollama, llm

Suggested fix: Add qualitative and slow markers so the example is skipped by default locally and in CI, consistent with other non-deterministic examples:

# pytest: ollama, llm, qualitative, slow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions