From 2ae738caa4a12fa18c2376fa571a4703db4daeee Mon Sep 17 00:00:00 2001 From: Kiran Kashalkar Date: Tue, 8 Sep 2026 00:34:27 -0400 Subject: [PATCH] guardrails(needlepath): default operating point is the current public label np-2026-08-r4 Co-Authored-By: Claude Fable 5.1 --- .../guardrails/guardrail_hooks/needlepath/needlepath.py | 2 +- .../types/proxy/guardrails/guardrail_hooks/needlepath.py | 2 +- .../proxy/guardrails/guardrail_hooks/test_needlepath.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/litellm/proxy/guardrails/guardrail_hooks/needlepath/needlepath.py b/litellm/proxy/guardrails/guardrail_hooks/needlepath/needlepath.py index 13c998fc163..dea326e7fa7 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/needlepath/needlepath.py +++ b/litellm/proxy/guardrails/guardrail_hooks/needlepath/needlepath.py @@ -65,7 +65,7 @@ SELECT_PATH: Final = "/v1/context/select" # Immutable engine label. Pinned rather than inherited from the service default # so an upgrade on the service side cannot change what this proxy sends without # an operator changing this config. -DEFAULT_OPERATING_POINT: Final = "np-2026-07-r2" +DEFAULT_OPERATING_POINT: Final = "np-2026-08-r4" DEFAULT_MAX_CONTEXT_TOKENS: Final = 4000 DEFAULT_MIN_CHARS_TO_SELECT: Final = 500 # The shared client's read timeout is measured in minutes, which is far too long diff --git a/litellm/types/proxy/guardrails/guardrail_hooks/needlepath.py b/litellm/types/proxy/guardrails/guardrail_hooks/needlepath.py index 429c05aa482..e085dce245e 100644 --- a/litellm/types/proxy/guardrails/guardrail_hooks/needlepath.py +++ b/litellm/types/proxy/guardrails/guardrail_hooks/needlepath.py @@ -29,7 +29,7 @@ class NeedlepathGuardrailOptionalParams(BaseModel): operating_point: str | None = Field( default=None, description=( - "Immutable engine label sent with every request. Defaults to 'np-2026-07-r2'. " + "Immutable engine label sent with every request. Defaults to 'np-2026-08-r4'. " "Pinned rather than inherited from the service default, so what this guardrail " "sends does not change underneath a deployment." ), diff --git a/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_needlepath.py b/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_needlepath.py index 1a019595042..bb805d4900c 100644 --- a/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_needlepath.py +++ b/tests/test_litellm/proxy/guardrails/guardrail_hooks/test_needlepath.py @@ -84,7 +84,7 @@ def _select_response( "tokens_before": 900, "tokens_after": tokens_after, "tokens_saved": 780, - "policy_version": "np-2026-07-r2", + "policy_version": "np-2026-08-r4", "gate": {"engaged": True, "reason": "engage:needle"} if gate is None else gate, } if not omit_rendered_context: @@ -138,7 +138,7 @@ def test_init_defaults(): assert g.min_chars_to_select == DEFAULT_MIN_CHARS_TO_SELECT == 500 assert g.max_context_tokens == DEFAULT_MAX_CONTEXT_TOKENS == 4000 # Pinned, not inherited from the service default. - assert g.operating_point == DEFAULT_OPERATING_POINT == "np-2026-07-r2" + assert g.operating_point == DEFAULT_OPERATING_POINT == "np-2026-08-r4" def test_init_rejects_non_http_api_base(): @@ -176,7 +176,7 @@ async def test_apply_guardrail_replaces_tool_output_with_rendered_context( assert payload["task"]["prompt"] == 'edgar_search: {"cik": "0000320193"}' assert payload["budget"] == { "max_context_tokens": 4000, - "operating_point": "np-2026-07-r2", + "operating_point": "np-2026-08-r4", } assert payload["render"] is True assert payload["render_format"] == "plain"