Skip to content

Deprecate CodeAct and ProgramOfThought - #10198

Merged
isaacbmiller merged 3 commits into
mainfrom
deprecate-codeact-program-of-thought
Aug 11, 2026
Merged

isaacbmiller merged 3 commits into
mainfrom
deprecate-codeact-program-of-thought

Conversation

@isaacbmiller

Copy link
Copy Markdown
Collaborator

Summary

  • emit deprecation warnings when constructing CodeAct or ProgramOfThought
  • schedule both modules for removal in DSPy 3.5 and recommend RLM as the preferred replacement
  • add API documentation notices and regression tests for the warning messages

Testing

  • 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_preferred
  • uv 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.py
  • uv 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

@isaacbmiller isaacbmiller added the 3.4 Changes targeted for DSPy 3.4 label Aug 11, 2026
@greptile-apps

greptile-apps Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

CodeAct 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/5

One 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

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced a proof for the posted P1 finding and linked it to the review comment detailing the finding.
  • T-Rex executed the deprecation directive check script as part of the proof validation.
  • T-Rex compared directive versions before clarification with current versions to validate the directive evolution.
  • T-Rex captured release metadata at introduction and at the current PR to verify context and scope.
  • T-Rex performed a tracked files unchanged check to verify no unintended changes were introduced.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (3): Last reviewed commit: "Remove deprecated modules from Flex docs" | Re-trigger Greptile

Comment thread dspy/predict/code_act.py Outdated
ampagent and others added 2 commits August 11, 2026 16:28
Comment thread dspy/predict/code_act.py
Comment on lines +19 to +20
.. deprecated:: 3.4
CodeAct is deprecated. RLM is the preferred replacement.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Current directive versions

  • 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.

Tracked files unchanged check

  • The executed diff check exited successfully for both target files and release metadata, with the takeaway that validation did not modify tracked files.

View artifacts

T-Rex Ran code and verified through T-Rex

@isaacbmiller
isaacbmiller merged commit 99bb44b into main Aug 11, 2026
22 checks passed
@isaacbmiller
isaacbmiller deleted the deprecate-codeact-program-of-thought branch August 11, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.4 Changes targeted for DSPy 3.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants