Skip to content

feat: migrate framework imports to llm-d IPP#331

Merged
yossiovadia merged 4 commits into
opendatahub-io:mainfrom
noyitz:feat/migrate-to-ipp-framework
Jun 17, 2026
Merged

feat: migrate framework imports to llm-d IPP#331
yossiovadia merged 4 commits into
opendatahub-io:mainfrom
noyitz:feat/migrate-to-ipp-framework

Conversation

@noyitz

@noyitz noyitz commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrate all plugin and runner imports from sigs.k8s.io/gateway-api-inference-extension to github.com/llm-d/llm-d-inference-payload-processor
  • This switches the MaaS binary to use the IPP runner, which includes the streaming response body mode framework
  • 25 files updated, no logic changes — pure import migration

Depends on: llm-d/llm-d-inference-payload-processor#169 (response body mode framework)

Why

The MaaS binary was using the old BBR runner from gateway-api-inference-extension, which always buffers all response body chunks. The active framework at llm-d/llm-d-inference-payload-processor has streaming support (per-profile conditional buffering, ChunkProcessor) that only takes effect when the ODH plugins use the IPP types.

Import mapping

Old New
gateway-api-inference-extension/pkg/bbr/framework llm-d-inference-payload-processor/pkg/framework/interface/requesthandling
gateway-api-inference-extension/pkg/epp/framework/interface/plugin llm-d-inference-payload-processor/pkg/framework/interface/plugin
gateway-api-inference-extension/pkg/common/error llm-d-inference-payload-processor/pkg/common/error
gateway-api-inference-extension/pkg/common/observability/logging llm-d-inference-payload-processor/pkg/common/observability/logging
gateway-api-inference-extension/cmd/bbr/runner llm-d-inference-payload-processor/cmd/runner

go.mod

  • Added github.com/llm-d/llm-d-inference-payload-processor (local replace directive until version is published)
  • gateway-api-inference-extension is fully removed from go.mod

Test plan

  • go build ./... passes
  • All plugin tests pass (api-translation, apikey-injection, model-provider-resolver, nemo)
  • legacymigration test requires envtest (kubebuilder binaries) — pre-existing, unrelated to this change

Summary by CodeRabbit

  • Refactor

    • Migrated plugin wiring and request/response processing interfaces from Gateway API Inference Extension to LLM-D Inference Payload Processor across API translation, API key injection, model provider resolution, and NeMo request/response guards (including cycle-state handling changes).
    • Updated translators and auth/header generation to use the payload-processor shared error types (OpenAI/Anthropic/Vertex/Bedrock).
  • Chores

    • Updated Helm and e2e configurations from upstreamBbr to upstreamIpp, including RBAC naming and payload-processing chart wiring; refreshed build metadata and Go module dependencies; updated .gitignore.
  • Tests

    • Updated unit and e2e test scaffolding to use the new request/response and cycle-state types.

@openshift-ci
openshift-ci Bot requested review from szedan-rh and yossiovadia June 16, 2026 00:49
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 16, 2026
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: b0c00366-4425-4559-837d-fe284a2e64ea

📥 Commits

Reviewing files that changed from the base of the PR and between ed9e33d and 7b30750.

📒 Files selected for processing (1)
  • deploy/payload-processing/values.yaml

📝 Walkthrough

Walkthrough

All plugins (api-translation, apikey-injection, model-provider-resolver, nemo request/response guard) are migrated from sigs.k8s.io/gateway-api-inference-extension framework interfaces to github.com/llm-d/llm-d-inference-payload-processor plugin/requesthandling interfaces. Factory functions now accept plugin.Handle and return plugin.Plugin; ProcessRequest/ProcessResponse accept *plugin.CycleState and *requesthandling.InferenceRequest/InferenceResponse; all framework.ReadCycleStateKey calls become plugin.ReadCycleStateKey. errcommon and logutil import paths in translators and reconcilers are redirected to the new module. go.mod adds llm-d-inference-payload-processor v0.1.0-rc.1 as a direct dependency and moves aws-sdk-go-v2 from indirect to direct. cmd/main.go switches the runner import to the local package. Helm charts, values, and e2e test configurations are rewritten to reference upstreamIpp.payloadProcessor instead of upstreamBbr.bbr. All tests are updated to use the new constructors and cycle-state helpers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~28 minutes

🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately describes the primary change: migrating framework imports from gateway-api-inference-extension to llm-d-inference-payload-processor (IPP).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Contribution Quality And Spam Detection ✅ Passed Legitimate framework migration with no spam signals: 25+ file scope across plugins/runners/deployment, tests properly updated, referenced upstream PR dependency, zero security-theater language or t...
No Hardcoded Secrets ✅ Passed No hardcoded secrets found. Test-only AWS documentation examples verified (AKIAIOSFODNN7EXAMPLE, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). No fork URLs, base64 secrets, CI/CD credentials, or embed...
No Weak Cryptography ✅ Passed No weak cryptography detected. SHA256 used only for AWS SigV4 signing via standard library. No insecure algorithms (MD5, SHA1, DES, RC4, ECB), custom crypto, or non-constant-time secret comparisons...
No Injection Vectors ✅ Passed No injection vectors (CWE-89, CWE-78, CWE-94, CWE-502, CWE-79) detected. All json.Unmarshal uses typed structs; Dockerfile ldflags construction is safe (hardcoded package path, quoted build args);...
No Privileged Containers ✅ Passed No privileged containers, elevated capabilities, or root-run configurations found in PR-modified files. Both Dockerfiles run final images as UID 1001. Deployment pod security context is handled by...
No Sensitive Data In Logs ✅ Passed PR contains no new logging statements that expose sensitive data. All logging references authType/provider names only, not credentials, tokens, or raw request/response bodies. This is a pure import...

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nirrozenbaum nirrozenbaum 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.

go.mod: local replace directive must be removed before merge

The replace directive points to a local filesystem path:

replace github.com/llm-d/llm-d-inference-payload-processor => ../llm-d-inference-payload-processor

This will break for anyone cloning the repo. The module is already published — remove the replace directive and use a real version in the require block instead:

require (
    github.com/llm-d/llm-d-inference-payload-processor v0.0.0-20260609111331-11891e132621
)

To fix:

  1. Delete the replace github.com/llm-d/llm-d-inference-payload-processor => ../llm-d-inference-payload-processor line from go.mod
  2. Run go get github.com/llm-d/llm-d-inference-payload-processor@latest
  3. Run go mod tidy
  4. Verify with go build ./...

@noyitz

noyitz commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Fixed — replaced local path with fork URL (github.com/noyitz/llm-d-inference-payload-processor@ca1985b).

Can't point to upstream main yet because the ResponseBodyMode types are in PR llm-d/llm-d-inference-payload-processor#169 which hasn't merged. The replace directive will be removed once #169 lands upstream.

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/plugins/model-provider-resolver/plugin.go (1)

177-177: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Prevent request-path panic when provider refs are empty or non-positive weight.

Line 177 can reach selectByWeight with invalid refs; then Line 216 executes rand.IntN(totalWeight) and panics when len(refs)==0 or totalWeight<=0 (CWE-20, CWE-248). This is a straightforward denial-of-service trigger via malformed CR spec data on the hot request path.

Suggested fix
 func (p *ModelProviderResolverPlugin) ProcessRequest(ctx context.Context, cycleState *plugin.CycleState, request *requesthandling.InferenceRequest) error {
@@
-	ref := selectByWeight(modelInfo.refs)
+	if len(modelInfo.refs) == 0 {
+		logger.Error(nil, "no provider refs resolved for external model", "model", modelKey.String())
+		return errcommon.Error{Code: errcommon.Internal, Msg: "no provider refs resolved for external model"}
+	}
+	ref, err := selectByWeight(modelInfo.refs)
+	if err != nil {
+		logger.Error(err, "invalid provider refs for weighted selection", "model", modelKey.String())
+		return errcommon.Error{Code: errcommon.Internal, Msg: err.Error()}
+	}
@@
-func selectByWeight(refs []*resolvedProviderRef) *resolvedProviderRef {
+func selectByWeight(refs []*resolvedProviderRef) (*resolvedProviderRef, error) {
+	if len(refs) == 0 {
+		return nil, fmt.Errorf("no provider refs available")
+	}
 	if len(refs) == 1 {
-		return refs[0]
+		if refs[0].weight <= 0 {
+			return nil, fmt.Errorf("provider ref weight must be > 0")
+		}
+		return refs[0], nil
 	}
 	totalWeight := 0
 	for _, ref := range refs {
+		if ref.weight <= 0 {
+			return nil, fmt.Errorf("provider ref weight must be > 0")
+		}
 		totalWeight += ref.weight
 	}
+	if totalWeight <= 0 {
+		return nil, fmt.Errorf("total provider ref weight must be > 0")
+	}
 	r := rand.IntN(totalWeight)
 	for _, ref := range refs {
 		r -= ref.weight
 		if r < 0 {
-			return ref
+			return ref, nil
 		}
 	}
-	return refs[len(refs)-1]
+	return refs[len(refs)-1], nil
 }

As per coding guidelines, **/*.go: “Validate CR spec fields before using in ConfigMaps/Secrets.”

Also applies to: 208-224

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/plugins/model-provider-resolver/plugin.go` at line 177, The
selectByWeight function (around lines 208-224) can panic when receiving empty
refs or refs with non-positive total weight. Add validation at line 177 to
ensure modelInfo.refs is not empty and contains valid weights before calling
selectByWeight. Additionally, add defensive checks inside the selectByWeight
function itself (lines 208-224) to safely handle edge cases where len(refs) is
zero or totalWeight is non-positive by returning a sensible default or error
instead of allowing rand.IntN to panic. This prevents denial-of-service attacks
via malformed CR spec data on the request path.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@pkg/plugins/model-provider-resolver/plugin.go`:
- Line 177: The selectByWeight function (around lines 208-224) can panic when
receiving empty refs or refs with non-positive total weight. Add validation at
line 177 to ensure modelInfo.refs is not empty and contains valid weights before
calling selectByWeight. Additionally, add defensive checks inside the
selectByWeight function itself (lines 208-224) to safely handle edge cases where
len(refs) is zero or totalWeight is non-positive by returning a sensible default
or error instead of allowing rand.IntN to panic. This prevents denial-of-service
attacks via malformed CR spec data on the request path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 8b26d207-93ee-4f3d-86e9-ff9b1f306ecc

📥 Commits

Reviewing files that changed from the base of the PR and between ed049f4 and 6e36a74.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (24)
  • cmd/main.go
  • go.mod
  • pkg/plugins/api-translation/plugin.go
  • pkg/plugins/api-translation/plugin_test.go
  • pkg/plugins/api-translation/translator/anthropic/anthropic.go
  • pkg/plugins/api-translation/translator/bedrock/bedrock_openai.go
  • pkg/plugins/api-translation/translator/openai/openai.go
  • pkg/plugins/api-translation/translator/vertex/vertex_openai.go
  • pkg/plugins/apikey-injection/auth-generator/auth_generator.go
  • pkg/plugins/apikey-injection/auth-generator/sigv4_auth_generator.go
  • pkg/plugins/apikey-injection/auth-generator/simple_auth_generator.go
  • pkg/plugins/apikey-injection/plugin.go
  • pkg/plugins/apikey-injection/plugin_test.go
  • pkg/plugins/apikey-injection/reconciler.go
  • pkg/plugins/model-provider-resolver/external_model_reconciler.go
  • pkg/plugins/model-provider-resolver/external_provider_reconciler.go
  • pkg/plugins/model-provider-resolver/plugin.go
  • pkg/plugins/model-provider-resolver/plugin_test.go
  • pkg/plugins/nemo/nemo_guard_base.go
  • pkg/plugins/nemo/request_guard.go
  • pkg/plugins/nemo/request_guard_test.go
  • pkg/plugins/nemo/response_guard.go
  • pkg/plugins/nemo/response_guard_test.go
  • pkg/plugins/plugins.go

@nirrozenbaum

Copy link
Copy Markdown
Contributor

Plugin configuration: --plugin CLI args no longer supported in llm-d-inference-payload-processor

The upstream runner in llm-d-inference-payload-processor no longer accepts --plugin CLI flags. Plugins are now configured via a YAML config file, loaded with --config-file <path> (or --config-text for inline).

The expected config format is:

apiVersion: llm-d.ai/v1alpha1
kind: PayloadProcessorConfig
plugins:
  - type: body-field-to-header
    name: model-extractor
    parameters:
      fieldName: model
      headerName: X-Gateway-Model-Name
  - type: model-provider-resolver
  - type: api-translation
  - type: apikey-injection

profiles:
  default:
    request:
      plugins:
        - pluginRef: model-extractor
        - pluginRef: model-provider-resolver
        - pluginRef: api-translation
        - pluginRef: apikey-injection
    response:
      plugins:
        - pluginRef: api-translation

What needs to change in this PR:

  1. Create a ConfigMap template in the Helm chart (deploy/payload-processing/templates/) that renders this YAML config from values.yaml:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: {{ .Values.upstreamIpp.ipp.name }}-plugin-config
    data:
      config.yaml: |
        # rendered plugin config from values
  2. Mount the ConfigMap into the Deployment as a volume:

    volumes:
      - name: plugin-config
        configMap:
          name: {{ .Values.upstreamIpp.ipp.name }}-plugin-config
    containers:
      - volumeMounts:
          - name: plugin-config
            mountPath: /etc/payload-processor
            readOnly: true
  3. Pass the config file path to the runner via --config-file /etc/payload-processor/config.yaml instead of --plugin flags.

  4. Adapt the values.yaml plugin list format — note the field is parameters (not json), and the processing order is defined in the profiles section.

@noyitz

noyitz commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — you're right about the config format change. Here's where we stand:

Fixed so far:

  • go.mod: using published upstream version v0.0.0-20260609111331-11891e132621, no replace directive
  • Dockerfile: updated to use github.com/llm-d/llm-d-inference-payload-processor/version for ldflags, renamed binary from /bbr to /payload-processor

Still needed (Helm chart migration):
The chart currently depends on the upstream body-based-routing chart from gateway-api-inference-extension (v1.5.0-rc.1) which renders the Deployment with --plugin CLI flags. The IPP runner expects --config-file with a YAML config instead.

Options:

  1. Replace the chart dependency — point to the IPP's payload-processor chart (config/charts/payload-processor) which already has the ConfigMap + --config-file pattern
  2. Inline the templates — remove the upstream dependency and add our own Deployment + ConfigMap templates directly

Which approach do you prefer? Option 1 is cleaner but means we depend on the IPP chart being published. Option 2 gives us full control.

@nirrozenbaum

Copy link
Copy Markdown
Contributor

option 1 please - replace the chart dependency to llm-d-inference-payload-processor

@github-actions github-actions Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Large PR detected

Your PR is large. Please consider breaking it into multiple PRs.

The do-not-merge/hold label has been added and can be removed by the reviewers based on their judgement.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Large PR detected

Your PR is large. Please consider breaking it into multiple PRs.

The do-not-merge/hold label has been added and can be removed by the reviewers based on their judgement.

Comment thread deploy/payload-processing/values.yaml Outdated
fieldName: model
headerName: X-Gateway-Model-Name
- type: model-provider-resolver
name: model-provider-resolver

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.

remove plugin names when the name is identical to type

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.

do the same also in the e2e customConfig

Comment thread deploy/payload-processing/values.yaml Outdated
istio:
envoyFilter:
operation: INSERT_AFTER
anchorSubFilter: ""

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.

remove

Comment thread deploy/payload-processing/values.yaml Outdated
response:
- pluginRef: api-translation

tracing:

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.

remove tracing section

Comment thread deploy/payload-processing/values.yaml Outdated
provider:
name: istio

supportedEvents:

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.

remove section.

more generally remove sections that are 100% duplication of ipp (no need to repeat)

require.NoError(t, err)

actualModel, err := framework.ReadCycleStateKey[string](cs, state.ModelKey)
actualModel, err := pluginpkg.ReadCycleStateKey[string](cs, state.ModelKey)

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.

nit: keep imports consistent. for this you need to change to variable name from plugin to instance or something like it.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Large PR detected

Your PR is large. Please consider breaking it into multiple PRs.

The do-not-merge/hold label has been added and can be removed by the reviewers based on their judgement.

Comment on lines -35 to -39
provider:
name: istio
istio:
envoyFilter:
operation: INSERT_AFTER

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.

need to bring this back (in llm-d provider = none)

Comment on lines -41 to -42
inferenceGateway:
name: maas-default-gateway

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.

need to this back as well

Comment thread deploy/payload-processing/Chart.yaml Outdated
alias: upstreamBbr
- name: payload-processor
# Local path to the IPP chart. Update to an OCI/repo URL once the chart is published.
repository: file://../../../llm-d-inference-payload-processor/config/charts/payload-processor

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.

this is the only concerning point in current PR.
need to push for a pre-release including image of the chart that can be referenced, which should unblock this PR.

noyitz added a commit to noyitz/ai-gateway-payload-processing that referenced this pull request Jun 16, 2026
Replace local filesystem path in go.mod replace directive with the
fork's published commit. Both replace directives (gateway-api-inference-
extension pin + IPP fork) are needed until upstream PRs merge:
- IPP PR opendatahub-io#169 (ResponseBodyMode types)
- ODH PR opendatahub-io#331 (framework migration removes gateway-api-inference-extension)
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Large PR detected

Your PR is large. Please consider breaking it into multiple PRs.

The do-not-merge/hold label has been added and can be removed by the reviewers based on their judgement.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Large PR detected

Your PR is large. Please consider breaking it into multiple PRs.

The do-not-merge/hold label has been added and can be removed by the reviewers based on their judgement.

@noyitz
noyitz force-pushed the feat/migrate-to-ipp-framework branch from 16e64b8 to 3c6defc Compare June 17, 2026 15:50
@github-actions github-actions Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 17, 2026
noyitz added a commit to noyitz/ai-gateway-payload-processing that referenced this pull request Jun 17, 2026
…uard

- api-translation: configurable via "responseBodyMode" parameter
  (none/chunked/full, defaults to full)
- nemo-response-guard: always BodyFull (needs complete body for
  content inspection)

Depends on opendatahub-io#331 (framework migration)
noyitz added a commit to noyitz/ai-gateway-payload-processing that referenced this pull request Jun 17, 2026
…uard

- api-translation: configurable via "responseBodyMode" parameter
  (none/chunked/full, defaults to full)
- nemo-response-guard: always BodyFull (needs complete body for
  content inspection)

Depends on opendatahub-io#331 (framework migration)
@noyitz
noyitz force-pushed the feat/migrate-to-ipp-framework branch from 3c6defc to 235f457 Compare June 17, 2026 16:05
- Replace all gateway-api-inference-extension imports with llm-d-inference-payload-processor
- Point go.mod to official release tag v0.1.0-rc.1
- Update Helm chart dependency to oci://ghcr.io/llm-d/charts payload-processor 0.1.0-rc.1
- Rename chart alias from upstreamBbr to upstreamIpp
- Update test mocks for new plugin.Handle interface
@noyitz
noyitz force-pushed the feat/migrate-to-ipp-framework branch 3 times, most recently from 85d7d2a to 281c7d1 Compare June 17, 2026 16:30
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/scripts/setup-kind.sh`:
- Around line 140-142: The Helm override keys in the setup-kind.sh script under
lines 140-142 have incorrect paths that don't match the chart values schema. The
overrides currently attempt to set
upstreamIpp.payloadProcessor.inferenceGateway.name,
upstreamIpp.payloadProcessor.provider.name, and
upstreamIpp.payloadProcessor.provider.istio.envoyFilter.operation, but according
to the values.yaml file, provider and inferenceGateway are siblings of
payloadProcessor under upstreamIpp, not children of it. Remove payloadProcessor
from each of these three --set arguments so that inferenceGateway and provider
are direct children of upstreamIpp instead of children of payloadProcessor.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 463bee30-8a3c-4616-9721-bbf9311a853c

📥 Commits

Reviewing files that changed from the base of the PR and between 6e36a74 and 281c7d1.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (33)
  • .gitignore
  • Dockerfile
  • cmd/main.go
  • deploy/payload-processing/Chart.yaml
  • deploy/payload-processing/templates/rbac.yaml
  • deploy/payload-processing/values.yaml
  • go.mod
  • pkg/plugins/api-translation/plugin.go
  • pkg/plugins/api-translation/plugin_test.go
  • pkg/plugins/api-translation/translator/anthropic/anthropic.go
  • pkg/plugins/api-translation/translator/bedrock/bedrock_openai.go
  • pkg/plugins/api-translation/translator/openai/openai.go
  • pkg/plugins/api-translation/translator/vertex/vertex_openai.go
  • pkg/plugins/apikey-injection/auth-generator/auth_generator.go
  • pkg/plugins/apikey-injection/auth-generator/sigv4_auth_generator.go
  • pkg/plugins/apikey-injection/auth-generator/simple_auth_generator.go
  • pkg/plugins/apikey-injection/auth-generator/simple_auth_generator_test.go
  • pkg/plugins/apikey-injection/plugin.go
  • pkg/plugins/apikey-injection/plugin_test.go
  • pkg/plugins/apikey-injection/reconciler.go
  • pkg/plugins/model-provider-resolver/external_model_reconciler.go
  • pkg/plugins/model-provider-resolver/external_model_reconciler_test.go
  • pkg/plugins/model-provider-resolver/external_provider_reconciler.go
  • pkg/plugins/model-provider-resolver/plugin.go
  • pkg/plugins/model-provider-resolver/plugin_test.go
  • pkg/plugins/nemo/nemo_guard_base.go
  • pkg/plugins/nemo/request_guard.go
  • pkg/plugins/nemo/request_guard_test.go
  • pkg/plugins/nemo/response_guard.go
  • pkg/plugins/nemo/response_guard_test.go
  • pkg/plugins/plugins.go
  • test/e2e/scripts/e2e-values.yaml
  • test/e2e/scripts/setup-kind.sh
✅ Files skipped from review due to trivial changes (8)
  • .gitignore
  • pkg/plugins/model-provider-resolver/external_model_reconciler.go
  • pkg/plugins/api-translation/translator/bedrock/bedrock_openai.go
  • pkg/plugins/model-provider-resolver/external_provider_reconciler.go
  • Dockerfile
  • pkg/plugins/model-provider-resolver/external_model_reconciler_test.go
  • cmd/main.go
  • pkg/plugins/nemo/nemo_guard_base.go
🚧 Files skipped from review as they are similar to previous changes (15)
  • pkg/plugins/apikey-injection/reconciler.go
  • pkg/plugins/api-translation/translator/vertex/vertex_openai.go
  • pkg/plugins/api-translation/translator/openai/openai.go
  • pkg/plugins/plugins.go
  • pkg/plugins/nemo/response_guard_test.go
  • pkg/plugins/model-provider-resolver/plugin.go
  • pkg/plugins/api-translation/translator/anthropic/anthropic.go
  • pkg/plugins/apikey-injection/auth-generator/sigv4_auth_generator.go
  • pkg/plugins/apikey-injection/auth-generator/auth_generator.go
  • pkg/plugins/api-translation/plugin_test.go
  • pkg/plugins/nemo/request_guard_test.go
  • pkg/plugins/model-provider-resolver/plugin_test.go
  • pkg/plugins/nemo/request_guard.go
  • pkg/plugins/apikey-injection/plugin_test.go
  • pkg/plugins/api-translation/plugin.go

Comment thread test/e2e/scripts/setup-kind.sh Outdated
@noyitz
noyitz force-pushed the feat/migrate-to-ipp-framework branch from c412c42 to 6ca95d1 Compare June 17, 2026 17:01
Comment thread test/e2e/scripts/e2e-values.yaml Outdated
fieldName: model
headerName: X-Gateway-Model-Name
- type: model-provider-resolver
name: model-provider-resolver

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.

nit: we don't need name in cases the name is identical to type (that's is set by default if no other name was specified)

Comment thread deploy/payload-processing/values.yaml Outdated
Comment on lines +36 to +40
name: istio
istio:
envoyFilter:
operation: INSERT_AFTER
name: none

inferenceGateway:
name: maas-default-gateway
name: inference-gateway

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.

revert pls. this is wrong

@nirrozenbaum nirrozenbaum removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 17, 2026
…test var

- Remove plugin name fields in e2e-values.yaml where name == type (defaults)
- Rename test variable p → instance for import consistency

Signed-off-by: Noy Itzikowitz <nitzikow@redhat.com>

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
deploy/payload-processing/templates/rbac.yaml (1)

50-50: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update stale comment.

Comment still references "bbr" instead of the new payload processor terminology.

📝 Proposed fix
-{{- else }} ## if bbr is set in a single namespace
+{{- else }} ## if payload processor is set in a single namespace
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deploy/payload-processing/templates/rbac.yaml` at line 50, The comment at
line 50 in the rbac.yaml template file references outdated "bbr" terminology
instead of the current "payload processor" naming convention. Locate the comment
that reads "## if bbr is set in a single namespace" and update it to use
"payload processor" terminology instead of "bbr" to ensure consistency with the
current project conventions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deploy/payload-processing/values.yaml`:
- Around line 28-32: The request pipeline in the values.yaml file lacks
documentation of critical execution order dependencies. Add code comments above
or within the request pipeline block documenting that model-provider-resolver
must execute before api-translation and apikey-injection, explaining that
api-translation requires ProviderKey from CycleState (set by
model-provider-resolver) to select the correct translator format, and that
apikey-injection requires AuthTypeKey, CredsRefName, and CredsRefNamespace also
set by model-provider-resolver. Include a note that the current silent failure
when CycleState keys are missing masks ordering violations until the provider
API rejects the malformed request.

---

Outside diff comments:
In `@deploy/payload-processing/templates/rbac.yaml`:
- Line 50: The comment at line 50 in the rbac.yaml template file references
outdated "bbr" terminology instead of the current "payload processor" naming
convention. Locate the comment that reads "## if bbr is set in a single
namespace" and update it to use "payload processor" terminology instead of "bbr"
to ensure consistency with the current project conventions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 87e3292c-05d8-42ca-9168-045034bcc46e

📥 Commits

Reviewing files that changed from the base of the PR and between 281c7d1 and ed9e33d.

📒 Files selected for processing (5)
  • deploy/payload-processing/templates/rbac.yaml
  • deploy/payload-processing/values.yaml
  • pkg/plugins/model-provider-resolver/plugin_test.go
  • test/e2e/scripts/e2e-values.yaml
  • test/e2e/scripts/setup-kind.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • test/e2e/scripts/setup-kind.sh
  • pkg/plugins/model-provider-resolver/plugin_test.go

Comment on lines +28 to +32
request:
- pluginRef: model-extractor
- pluginRef: model-provider-resolver
- pluginRef: api-translation
- pluginRef: apikey-injection

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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Cross-reference plugin execution order in code and documentation

# Find plugin ordering documentation or validation
rg -n -C5 'plugin.*order|execution.*order|pipeline.*order' --type=md --type=go

# Check if any plugin code has ordering dependencies/assertions
rg -n -C3 'model-provider-resolver.*before|apikey.*after|translation.*after' pkg/plugins/

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 70


🏁 Script executed:

# First, understand the YAML structure and context
cat deploy/payload-processing/values.yaml | head -50

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 1068


🏁 Script executed:

# Find plugin-related code and framework
fd -t f -e go | head -20

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 1018


🏁 Script executed:

# Search for how plugins are loaded/executed
rg -n 'request.*pipeline|plugin.*execute|plugin.*chain' -A 3 -B 3

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 1460


🏁 Script executed:

# Check plugin package structure
find . -type d -name '*plugin*' 2>/dev/null

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 102


🏁 Script executed:

# Find the plugin execution framework code
rg -n 'type.*Profile|plugins.*execute|request.*chain' --type=go -A 5 -B 5

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 70


🏁 Script executed:

# Check main plugin loading and execution logic
find pkg -name '*.go' -type f | xargs grep -l 'Profile\|pipeline' | head -5

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 70


🏁 Script executed:

# Look for plugin framework or processor that executes the request pipeline
cat pkg/processor/processor.go 2>/dev/null || find . -name 'processor.go' -o -name 'pipeline.go' | head -3

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 70


🏁 Script executed:

# Search for code that processes the config/Profile structure
rg -n 'payloadProcessor\|Profile\|pluginRef' --type=go -B 2 -A 2 | head -80

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 70


🏁 Script executed:

# Find main handler code
rg -n 'http.Handler\|ServeHTTP\|ProcessPayload' --type=go -B 1 -A 5 | head -100

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 70


🏁 Script executed:

# Look for plugin initialization or chain building
rg -n 'plugin.*chain\|build.*pipeline\|plugins.*\[' --type=go -B 2 -A 3 | head -80

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 70


🏁 Script executed:

# List all Go files and search more broadly
ls -la pkg/plugins/*/

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 2649


🏁 Script executed:

# Search in all Go files for plugin execution without type-specific filtering
grep -r "pluginRef\|executePlugin\|request.*plugin" --include="*.go" | head -40

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 213


🏁 Script executed:

# Look at the main.go and see how it initializes the system
cat cmd/main.go | head -100

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 1461


🏁 Script executed:

# Find the RegisterPlugins implementation
rg -n 'RegisterPlugins|register.*plugin' --type=go -A 10 | head -100

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 6437


🏁 Script executed:

# Check if there's a plugins package init or registry
find pkg/plugins -name '*.go' | head -20

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 1318


🏁 Script executed:

# Look for plugin interface definitions and ordering constraints
rg -n 'type.*Plugin\|interface.*Plugin' --type=go -B 2 -A 8 | head -120

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 70


🏁 Script executed:

# Check api-translation plugin for dependencies on model-provider-resolver output
cat pkg/plugins/api-translation/plugin.go | head -200

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 8321


🏁 Script executed:

# Check apikey-injection plugin for dependencies
cat pkg/plugins/apikey-injection/plugin.go | head -200

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 6740


🏁 Script executed:

# Search for CycleState or state storage to understand data flow between plugins
rg -n 'CycleState\|state\|Store\|common.state' --type=go pkg/plugins/ -B 2 -A 3 | head -150

Repository: opendatahub-io/ai-gateway-payload-processing

Length of output: 70


Document plugin execution order dependencies; add ordering validation.

The request pipeline depends on execution order: model-provider-resolver must run before api-translation and apikey-injection. The api-translation plugin reads ProviderKey from CycleState (set by model-provider-resolver) to select the correct translator. If api-translation runs first, the provider is unknown and translation is skipped, sending OpenAI format to the provider API instead of its native format (e.g., Anthropic Messages API), causing API errors. Similarly, apikey-injection reads AuthTypeKey, CredsRefName, and CredsRefNamespace from CycleState; if it runs before model-provider-resolver, no auth headers are injected, causing 401/403 errors.

Currently, plugins fail silently if required CycleState keys are missing, masking ordering violations until the provider API rejects the request. Add explicit ordering assertions in the plugin framework or document this dependency in code comments.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deploy/payload-processing/values.yaml` around lines 28 - 32, The request
pipeline in the values.yaml file lacks documentation of critical execution order
dependencies. Add code comments above or within the request pipeline block
documenting that model-provider-resolver must execute before api-translation and
apikey-injection, explaining that api-translation requires ProviderKey from
CycleState (set by model-provider-resolver) to select the correct translator
format, and that apikey-injection requires AuthTypeKey, CredsRefName, and
CredsRefNamespace also set by model-provider-resolver. Include a note that the
current silent failure when CycleState keys are missing masks ordering
violations until the provider API rejects the malformed request.

Comment thread deploy/payload-processing/values.yaml Outdated
Comment thread deploy/payload-processing/values.yaml Outdated
Co-authored-by: Nir Rozenbaum <nir.rozenbaum@gmail.com>

@nirrozenbaum nirrozenbaum 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.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 17, 2026
@openshift-ci

openshift-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nirrozenbaum, noyitz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [nirrozenbaum,noyitz]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhods-ci-bot

Copy link
Copy Markdown

@noyitz: The following test has Succeeded:

OCI Artifact Browser URL

View in Artifact Browser

Inspecting Test Artifacts Manually

To inspect your test artifacts manually, follow these steps:

  1. Install ORAS (see the ORAS installation guide).
  2. Download artifacts with the following commands:
mkdir -p oras-artifacts
cd oras-artifacts
oras pull quay.io/opendatahub/odh-ci-artifacts:ai-gateway-group-test-z7t47

@yossiovadia
yossiovadia merged commit 8fc29e7 into opendatahub-io:main Jun 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants