feat(issue-652): wire effort + task_budget to Anthropic output_config - #669
Merged
Conversation
Adds _load_config_dict() helper to ClaudeSDKExecutor and wires the new effort and task_budget config fields into _build_options() before the Anthropic API call: - effort (str): low|medium|high|xhigh|max — populates output_config.effort - task_budget (int): advisory total-token budget; must be >= 20000 when set; automatically adds task-budgets-2026-03-13 beta header Also adds WorkspaceConfig.effort and WorkspaceConfig.task_budget fields in config.py and 5 acceptance tests covering all code paths. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 tasks
Cover the four paths that were exercised only via mock in the
_build_options tests: valid YAML, missing file, malformed YAML,
and empty file (safe_load → None → {} via `or {}`).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
molecule-ai Bot
added a commit
that referenced
this pull request
Apr 21, 2026
…dget-v2 feat(issue-652): wire effort + task_budget to Anthropic output_config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
effort(low/medium/high/xhigh/max) fromconfig.yamlintooutput_config.efforton the Anthropic API calltask_budget(int, must be ≥ 20000) intooutput_config.task_budgetwithtype: tokenstask-budgets-2026-03-13beta header whentask_budgetis settask_budgetwith a clearValueErrorbefore any API calleffortandtask_budgetfields toWorkspaceConfiginconfig.pyFiles changed (3 files, 150 lines)
workspace-template/claude_sdk_executor.py—_load_config_dict()helper +_build_options()wiringworkspace-template/config.py—WorkspaceConfig.effortandWorkspaceConfig.task_budgetfieldsworkspace-template/tests/test_claude_sdk_executor.py— 5 acceptance tests covering all pathsTest plan
test_build_options_effort_only_sets_output_config_no_beta— effort only, no beta headertest_build_options_task_budget_sets_output_config_and_beta— task_budget ≥ 20K adds betatest_build_options_both_effort_and_task_budget— combined output_config + betatest_build_options_neither_effort_nor_task_budget_no_output_config— empty config → no output_configtest_build_options_task_budget_below_minimum_raises_value_error— < 20K → ValueError53 tests pass (
pytest tests/test_claude_sdk_executor.py).Replaces #657 (closed — that branch was contaminated with audit-ledger files from being branched off feat/issue-594-audit-ledger instead of main).
🤖 Generated with Claude Code