Skip to content

Introduce InterceptorOverrides in the chain execution model#24

Open
jeongukjae wants to merge 2 commits into
mainfrom
interceptor-overrides
Open

Introduce InterceptorOverrides in the chain execution model#24
jeongukjae wants to merge 2 commits into
mainfrom
interceptor-overrides

Conversation

@jeongukjae

@jeongukjae jeongukjae commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Introduce InterceptorOverrides in the chain execution model to separate interceptor capability (server-declared) from execution policy (invoker-declared).

Why

The SEP currently locks all execution policy (failOpen, priorityHint, mode) into the interceptor's own definition. This means:

  • If an interceptor declares failOpen: false but is known to be flaky in your deployment, you can't make it fail-open without changing the server
  • If you want the same interceptor in audit mode in staging but active in production, there's no mechanism
  • If you want to restrict an interceptor to only tools/call even though it declares support for tools/call + llm/completion, you have to invoke it and hope the chain filters correctly
  • Priority is fixed by the author, so platform teams can't reorder interceptors for their deployment topology

In short: the chain interface had no policy layer, making it impractical for real-world multi-environment deployments.

Changes

  1. New "Capability vs Policy" subsection explaining the two-layer model
  2. New InterceptorOverrides interface (failOpen, priorityHint, mode, timeoutMs, hooks)
  3. ChainEntry gains overrides?: InterceptorOverrides
  4. resolvePriority() updated to check overrides first
  5. Orchestration steps updated — new step 2 "Resolve Policy"
  6. New example showing overrides in action (priority override, mode promotion, fail-open for fragile interceptor)
  7. New rationale entry (Design Decision 4) explaining why both layers exist

…te interceptor capability (server-declared) from execution policy (invoker-declared)

Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
@jeongukjae jeongukjae marked this pull request as ready for review June 17, 2026 10:12

@PederHP PederHP left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants