chore: address custom instruction review nits

This commit is contained in:
adavyas 2026-04-23 19:33:53 -07:00
parent fde9389040
commit ac998ab5ca
3 changed files with 5 additions and 9 deletions

View File

@ -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

View File

@ -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:

View File

@ -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(
{