Skip to content

feat(gateway): enable steering and memory defaults - #2774

Merged
hidb4ai merged 2 commits into
oceanbase:masterfrom
frf12:codex/gateway-default-memory-steering
Nov 23, 2026
Merged

hidb4ai merged 2 commits into
oceanbase:masterfrom
frf12:codex/gateway-default-memory-steering

Conversation

@frf12

@frf12 frf12 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Which issue or RFC does this PR close?

Related: #2411, #2413, #2729; Gateway RFC 2199.

Rationale for this change

Gateway deployments currently need separate opt-ins for steering, cached-prefix extraction, and one-pass memory processing. Enable these existing features by default where supported, with explicit overrides to retain the previous behavior.

What changes are included in this PR?

  • Bundle the tested Jasper cost-guidance text for Responses requests. PC_GATEWAY_STEERING_FILE replaces it; PC_GATEWAY_STEERING=off disables steering without reading a configured file. Chat requests are unchanged. A file-specific License Eye exclusion preserves the prompt bytes.
  • Default prefix extraction on for supported upstreams. PC_GATEWAY_PREFIX_EXTRACTION=off disables it. Preserve the existing subscription boundary: Codex requires Core to be confirmed as non-enforcing; other subscriptions remain unsupported. Source capture still requires PC_GATEWAY_SEDIMENT=on.
  • When the Server's existing inference.prefix_extraction_gateway_url is configured and no processing mode was supplied, default Atomic Memory to one_pass. Preserve explicit modes, configuration precedence, and the SDK/non-Gateway per_candidate default.
  • Document defaults, opt-outs, Codex support, and one-pass Agent-prefix reuse consistently with the existing implementation. Add process-level coverage for the default switches and subscription boundary.

Are there any user-facing changes?

Responses requests include the bundled guidance unless disabled or replaced. The steering and prefix switches accept only on or off when set; invalid values fail startup. Set POWERCONTEXT_SERVER_RUNTIME_ATOMIC_MEMORY_PROCESSING_MODE=per_candidate to retain per-candidate processing on a Server configured with the Gateway callback.

The callback URL and generation model must still be configured on Core. No HTTP API or persisted-format changes, deployments, or paid benchmark reruns are included.

How was this change tested?

  • Python Server, one-pass and prefixed-extraction tests: 144 passed.
  • make check: passed, including pre-commit checks, both type-check targets and integration manifest tests.
  • make docs-test: passed, including the static build and verification of 1,132 public pages and their internal links.
  • Pinned License Eye: reproduced the prompt-file failure without the exclusion, then passed the full header check with the narrow exclusion; the prompt's SHA-256 remains unchanged.
  • Rust 1.95.0: cargo fmt --manifest-path gateway/Cargo.toml --all --check and cargo clippy --locked --manifest-path gateway/Cargo.toml -p pc-gateway-app --all-targets -- -D warnings passed.
  • The actual Gateway binary passed nine local HTTP startup scenarios covering ordinary upstreams, Codex non-enforcing/enforcing Core, unsupported subscriptions, and explicit disablement. Fixtures used synthetic credentials and a local scripted Core; no provider request was sent.
  • CI for 95d25ce0b passed: 54 jobs succeeded and 24 were intentionally skipped. This includes the full Gateway Rust workspace tests, Clippy, protocol compatibility, Python tests, documentation, upgrade, installation, host integration and candidate-package validation. Local macOS terminated the Rust test executable with SIGKILL; the CI run provides the completed automated Rust execution result.

Local verification does not establish provider cache-hit rates or subscription costs.

AI usage statement

OpenAI Codex assisted with implementation, tests, documentation, and independent code review.

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new bundled text currently blocks CI preflight; please fix the license-check handling before merging. See the inline finding.

@frf12 frf12 added the 1.6.0 v1.6.0 release tracking label Nov 23, 2026
@hidb4ai
hidb4ai merged commit adf9a48 into oceanbase:master Nov 23, 2026
79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6.0 v1.6.0 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants