duet-cli 0.2.11__tar.gz → 0.2.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: duet-cli
3
- Version: 0.2.11
3
+ Version: 0.2.12
4
4
  Summary: Two CLI agents in conversation. One Python file. Stdlib only.
5
5
  Author: Volkan Altan
6
6
  License-Expression: MIT
@@ -63,7 +63,7 @@ from typing import Callable, Iterable, Optional
63
63
 
64
64
  # ---------- defaults ----------
65
65
 
66
- __version__ = "0.2.11"
66
+ __version__ = "0.2.12"
67
67
 
68
68
  DEFAULT_SENTINEL = "<<<LGTM>>>"
69
69
  DEFAULT_SANDBOX = "workspace-write"
@@ -274,16 +274,17 @@ CLAUDE_REASONING_MAP = {
274
274
  }
275
275
 
276
276
  # Codex CLI takes a config override `-c model_reasoning_effort=<value>`.
277
- # Its accepted values, lowest→highest, are: minimal, low, medium, high, xhigh.
278
- # We also map duet's `max` alias to Codex's `xhigh` because Codex does not
279
- # document a separate `max` effort value.
277
+ # Pass every duet level through unchanged. Codex support is model-specific, so
278
+ # its model resolver must reject an unsupported value instead of duet silently
279
+ # changing the requested effort. Always emit an explicit requested value: a
280
+ # model's native default is not necessarily `medium`.
280
281
  CODEX_REASONING_MAP = {
281
282
  "minimal": "minimal",
282
283
  "low": "low",
283
284
  "medium": "medium",
284
285
  "high": "high",
285
286
  "xhigh": "xhigh",
286
- "max": "xhigh",
287
+ "max": "max",
287
288
  }
288
289
 
289
290
  # Gemini CLI does not expose a documented reasoning-effort flag. Keep the duet
@@ -1424,10 +1425,7 @@ def call_codex(agent: Agent, system_prompt: str, message: str,
1424
1425
  reasoning_args: list[str] = []
1425
1426
  if effective:
1426
1427
  codex_value = backend_adapter("codex").reasoning_map.get(effective, effective)
1427
- # `medium` is Codex's default; only override when we actually want a
1428
- # different effort level.
1429
- if codex_value != "medium":
1430
- reasoning_args = ["-c", f"model_reasoning_effort={codex_value}"]
1428
+ reasoning_args = ["-c", f"model_reasoning_effort={codex_value}"]
1431
1429
  if fast:
1432
1430
  # Concise reasoning summaries cut output volume and time-to-first-token
1433
1431
  # on Codex turns. Pairs with low effort above; together they're the
@@ -5074,8 +5072,8 @@ def _build_arg_parser() -> argparse.ArgumentParser:
5074
5072
  "`add_dirs:` (list).")
5075
5073
  ap.add_argument("--reasoning", choices=REASONING_LEVELS, default=None,
5076
5074
  help="reasoning effort for both agents. Codex: passes "
5077
- "`-c model_reasoning_effort=<v>` except for medium "
5078
- "(max → xhigh). Claude: passes `--effort <v>` "
5075
+ "`-c model_reasoning_effort=<v>` unchanged. Claude: "
5076
+ "passes `--effort <v>` "
5079
5077
  "(minimal → low) and adds high/xhigh/max prompt nudges. "
5080
5078
  "Copilot: passes `--effort <v>` (minimal → none). "
5081
5079
  "Gemini: no effort flag; high/xhigh/max are prompt nudges only.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: duet-cli
3
- Version: 0.2.11
3
+ Version: 0.2.12
4
4
  Summary: Two CLI agents in conversation. One Python file. Stdlib only.
5
5
  Author: Volkan Altan
6
6
  License-Expression: MIT
@@ -1045,10 +1045,13 @@ class TestReasoningHelpers(unittest.TestCase):
1045
1045
  self.assertIn(level, duet.COPILOT_REASONING_PROMPT_PREFIX)
1046
1046
  self.assertIn(level, duet.OPENCODE_REASONING_PROMPT_PREFIX)
1047
1047
 
1048
- def test_codex_max_maps_to_xhigh(self) -> None:
1049
- # Codex documents `xhigh` but not `max`; duet keeps `max` as a
1050
- # backend-normalized alias for the highest Codex effort.
1051
- self.assertEqual(duet.CODEX_REASONING_MAP["max"], "xhigh")
1048
+ def test_codex_reasoning_levels_pass_through_exactly(self) -> None:
1049
+ # Model support varies. Duet must not silently change the requested
1050
+ # value before Codex validates it for the selected model.
1051
+ self.assertEqual(
1052
+ duet.CODEX_REASONING_MAP,
1053
+ {level: level for level in duet.REASONING_LEVELS},
1054
+ )
1052
1055
 
1053
1056
 
1054
1057
  class TestAgentExitError(unittest.TestCase):
File without changes
File without changes
File without changes
File without changes