mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
guardrails(needlepath): default operating point is the current public label np-2026-08-r4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
225f3065f2
commit
2ae738caa4
3 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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."
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue