Skip to content

feat!: add codec-owned redaction editing and clean projection - #1745

Closed
bbednarski9 wants to merge 50 commits into
NVIDIA:mainfrom
bbednarski9:bbednarski/codec-pii-part-provenance
Closed

bbednarski9 wants to merge 50 commits into
NVIDIA:mainfrom
bbednarski9:bbednarski/codec-pii-part-provenance

Conversation

@bbednarski9

@bbednarski9 bbednarski9 commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Important

Manually stacked on #1730 — merge the parent PR first. This draft targets main because the parent branch exists only on the author's fork. GitHub's full diff therefore includes the parent work.

Review this layer: follow-up-only comparison. The description and validation below cover this follow-up. Reconcile this branch with main after #1730 lands, before merging this PR. This is a traditional manual stack, without GitHub stack submission.

Overview

Make codecs responsible for applying sanitized edits and constructing clean trajectory payloads in their own provider format. The PII component keeps detection, field selection, and replacement/removal policy.

Previously, normalized response sanitization and trajectory projection relied on provider-specific overlays and renderers inside pii-redaction. Custom/runtime codecs could not opt into those response and trajectory paths through their active codec handle. This change introduces explicit Rust capabilities and moves provider formatting, edit validation, and source mapping into nemo-relay-codecs.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

Two operations, with different input boundaries

Operation Inputs Responsibility
edit_request / edit_response Original provider payload plus NormalizedEdits Apply supported changes at their original positions and verify the normalized result.
project_request / project_response Approved sanitized annotation only Construct clean observability output without restoring fields from the original provider payload.

LlmCodec::redaction() and LlmResponseCodec::redaction() expose optional LlmRequestRedaction and LlmResponseRedaction capabilities. Each operation independently defaults to Ok(None); codec identity alone does not establish support. Active runtime and opaque Rust codecs can opt in without joining a PII provider allowlist.

flowchart TD
    Original["Original provider payload"] --> Decode["Active codec decodes"]
    Decode --> Baseline["Normalized baseline"]
    Baseline --> Policy["PII detection and policy"]
    Policy --> Sanitized["Sanitized normalized data"]
    Baseline --> Edits["NormalizedEdits: retain original array slots"]
    Sanitized --> Edits
    Original --> Edit["Codec source-aware editor"]
    Edits --> Edit
    Edit --> Edited["Verified sanitized provider payload"]
    Sanitized --> Project["Codec clean projector: no original payload"]
    Project --> Clean["Clean trajectory payload"]
    Edit -->|Unsupported or unsafe| Omit["Omit payload"]
    Project -->|Unsupported or unsafe| Omit
Loading

Provider ownership and edit provenance

  • Move provider overlays, clean renderers, and their provider-format tests from pii-redaction into codecs. All five existing built-in providers expose the capabilities.
  • Keep normalized array lengths and order through the sanitizer handoff. Removed entries remain null slots until the codec maps them to original source locations. These coordinates apply to one edit operation, not stable public edit handles.
  • Map mixed OpenAI Responses text/refusal parts to their original wire block paths. Removing leading parts and sanitizing a surviving tail preserves that tail's original block metadata and annotations.
  • Reject compacted handoffs, mismatched baselines, unsupported part-field edits, and ambiguous request-part deletions. Deleting a required text/refusal field still fails closed.
  • Require complete-output coverage when the policy selects normalized output or provider-specific output. Built-ins reject unmodeled extra choices/candidates in that case, including when the first result has no matching text.
  • Preserve the clean-projection boundary from fix: harden trajectory context redaction #991: renderers receive approved sanitized annotations, never original wire payloads.
  • Adapt the runtime's pricing wrapper so capabilities remain available while estimated cost stays runtime enrichment rather than becoming an original provider field.

Wire selectors and normalized selectors use the same original response. The PII policy reconciles their edits before the codec compacts arrays, so hashing applies once and raw annotation removals stay attached to the intended block. Provider overlays preserve untouched fields, including mixed tool calls and multiline text with citations.

The trajectory preset carries a policy’s approved custom projection through event publication. A later sanitizer that changes the payload invalidates that approval.

Compatibility and remaining scope

  • Behavior change for custom codecs: existing Rust implementations still compile because the new methods have defaults. However, custom codecs that previously relied only on request decode/encode for normalized PII sanitization must now explicitly opt into editing; otherwise that observability payload is omitted. Unsupported response/projection operations also omit the payload.
  • Custom Python request codecs can set supports_request_redaction = True to opt into verified edits through their source-preserving encoder. Google ADK uses this for request events. Response editing and clean projection through custom Python codecs, and custom codec opt-in in Node.js, C, and workers, remain follow-up work.
  • Generic raw-JSON sanitization remains independent of these capabilities. Normalized schemas/serialization and the borrowed content-read API are unchanged.
  • Caller-visible requests/responses are unchanged. This PR does not add PII detectors, live streaming editing, general mutable views, or comprehensive decoder-fidelity changes. Existing decoder text-block combining remains in place.

Validation at ea504ac50

  • The codec and PII Rust suites passed all 797 tests, including original-slot removals, mixed tool calls, single hashing, and custom projections delivered to subscribers.
  • just test-python-google-adk passed all 588 tests, including the request redaction regression.
  • just test-python passed 85 native tests, 1,693 Python tests, and 24 example tests. One Python test was skipped.
  • All eight commits passed their staged hooks, including the dependency audits. The Python lockfile now selects the patched wcmatch 11.2 release.
  • The local full Rust build stopped at the 4 GiB disk reserve. The full Rust test matrix passed on Linux (amd64 and arm64), macOS (arm64), and Windows (amd64 and arm64). All 71 executed jobs passed in GitHub Actions.

Where should the reviewer start?

  1. Redaction contracts and capability accessors: input boundaries, independent opt-in, and omission defaults.
  2. Provider-owned editor and regressions: source mapping, removal/metadata preservation, invalid handoffs, and built-in request/response coverage.
  3. PII delegation and component tests: policy ownership and custom/runtime capability routing.
  4. Pricing adapter, clean projection, and the migration guide.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

Expose consistent typed traversal and text extraction for normalized request items and response output.

BREAKING CHANGE: normalized text helpers return Option<Cow<str>>, join all text/refusal parts, and retain textless selection boundaries.

Signed-off-by: Bryan Bednarski <[email protected]>
Recognize Chat, Responses, and Anthropic message roles consistently when extension fields keep requests provider-native. Preserve payloads and textless selection boundaries, and exclude tool envelopes and metadata from text projection.

Signed-off-by: Bryan Bednarski <[email protected]>
Normalize OpenAI Chat and Responses refusals as typed content, accumulate Chat refusal deltas, and preserve refusal fields through PII overlays.

Signed-off-by: Bryan Bednarski <[email protected]>
Preserve multipart text and refusals without falling back to raw provider payloads. Keep empty annotations authoritative and retain existing media, opaque content, tool-call, and usage projections.

Signed-off-by: Bryan Bednarski <[email protected]>
Share text and refusal traversal for normalized instructions, history content, and response output. Keep trim and empty-content display rules, preserve JSON text literally, and exclude native reasoning, media, and tool payloads from default message text.

Signed-off-by: Bryan Bednarski <[email protected]>
Traverse normalized output through the borrowed view while retaining the explicit text/refusal allowlist. Reuse joined strings when building fresh provider projections and keep native values, media, and tool payloads excluded.

Signed-off-by: Bryan Bednarski <[email protected]>
Render OpenAI Chat content and refusal fields separately and preserve ordered text/refusal blocks in Responses. Retain empty values, fresh allowlisted payloads, and safe tool and usage projections; cover both response and event sanitizer paths.

Signed-off-by: Bryan Bednarski <[email protected]>
Keep profile and prompt IR rendering policies distinct while sharing normalized part traversal. Preserve existing fingerprints, empty-part behavior, and structured payload rendering without allocating an intermediate string vector.

Signed-off-by: Bryan Bednarski <[email protected]>
Retain media fingerprints and canonical structured values in prompt analysis, preserve block mapping and source-request reuse guards, and decline token-based hints when opaque costs are unknown.

BREAKING CHANGE: BlockContentType adds StructuredInput and Opaque. ACG learning and bootstrap state uses the ::acg-ir=2 namespace and warms up independently of older records.

Signed-off-by: Bryan Bednarski <[email protected]>
Expose message selection, typed parts, tool payload representations, normalized locations, and shared text extraction through read-only Python MessageView snapshots. Retain selected content independently of mutable annotations and materialize independent Python payload values on access.

Document snapshot ownership and add regression coverage for extraction parity, source locations, iterator lifetime, and mutation isolation.

Signed-off-by: Bryan Bednarski <[email protected]>
Add local dictionary-based message selection, typed content and tool payload views, normalized locations, and text extraction without requiring the main runtime extension or changing the worker protocol. Freeze only selected content and return independent Python payload values.

Document the worker API and verify parity with Rust-backed views, mutation isolation, standalone imports, and source locations.

Signed-off-by: Bryan Bednarski <[email protected]>
Expose codecs selection, discriminated content entries, tool payload views, normalized locations, and shared text extraction through a TypeScript facade over Rust-owned snapshots. Materialize independent JavaScript payload values only when accessed.

Cover every built-in provider, ownership isolation, extraction boundaries, and declaration narrowing. Document the API and support qualified namespace members in generated Node reference pages.

Signed-off-by: Bryan Bednarski <[email protected]>
Replace standalone Python selection and extraction policy with one authenticated, typed InspectLlmContent RPC. Centralize selection and owned projection in Rust, expose the operation in both worker SDKs, and keep returned snapshots locally readable without further host calls.

Worker content helpers now take an explicit runtime and are async. Existing dictionary callbacks, codec RPCs, and worker v1 identities are preserved; older hosts report unsupported inspection without a local fallback.

Cover typed payloads, source locations, auth/shutdown, cancellation, compatibility, and real installed-wheel worker round trips. Document the ownership and API migration.

Signed-off-by: Bryan Bednarski <[email protected]>
Cover removing leading normalized text and refusal parts, including removal of required text/refusal fields. The current backend must omit the response when a typed, position-preserving projection cannot be produced.

Follow-up: bbednarski/codec-pii-part-provenance, stacked on this branch. Preserve source-part identities through sanitizer handoff, provider overlay, and normalized-target verification so a sanitized tail can remain in its original provider block after leading text/refusal removal. Keep this broader refactor separate; no follow-up PR yet.

Review: NVIDIA#1730 (comment)
Signed-off-by: Bryan Bednarski <[email protected]>
Python and Node recreated content iterators and skipped previously returned parts on every access. Retain shared Rust cursor state for linear traversal and cursor checkpoints for constant-time retained-entry lookups, without cloning payloads or indexing all text up front.

Cover mixed multipart snapshots, independent iterators, borrowed strings, retained entries, and permanent exhaustion. Keep language-facing APIs and extraction policy unchanged.

Signed-off-by: Bryan Bednarski <[email protected]>
Check collisions against names present before resolving each namespace target, preserving all overloads and merged declarations from that target. Add generated-page coverage for both declarations and their documentation.

Signed-off-by: Bryan Bednarski <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions github-actions Bot added size:XXL PR is very large Feature a new feature breaking PR introduces a breaking change lang:js PR changes/introduces Javascript/Typescript code lang:python PR changes/introduces Python code labels Nov 15, 2026
@willkill07 willkill07 added this to the 1.0 milestone Nov 20, 2026
Expose optional request and response redaction capabilities through the active codec. Keep source-aware editing separate from clean projection without original provider payloads, and keep PII detection and policy in the sanitizer.

Move provider overlays and trajectory renderers into codecs. Carry normalized array slots through sanitization, map OpenAI Responses removals to original wire blocks, and reject unsupported or ambiguous edits. Preserve runtime pricing enrichment without treating estimated costs as provider fields.

Document Rust opt-in and remaining custom binding work. Validate affected module suites, Python, Node, docs, and repository hooks. The full Rust run passed 6924 tests; its remaining worker example passed after restoring the missing temporary Buf tool. Existing Python/npm dependency audits remain unchanged.

Signed-off-by: Bryan Bednarski <[email protected]>
@bbednarski9
bbednarski9 force-pushed the bbednarski/codec-pii-part-provenance branch from d198a2b to 3805ff2 Compare November 22, 2026 01:52
@github-actions github-actions Bot added the lang:go PR changes/introduces Go code label Nov 22, 2026
@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.43895% with 257 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.11%. Comparing base (711cdc2) to head (ea504ac).

Files with missing lines Patch % Lines
crates/codecs/src/redaction/mod.rs 78.18% 67 Missing ⚠️
crates/codecs/src/redaction/projection.rs 92.87% 33 Missing ⚠️
crates/pii-redaction/src/builtin.rs 80.87% 22 Missing ⚠️
crates/python/src/py_callable.rs 0.00% 19 Missing ⚠️
crates/codecs/src/redaction/overlay.rs 93.94% 18 Missing ⚠️
crates/codecs/src/openai_responses.rs 90.81% 17 Missing ⚠️
crates/python/src/py_types/content.rs 94.85% 12 Missing ⚠️
crates/runtime/src/codec.rs 75.00% 11 Missing ⚠️
crates/node/ts/codecs.ts 97.26% 9 Missing ⚠️
crates/worker/src/lib.rs 80.00% 9 Missing ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1745      +/-   ##
==========================================
+ Coverage   94.10%   94.11%   +0.01%     
==========================================
  Files         531      543      +12     
  Lines      168157   170545    +2388     
  Branches      153      236      +83     
==========================================
+ Hits       158233   160494    +2261     
- Misses       9923    10050     +127     
  Partials        1        1              
Components Coverage Δ
Rust Runtime 96.01% <90.32%> (-0.24%) ⬇️
Shared DTO Types 98.11% <98.65%> (+0.10%) ⬆️
CLI 91.58% <96.55%> (+<0.01%) ⬆️
Go Binding 94.26% <91.96%> (-0.02%) ⬇️
Python Binding 95.29% <88.73%> (-0.14%) ⬇️
Node Binding 99.24% <97.29%> (-0.37%) ⬇️
Dynamic Plugin SDKs 94.54% <97.05%> (+0.08%) ⬆️
Files with missing lines Coverage Δ
crates/adaptive/src/acg/canonicalize.rs 100.00% <100.00%> (ø)
crates/adaptive/src/acg/economics.rs 94.23% <100.00%> (-0.01%) ⬇️
crates/adaptive/src/acg/prompt_ir.rs 100.00% <100.00%> (ø)
crates/adaptive/src/acg/translation/anthropic.rs 98.91% <100.00%> (+<0.01%) ⬆️
crates/adaptive/src/acg/variable_extractor.rs 100.00% <100.00%> (ø)
crates/adaptive/src/acg_component.rs 92.28% <100.00%> (+0.01%) ⬆️
crates/adaptive/src/acg_learner.rs 98.97% <100.00%> (ø)
crates/adaptive/src/acg_profile.rs 99.57% <100.00%> (+0.03%) ⬆️
crates/adaptive/src/cache_diagnostics.rs 100.00% <100.00%> (ø)
crates/codecs/src/anthropic.rs 97.78% <100.00%> (+0.01%) ⬆️
... and 43 more

... and 9 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 711cdc2...ea504ac. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

bbednarski9 added a commit that referenced this pull request Nov 23, 2026
…#1801)

> [!IMPORTANT]
> This is the second layer of the codec refactor, based on #1800. The
Files changed tab shows the nine commits in this layer. Earlier review
discussions are in #1745.

#### Overview

Make codecs responsible for applying sanitized edits and constructing
clean trajectory payloads in their own provider format. The PII
component keeps detection, field selection, and replacement/removal
policy.

Previously, normalized response sanitization and trajectory projection
relied on provider-specific overlays and renderers inside
`pii-redaction`. Custom/runtime codecs could not opt into those response
and trajectory paths through their active codec handle. This change
introduces explicit Rust capabilities and moves provider formatting,
edit validation, and source mapping into `nemo-relay-codecs`.

- [x] I confirm this contribution is my own work, or I have the right to
submit it under this project's license.
- [x] I searched existing issues and open pull requests, and this does
not duplicate existing work.

#### Details

**Two operations, with different input boundaries**

| Operation | Inputs | Responsibility |
| --- | --- | --- |
| `edit_request` / `edit_response` | Original provider payload plus
`NormalizedEdits` | Apply supported changes at their original positions
and verify the normalized result. |
| `project_request` / `project_response` | Approved sanitized annotation
only | Construct clean observability output without restoring fields
from the original provider payload. |

`LlmCodec::redaction()` and `LlmResponseCodec::redaction()` expose
optional `LlmRequestRedaction` and `LlmResponseRedaction` capabilities.
Each operation independently defaults to `Ok(None)`; codec identity
alone does not establish support. Active runtime and opaque Rust codecs
can opt in without joining a PII provider allowlist.

```mermaid
flowchart TD
    Original["Original provider payload"] --> Decode["Active codec decodes"]
    Decode --> Baseline["Normalized baseline"]
    Baseline --> Policy["PII detection and policy"]
    Policy --> Sanitized["Sanitized normalized data"]
    Baseline --> Edits["NormalizedEdits: retain original array slots"]
    Sanitized --> Edits
    Original --> Edit["Codec source-aware editor"]
    Edits --> Edit
    Edit --> Edited["Verified sanitized provider payload"]
    Sanitized --> Project["Codec clean projector: no original payload"]
    Project --> Clean["Clean trajectory payload"]
    Edit -->|Unsupported or unsafe| Omit["Omit payload"]
    Project -->|Unsupported or unsafe| Omit
```

**Provider ownership and edit provenance**

- Move provider overlays, clean renderers, and their provider-format
tests from `pii-redaction` into `codecs`. All five existing built-in
providers expose the capabilities.
- Keep normalized array lengths and order through the sanitizer handoff.
Removed entries remain null slots until the codec maps them to original
source locations. These coordinates apply to one edit operation, not
stable public edit handles.
- Map mixed OpenAI Responses text/refusal parts to their original wire
block paths. Removing leading parts and sanitizing a surviving tail
preserves that tail's original block metadata and annotations.
- Reject compacted handoffs, mismatched baselines, unsupported
part-field edits, and ambiguous request-part deletions. Deleting a
required text/refusal field still fails closed.
- Require complete-output coverage when the policy selects normalized
output or provider-specific output. Built-ins reject unmodeled extra
choices/candidates in that case, including when the first result has no
matching text.
- Preserve the clean-projection boundary from #991: renderers receive
approved sanitized annotations, never original wire payloads.
- Adapt the runtime's pricing wrapper so capabilities remain available
while estimated cost stays runtime enrichment rather than becoming an
original provider field.

Wire selectors and normalized selectors use the same original response.
The PII policy reconciles their edits before the codec compacts arrays,
so hashing applies once and raw annotation removals stay attached to the
intended block. Provider overlays preserve untouched fields, including
mixed tool calls and multiline text with citations.

The trajectory preset carries a policy’s approved custom projection
through event publication. A later sanitizer that changes the payload
invalidates that approval.

**Compatibility and remaining scope**

- **Behavior change for custom codecs:** existing Rust implementations
still compile because the new methods have defaults. However, custom
codecs that previously relied only on request decode/encode for
normalized PII sanitization must now explicitly opt into editing;
otherwise that observability payload is omitted. Unsupported
response/projection operations also omit the payload.
- Custom Python request codecs can set `supports_request_redaction =
True` to opt into verified edits through their source-preserving
encoder. Google ADK uses this for request events. Response editing and
clean projection through custom Python codecs, and custom codec opt-in
in Node.js, C, and workers, remain follow-up work.
- Generic raw-JSON sanitization remains independent of these
capabilities. Normalized schemas/serialization and the borrowed
content-read API are unchanged.
- Caller-visible requests/responses are unchanged. This PR does not add
PII detectors, live streaming editing, general mutable views, or
comprehensive decoder-fidelity changes. Existing decoder text-block
combining remains in place.

**Validation at `ea504ac50`**

- The codec and PII Rust suites passed all 797 tests, including
original-slot removals, mixed tool calls, single hashing, and custom
projections delivered to subscribers.
- `just test-python-google-adk` passed all 588 tests, including the
request redaction regression.
- `just test-python` passed 85 native tests, 1,693 Python tests, and 24
example tests. One Python test was skipped.
- All eight commits passed their staged hooks, including the dependency
audits. The Python lockfile now selects the patched `wcmatch 11.2`
release.
- The local full Rust build stopped at the 4 GiB disk reserve. The full
Rust test matrix passed on Linux (amd64 and arm64), macOS (arm64), and
Windows (amd64 and arm64). All 71 executed jobs passed in [GitHub
Actions](https://github.com/NVIDIA/NeMo-Relay/actions/runs/44985247884).

#### Where should the reviewer start?

1. [Redaction
contracts](https://github.com/NVIDIA/NeMo-Relay/blob/ea504ac506b3173b22df53e465740bdcdd36e777/crates/types/src/codec/redaction.rs)
and [capability
accessors](https://github.com/NVIDIA/NeMo-Relay/blob/ea504ac506b3173b22df53e465740bdcdd36e777/crates/types/src/codec/traits.rs):
input boundaries, independent opt-in, and omission defaults.
2. [Provider-owned
editor](https://github.com/NVIDIA/NeMo-Relay/blob/ea504ac506b3173b22df53e465740bdcdd36e777/crates/codecs/src/redaction/mod.rs)
and
[regressions](https://github.com/NVIDIA/NeMo-Relay/blob/ea504ac506b3173b22df53e465740bdcdd36e777/crates/codecs/tests/unit/redaction_tests.rs):
source mapping, removal/metadata preservation, invalid handoffs, and
built-in request/response coverage.
3. [PII
delegation](https://github.com/NVIDIA/NeMo-Relay/blob/ea504ac506b3173b22df53e465740bdcdd36e777/crates/pii-redaction/src/builtin.rs)
and [component
tests](https://github.com/NVIDIA/NeMo-Relay/blob/ea504ac506b3173b22df53e465740bdcdd36e777/crates/pii-redaction/tests/unit/component_tests.rs):
policy ownership and custom/runtime capability routing.
4. [Pricing
adapter](https://github.com/NVIDIA/NeMo-Relay/blob/ea504ac506b3173b22df53e465740bdcdd36e777/crates/runtime/src/codec.rs),
[clean
projection](https://github.com/NVIDIA/NeMo-Relay/blob/ea504ac506b3173b22df53e465740bdcdd36e777/crates/codecs/src/redaction/projection.rs),
and the [migration
guide](https://github.com/NVIDIA/NeMo-Relay/blob/ea504ac506b3173b22df53e465740bdcdd36e777/docs/integrate-into-frameworks/provider-codecs.mdx#codec-owned-redaction-in-rust).

#### Related Issues: (use one of the action keywords Closes / Fixes /
Resolves / Relates to)

- Relates to #1800 — prerequisite content APIs and existing projection
fixes.
- Relates to #991 — preserves the sanitized-only trajectory projection
boundary.
- Relates to: PII redaction from codec traits + APIs. No issue number
was supplied; this PR does not automatically close an issue.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

- **New Features**
- Built-in provider codecs can apply supported request and response
redactions while retaining compatible provider data.
- Supported codecs can generate sanitized request and response
projections for managed trajectory data. Governed payloads are omitted
when required redaction support or a safe projection is unavailable.
- Python request codecs can opt in to verified redaction; ambiguous
repeated Google ADK function calls are rejected.
- Custom Rust codecs can provide redaction and projection support for
their own formats.
  - OCI GenAI model selection now follows the configured serving type.

- **Documentation**
- Added guidance on codec redaction, projection behavior, and
limitations for custom codecs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Bryan Bednarski <[email protected]>

This branch was previously deployed

1 inactive deployment
fern — ea504ac5 Deployed Nov 22, 2026 by copy-pr-bot[bot] via Preview docs #7532
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking PR introduces a breaking change Feature a new feature lang:go PR changes/introduces Go code lang:js PR changes/introduces Javascript/Typescript code lang:python PR changes/introduces Python code lang:rust PR changes/introduces Rust code size:XXL PR is very large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants