Skip to content

Minimal ReActV2 normalized adapter port - #62

Draft
isaacbmiller wants to merge 4 commits into
mainfrom
reviewable/react-v2-downscope
Draft

Minimal ReActV2 normalized adapter port#62
isaacbmiller wants to merge 4 commits into
mainfrom
reviewable/react-v2-downscope

Conversation

@isaacbmiller

Copy link
Copy Markdown

Summary

Replaces #59 with a downscoped four-commit stack on top of cmpnd/main.

Key pieces:

  • preserves the public adapter format() / format_demos() contract while keeping LMRequest as the adapter-to-LM boundary
  • adds ToolCallResults and native tool result message rendering without broadening History normalization
  • replays native tool-call history as assistant tool-call parts plus tool role result messages
  • adds ReActV2 with native tool-call support, submit fallback, error observations, and history recording

Commit stack:

  1. refactor(adapter): preserve public formatting through LMRequest
  2. feat(adapter): add tool call result types
  3. feat(adapter): replay tool call history
  4. feat(predict): add ReActV2

Validation

  • uv run --frozen ruff check dspy/adapters/base.py dspy/adapters/types/tool.py dspy/predict/reactv2.py tests/adapters/test_adapter_base.py tests/adapters/test_chat_adapter.py tests/adapters/test_tool.py tests/predict/test_reactv2.py
  • uv run --frozen pytest -q --tb=short tests/adapters/test_adapter_base.py tests/adapters/test_chat_adapter.py tests/adapters/test_json_adapter.py tests/adapters/test_tool.py tests/predict/test_reactv2.py
    • 147 passed
  • uv run --frozen pytest -q --tb=short
    • 924 passed, 323 skipped, 2 xfailed, 50 warnings

Note: local docs/reports/ files remain intentionally untracked and are not included in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant