You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2baa123
Browse filesBrowse the repository at this point in the historyBrowse files
Fix what the pre-release review of the guard unification found (#75)
* Fix what the pre-release review of the guard unification found
- Converting the old guard settings happens once. The first start
records it in `security.legacy_converted`; old keys or the old column
showing up after that (an older version started against the database
writes its seeded defaults back) are removed with a warning, never
converted over the policies in force. Whatever the conversion leaves
out is logged.
- Audit events carry no text of the request. A content event names the
rule and counts the matches. A redaction event is one per rule per
request, with how many values and occurrences; only a built-in rule's
lists a few in masked form, a custom rule's values are not written.
At most 20 events per guard per request.
- Policy limits are back: 500 custom content rules of up to 500
characters, 100 redaction and 100 tool-call rules of up to 1,000, and
no custom tool-call rule named like a built-in one.
- Writing a guard policy takes `settings:write` and the guard's own
permission, as 2.2 required across server and console; the console's
write check asks for both.
- The output cap is applied per hop: a limit the request carries is
lowered, and one it does not is filled in only within what the
model's family is known to take. Converted caps are kept within it
too. The cache key carries the cap. A model request still setting
`output_guardrails` is refused instead of ignored.
- CHANGELOG: what to know before upgrading (no way back to 2.2, backups,
stopping replicas under Helm, stricter built-in PII rules, renamed
metrics, error type, permissions), and the Fixed entry corrected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Store a converted output cap as it converts
The upgrade lowered a converted cap to the 8,192 tokens (32,000 for
Claude) the gateway fills in for a request that sets no limit. That
lowered the limit of every request that set one above it too: a
100,000-byte cap on a non-Claude model, 25,000 tokens, started cutting
answers at 8,192, a tightening on upgrade alone.
The cap is now stored as it converts. The runtime rule stays: a
request's own limit is lowered to the cap, and a request with none gets
the cap only when it is within that family figure. The changelog says
what that means for requests that set no limit, and how to hold them to
a cap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Use core v0.59.0: the output cap knows OpenAI's own endpoint
thinkwatch-core v0.59.0 (ThinkWatch-Core#279) fixes three edge cases of
cap_max_output_tokens, which now takes whether the hop goes to the
vendor's own endpoint:
- a Chat request that sets both max_tokens and max_completion_tokens has
both lowered, not only the one the decoder reads first;
- one that sets neither is given max_completion_tokens on OpenAI's own
endpoint, whose reasoning models refuse max_tokens, and max_tokens
elsewhere;
- an Anthropic request with extended thinking has its budget lowered
below the cap too, or thinking dropped when the cap is 1,024 tokens or
less.
It also makes outbound redaction linear in the number of secrets in a
request. The gateway passes the same official flag the conversion gets.
The model form's hint and the changelog now say when a request that
sets no limit gets the cap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments