diff --git a/.env.template b/.env.template index 71f1b969..3573637d 100644 --- a/.env.template +++ b/.env.template @@ -113,6 +113,7 @@ LLM_OPENAI_API_KEY=your-api-key-here # DERIVER_MODEL_CONFIG__MAX_OUTPUT_TOKENS=4096 # DERIVER_LOG_OBSERVATIONS=false # DERIVER_MAX_INPUT_TOKENS=25000 +# Required for non-blank reasoning.custom_instructions; unset disables non-blank custom instructions # DERIVER_MAX_CUSTOM_INSTRUCTIONS_TOKENS=2000 # DERIVER_WORKING_REPRESENTATION_MAX_OBSERVATIONS=100 # DERIVER_REPRESENTATION_BATCH_MAX_TOKENS=1024 diff --git a/tests/test_config.py b/tests/test_config.py index 6b38ba5b..f18efb4b 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -36,11 +36,10 @@ def test_effective_custom_instructions_tokens_uses_explicit_limit() -> None: assert settings.effective_max_custom_instructions_tokens == 2000 -def test_deriver_defaults_allow_larger_custom_instruction_budget() -> None: - settings = _make_deriver_settings(MAX_CUSTOM_INSTRUCTIONS_TOKENS=2000) +def test_deriver_default_input_budget_accommodates_custom_instruction_cap() -> None: + settings = _make_deriver_settings() assert settings.MAX_INPUT_TOKENS == 25000 - assert settings.effective_max_custom_instructions_tokens == 2000 def test_custom_instructions_tokens_cannot_exceed_input_budget() -> None: diff --git a/tests/utils/test_config_helpers.py b/tests/utils/test_config_helpers.py index 7ad602f3..fb1551cc 100644 --- a/tests/utils/test_config_helpers.py +++ b/tests/utils/test_config_helpers.py @@ -23,9 +23,7 @@ def _session(configuration: dict[str, Any]) -> models.Session: def test_preserves_workspace_custom_instructions( monkeypatch: pytest.MonkeyPatch, ) -> None: - monkeypatch.setattr( - settings.DERIVER, "MAX_CUSTOM_INSTRUCTIONS_TOKENS", 100, raising=False - ) + monkeypatch.setattr(settings.DERIVER, "MAX_CUSTOM_INSTRUCTIONS_TOKENS", 100) workspace = _workspace( { @@ -46,9 +44,7 @@ def test_preserves_workspace_custom_instructions( def test_message_custom_instructions_override_session_and_workspace( monkeypatch: pytest.MonkeyPatch, ) -> None: - monkeypatch.setattr( - settings.DERIVER, "MAX_CUSTOM_INSTRUCTIONS_TOKENS", 100, raising=False - ) + monkeypatch.setattr(settings.DERIVER, "MAX_CUSTOM_INSTRUCTIONS_TOKENS", 100) workspace = _workspace( {