Repository navigation
Deprecate CodeAct and ProgramOfThought - #10198
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019fed60-80a9-766c-80b3-73ee5487fe65 Co-authored-by: Isaac Miller <isaac@cmpnd.ai>
Greptile SummaryCodeAct and ProgramOfThought are being deprecated in favor of RLM, with constructor warnings, API documentation notices, and Flex documentation updated accordingly. The generated API documentation currently states the wrong release in which the deprecation began: it says 3.4 although this release is 3.3.0. Confidence Score: 4/5One non-security P1 documentation defect remains before merge. There is exactly one non-security P1 finding, so the score is 4. Files Needing Attention: dspy/predict/code_act.py; dspy/predict/program_of_thought.py
What T-Rex did
Reviews (3): Last reviewed commit: "Remove deprecated modules from Flex docs" | Re-trigger Greptile |
Amp-Thread-ID: https://ampcode.com/threads/T-019fed60-80a9-766c-80b3-73ee5487fe65 Co-authored-by: Isaac Miller <isaac@cmpnd.ai>
Amp-Thread-ID: https://ampcode.com/threads/T-019fed60-80a9-766c-80b3-73ee5487fe65 Co-authored-by: Isaac Miller <isaac@cmpnd.ai>
| .. deprecated:: 3.4 | ||
| CodeAct is deprecated. RLM is the preferred replacement. |
There was a problem hiding this comment.
Deprecation directive records the wrong release
This release is version 3.3.0, but the directive says 3.4. Generated API documentation will therefore tell users that CodeAct was deprecated in a later release than the one that actually introduced the deprecation. Update this directive and the matching directive in program_of_thought.py to .. deprecated:: 3.3.0; the separate 3.5 removal target can remain unchanged.
Artifacts
Deprecation directive check script
- This authored script extracts the two target directive versions from a selected Git revision and uses Sphinx when installed or a semantic fallback when unavailable, with the takeaway that it directly verifies each documented deprecated-since value.
Directive versions before clarification
- The executed check at commit 39b99b3 reports both target directives as deprecated since 3.5, with the takeaway that the original PR state did not document 3.3.0.
- The executed check at commit b243814 reports both target directives as deprecated since 3.4, with the takeaway that current PR code still documents the wrong introduction version.
Release metadata at introduction
- The executed Git capture at commit 39b99b3 shows `version="3.3.0"` and `__version__="3.3.0"`, with the takeaway that the deprecation was introduced in release 3.3.0.
Release metadata at current PR
- The executed Git capture at commit b243814 shows `version="3.3.0"` and `__version__="3.3.0"`, with the takeaway that the current PR remains a 3.3.0 release.
- The executed diff check exited successfully for both target files and release metadata, with the takeaway that validation did not modify tracked files.
Summary
CodeActorProgramOfThoughtRLMas the preferred replacementTesting
uv run --extra dev pytest --deno -q tests/predict/test_program_of_thought.py::test_pot_warns_that_rlm_is_preferred tests/predict/test_code_act.py::test_codeact_warns_that_rlm_is_preferreduv run --extra dev ruff check dspy/predict/program_of_thought.py dspy/predict/code_act.py tests/predict/test_program_of_thought.py tests/predict/test_code_act.pyuv run --extra dev ruff format --check dspy/predict/program_of_thought.py dspy/predict/code_act.py tests/predict/test_program_of_thought.py tests/predict/test_code_act.py